servo/components/allocator/Cargo.toml
webbeef 48faed54f7 Allow usage of the mimalloc allocator
Signed-off-by: webbeef <me@webbeef.org>
2025-06-02 22:50:13 -07:00

30 lines
831 B
TOML

[package]
name = "servo_allocator"
version.workspace = true
authors.workspace = true
license.workspace = true
edition.workspace = true
publish.workspace = true
rust-version.workspace = true
[lib]
path = "lib.rs"
[features]
use-system-allocator = ["libc"]
use-mimalloc = ["mimalloc", "libmimalloc-sys"]
[target.'cfg(not(any(windows, target_env = "ohos")))'.dependencies]
libc = { workspace = true, optional = true }
tikv-jemalloc-sys = { workspace = true }
tikv-jemallocator = { workspace = true }
[target.'cfg(windows)'.dependencies]
windows-sys = { workspace = true, features = ["Win32_System_Memory"] }
[target.'cfg(target_env = "ohos")'.dependencies]
libc = { workspace = true }
[dependencies]
mimalloc = { version = "0.1", features = ["extended"], optional = true }
libmimalloc-sys = { version = "0.1", optional = true }