docs.rs failed to build memapi2-0.9.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
memapi2-0.9.2
memapi2
A small, no_std/no_alloc-friendly allocation interface for raw buffers, with explicit layouts,
split allocator traits, and structured errors.
MSRV: 1.46.0 (some features require newer compilers or nightly; see Feature flags)
Highlights
- Split allocator traits:
Alloc,Dealloc,Grow,Shrink,Realloc, plusBasicAllocandFullAllocaliases - Custom
Layouttype with conversion to/fromalloc::alloc::Layout(unlessno_allocis on) - Structured error reporting via
ErrorandCause, with optional OS error capture - Optional allocator implementations:
DefaultAlloc,std::alloc::System,c_alloc::CAlloc,stack_alloc::StackAlloc(experimental) - Data utilities for size/alignment/metadata via
data::type_propsanddata::marker no_stdby default;allocis used unlessno_allocis enabled
Installation
[]
= "0.8.1"
If you want common optional features:
[]
= { = "0.8.1", = ["os_err_reporting", "c_alloc"] }
Example
use ;
Feature flags
std: enablestdintegration (includingstd::alloc::System)os_err_reporting: best-effort OS error reporting viaerrno(requiresstd)alloc_mut_traits: mutable allocator trait variants (AllocMut,DeallocMut, ...)alloc_temp_trait: scoped/temporary allocation trait (AllocTemp)c_alloc: Caligned_alloc-style allocator (c_alloc::CAlloc)stack_alloc:alloca-based allocator (stack_alloc::StackAlloc, experimental, requires a C toolchain)c_str: enableCStr-specific data traits inno_std(MSRV: 1.64)metadata: nightlycore::ptr::Pointeemetadata supportsized_hierarchy: nightlycore::marker::MetaSizedsupportno_alloc: disable thealloccrate (removesDefaultAlloc,StdLayout, and implementations for theSystemallocator)no_nightly: disable automatic nightly detection inbuild.rsfull_msrv: convenience bundle (os_err_reporting,c_alloc,stack_alloc,alloc_mut_traits)full:full_msrv+c_strall_nightly:metadata+sized_hierarchyfull_nightly:full+all_nightly
Notes
DefaultAllocdelegates to the global allocator. Do not set it as the global allocator itself, or you will cause infinite recursion.- This crate is low-level and uses raw pointers. Read the safety contracts on trait methods and layout constructors carefully.
Documentation
- API reference: https://docs.rs/memapi2
License
Licensed under GPL-3.0 OR MIT. See LICENSE-GPL and LICENSE-MIT.