#allocator #fallback

no-std allocator-fallback

Minimal fallback for the standard library’s allocator API

5 releases

0.1.4 May 12, 2022
0.1.3 May 11, 2022
0.1.2 May 7, 2022
0.1.1 Apr 29, 2022
0.1.0 Apr 29, 2022

#115 in No standard library

Download history 48/week @ 2022-04-28 60/week @ 2022-05-05 118/week @ 2022-05-12 25/week @ 2022-05-19 18/week @ 2022-05-26 58/week @ 2022-06-02 3/week @ 2022-06-09 15/week @ 2022-06-16

99 downloads per month
Used in fixed-bump

Apache-2.0

10KB
128 lines

allocator-fallback

This crate provides a minimal fallback for the standard library’s allocator API, which is currently unstable.

Crate features

If the crate feature allocator_api is enabled, this crate will simply re-export the real allocator API in the standard library. Of course, this requires Rust nightly.

If the crate feature std is enabled (the default), the crate will use std; otherwise, it will be no_std. Using std allows AllocError to implement std::error::Error.


lib.rs:

This crate provides a minimal fallback for the standard library’s allocator API, which is currently unstable.

Crate features

If the crate feature allocator_api is enabled, this crate will simply re-export the real allocator API in the standard library. Of course, this requires Rust nightly.

If the crate feature std is enabled (the default), the crate will use [std]; otherwise, it will be no_std. Using [std] allows [AllocError] to implement [std::error::Error].

No runtime deps

Features

  • allocator_api
  • doc_cfg
  • std