Skip to content

Commit 1c00a97

Browse files
committed
Document crate features in Readme
1 parent 45889fe commit 1c00a97

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,14 @@ pub fn init_heap() {
2828
}
2929
```
3030

31+
## Features
32+
33+
- **`use_spin`** (default): Provide a `LockedHeap` type that implements the [`GlobalAlloc`] trait by using a spinlock.
34+
- **`alloc_ref`**: Provide an implementation of the unstable [`AllocRef`] trait.
35+
- Warning: The `AllocRef` trait is still regularly changed on the Rust side, so expect some regular breakage when using this feature.
36+
37+
[`GlobalAlloc`]: https://doc.rust-lang.org/nightly/core/alloc/trait.GlobalAlloc.html
38+
[`AllocRef`]: https://doc.rust-lang.org/nightly/core/alloc/trait.AllocRef.html
39+
3140
## License
3241
This crate is dual-licensed under MIT or the Apache License (Version 2.0). See LICENSE-APACHE and LICENSE-MIT for details.

0 commit comments

Comments
 (0)