esp-hal/esp-alloc/Cargo.toml
Björn Quentin 3ab3490d62
Move malloc etc to esp-alloc, common C functions to esp-rom-sys, define "C functions" in esp-radio weak (#3890)
* Provide malloc, free and friends in esp-alloc

* Mute warning

* Remove some (now unused) global symbols

* Have a way to opt-out of esp-alloc's malloc,free etc.

* Fixes

* Move some common C functions from esp-radio to esp-rom-sys

* Fix

* Make esp-readio symbols weakly linked

* CHANGELOG.md

* Align MSRV, cleanup visibility

* Init before `assume_init`

* Linker script fixes

* Fix examples

* Remove heapless - esp-radio is alloc

* Fix examples

* Whitespace

* realloc_internal

* Make `__esp_radio_putchar` a no-op if `sys-logs` is not enabled
2025-08-05 11:58:31 +00:00

49 lines
1.6 KiB
TOML

[package]
name = "esp-alloc"
version = "0.8.0"
edition = "2024"
rust-version = "1.86.0"
description = "A heap allocator for Espressif devices"
documentation = "https://docs.espressif.com/projects/rust/esp-alloc/latest/"
keywords = ["allocator", "embedded", "esp32", "espressif", "memory"]
categories = ["embedded", "memory-management", "no-std"]
repository = "https://github.com/esp-rs/esp-hal"
license = "MIT OR Apache-2.0"
[package.metadata.docs.rs]
default-target = "riscv32imc-unknown-none-elf"
features = ["nightly"]
[lib]
bench = false
test = false
[dependencies]
allocator-api2 = { version = "0.3.0", default-features = false }
defmt = { version = "1.0.1", optional = true }
cfg-if = "1.0.0"
critical-section = "1.2.0"
enumset = "1.1.6"
linked_list_allocator = { version = "0.10.5", default-features = false, features = ["const_mut_refs"] }
document-features = "0.2.11"
[features]
default = ["compat"]
## Enable nightly rustc-only features, like `feature(allocator_api)`.
nightly = []
## Implement `defmt::Format` on certain types.
defmt = ["dep:defmt", "enumset/defmt"]
## Enable this feature if you want to keep stats about the internal heap usage such as:
## - Max memory usage since initialization of the heap
## - Total allocated memory since initialization of the heap
## - Total freed memory since initialization of the heap
##
## ⚠️ Note: Enabling this feature will require extra computation every time alloc/dealloc is called.
internal-heap-stats = []
## Provide C-compatibility functions (malloc, free, ...)
compat = []