16 releases (4 major breaking)

4.0.0 Feb 24, 2025
3.0.1 Feb 20, 2025
2.0.0 Dec 2, 2024
1.0.0 Oct 12, 2024
0.1.8 Jul 21, 2024

#84 in Programming languages

Download history 49856/week @ 2024-11-18 44856/week @ 2024-11-25 51447/week @ 2024-12-02 112638/week @ 2024-12-09 157785/week @ 2024-12-16 49414/week @ 2024-12-23 93414/week @ 2024-12-30 197078/week @ 2025-01-06 219202/week @ 2025-01-13 150564/week @ 2025-01-20 131397/week @ 2025-01-27 136428/week @ 2025-02-03 155195/week @ 2025-02-10 154061/week @ 2025-02-17 195946/week @ 2025-02-24 186320/week @ 2025-03-03

693,304 downloads per month
Used in 240 crates (9 directly)

Apache-2.0

13KB
214 lines

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

~0.7–1.6MB
~26K SLoC