Cargo Features

swc_allocator has no features set by default.

[dependencies]
swc_allocator = { version = "4.0.0", features = ["hashbrown", "nightly", "rkyv", "serde", "skip-warning"] }
hashbrown nightly?

Enables allocator-api2 of hashbrown ^0.14.5

Affects api::arena.HashMap, api::arena.HashSet, api::scoped.HashMap, api::scoped.HashSet, api::global.HashMap, api::global.HashSet

nightly = skip-warning

Enables nightly of allocator-api2, allocator_api of bumpalo and nightly of hashbrown ^0.14.5

hashbrown:

Enables use of nightly features. This is only guaranteed to work on the latest version of nightly Rust.

rkyv

Enables rancor and rkyv

serde

Enables serde

skip-warning nightly?

This feature is used to suppress warnings about slowness caused by stable rustc.
It's recommended to use nightly rustc until the allocator APIs are stabilized.