13 releases (2 stable)

2.0.0 Dec 2, 2024
1.0.0 Oct 12, 2024
0.1.10 Oct 10, 2024
0.1.8 Jul 21, 2024

#93 in Programming languages

Download history 38646/week @ 2024-10-09 40459/week @ 2024-10-16 40571/week @ 2024-10-23 40699/week @ 2024-10-30 43205/week @ 2024-11-06 46139/week @ 2024-11-13 51078/week @ 2024-11-20 45230/week @ 2024-11-27 52143/week @ 2024-12-04 158904/week @ 2024-12-11 114181/week @ 2024-12-18 52276/week @ 2024-12-25 133776/week @ 2025-01-01 223342/week @ 2025-01-08 186364/week @ 2025-01-15 121464/week @ 2025-01-22

677,033 downloads per month
Used in 225 crates (9 directly)

Apache-2.0

49KB
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
~77K SLoC