Skip to main content

Crate c_support

Crate c_support 

Source
Expand description

Internal libc-style helpers for the C libraries linked into Xila.

LVGL and LittleFS expect a C library (malloc, memcpy, strlen, …). Their Rust glue (graphics’ LVGL hooks and little_fs’ stubs) forwards to the functions of this crate, which allocate through the system memory manager and implement the memory and string primitives.

This crate is plain Rust: it exports no C symbols, ships no header and is not an application ABI. The public native ABI is xila-abi-application.

Structs§

Allocated
CompactLayout

Constants§

MEMORY_CAPABILITIES_ALWAYS_ACCESSIBLE
Memory stays accessible when external flash caches are disabled.
MEMORY_CAPABILITIES_DIRECT_MEMORY_ACCESS
Memory is accessible by DMA controllers.
MEMORY_CAPABILITIES_EXECUTE
Memory can be used for code execution.
MEMORY_CAPABILITIES_NONE
No special capabilities: standard memory.

Functions§

into_pointer
Converts a function that returns an Option<NonNull<P>> into a raw C-compatible pointer.
memory_allocate⚠
Allocates a memory block with specified properties.
memory_allocate_core⚠
Allocates a memory block with default properties.
memory_compare⚠
Compare memory blocks
memory_copy⚠
Copy memory from source to destination
memory_deallocate⚠
Deallocates a previously allocated memory block.
memory_move⚠
Move memory from source to destination (handles overlapping regions)
memory_reallocate⚠
Reallocates a memory block to a new size.
memory_set⚠
Set memory to a specific value
string_compare⚠
Compare two null-terminated strings
string_compare_bounded⚠
Compare two strings up to n characters
string_concatenate⚠
Concatenate source string to destination string
string_copy⚠
Copy string from source to destination
string_copy_bounded⚠
Copy string from source to destination with maximum length
string_duplicate⚠
Duplicate a string
string_duplicate_bounded⚠
Duplicate a string up to a maximum length
string_get_length⚠
Get the length of a null-terminated string
string_get_length_bounded⚠
Get the length of a null-terminated string with maximum length

Type Aliases§

MemoryCapabilities
Memory capability flags requested from the memory manager.