| Crates.io | wasm_allocator |
| lib.rs | wasm_allocator |
| version | 0.1.1 |
| created_at | 2023-04-20 07:34:30.014815+00 |
| updated_at | 2023-04-20 07:34:30.014815+00 |
| description | A tiny wasm allocator for no_std |
| homepage | |
| repository | https://github.com/W-Mai/wasm_allocator |
| max_upload_size | |
| id | 844144 |
| size | 6,236 |
rustIt is too simple that memory grows linearly and lacks the function of releasing memory (which may be supported in the future).
no_stdThe default heap size is 1KB, if you want to modify the size of the heap, provide the WASM_ALLOCATOR_HEAP_SIZE
environment variable, such as WASM_ALLOCATOR_HEAP_SIZE=4096
Using in your wasm project:
use wasm_allocator::Heap;
#[global_allocator]
static ALLOCATOR: Heap = Heap;
MIT