14 releases (3 major breaking)

3.0.0 Feb 3, 2025
2.0.0 Dec 2, 2024
1.0.0 Oct 12, 2024
0.1.10 Oct 10, 2024
0.1.8 Jul 21, 2024

#220 in Programming languages

Download history 40541/week @ 2024-10-22 40955/week @ 2024-10-29 42461/week @ 2024-11-05 45981/week @ 2024-11-12 50769/week @ 2024-11-19 44812/week @ 2024-11-26 51614/week @ 2024-12-03 136162/week @ 2024-12-10 136929/week @ 2024-12-17 49909/week @ 2024-12-24 107767/week @ 2024-12-31 211422/week @ 2025-01-07 201076/week @ 2025-01-14 156517/week @ 2025-01-21 126540/week @ 2025-01-28 112668/week @ 2025-02-04

637,664 downloads per month
Used in 227 crates (9 directly)

Apache-2.0

48KB
1K SLoC

Allocator for swc.

Features

  • scoped: Enable scoped mode.

Modes

Default mode

In default mode, crate::boxed::Box and crate::vec::Vec are identical to the original types in [std].

Scoped mode

  • You need to enable scoped feature to use this mode.

In scoped mode you can use [FastAlloc] to make crate::boxed::Box and crate::vec::Vec very fast.

In this mode, you need to be careful while using crate::boxed::Box and crate::vec::Vec. You should ensure that [Allocator] outlives all crate::boxed::Box and crate::vec::Vec created in the scope.

Recommened way to use this mode is to wrap the whole operations in a call to Allocator::scope.

Dependencies

~4.5MB
~76K SLoC