use-wasm-memory 0.0.1

WebAssembly linear memory page-count, min/max limit, shared marker, and size conversion primitives.
Documentation
  • Coverage
  • 100%
    38 out of 38 items documented1 out of 31 items with examples
  • Size
  • Source code size: 12.49 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 816.45 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-wasm
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-wasm-memory

WebAssembly linear memory primitives for RustUse. This crate models page counts, memory limits, shared-memory markers, and page-size conversions.

Example

use use_wasm_memory::{MemoryLimits, WasmPageCount};

let limits = MemoryLimits::new(WasmPageCount::new(1), Some(WasmPageCount::new(2)))
    .expect("valid limits");

assert_eq!(limits.minimum_pages(), 1);
assert_eq!(limits.maximum_pages(), Some(2));

Scope

  • Wasm page counts and byte conversions.
  • Minimum/maximum memory limits and shared marker.

Non-goals

  • No memory allocation.
  • No runtime memory access.

License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license