1 unstable release
0.1.0 | Feb 16, 2024 |
---|
#316 in Memory management
31 downloads per month
Used in foundation-urtypes
6KB
78 lines
foundation-rs
Minimum Supported Rust Version (MSRV).
The minimum supported version Rust version is 1.70
.
Licensing
All licenses used in this repository are REUSE friendly, and the license for each component is marked in:
- Every file where appropriate, for example by using comments.
- An additional file ending with the
.license
extension for files that do not support a copyright comment. - The
.reuse/dep5
file otherwise.
In summary, foundation-rs
makes use of the following licenses:
- GNU General Public License v3.0 (GPLv3) or later.
- MIT License
For a detailed usage of those licenses, run the reuse sdpx
command to generate a software Bill-of-Materials (BOM).
Due to the inclusion of GPLv3 code, foundation-rs
should be treated in a copyleft manner.
lib.rs
:
Foundation Arena.
This crate provides an alternative to the typed_arena
crate that does
not use the heap. Instead, the Arena
type statically allocates
memory at compile-time by passing the N
type parameter.
Examples
use foundation_arena::Arena;
let arena: Arena<u32, 8> = Arena::new();
let one: &mut u32 = arena.alloc(1).unwrap();
let two: &mut u32 = arena.alloc(2).unwrap();
println!("{one} {two}");