use-wasm-target 0.0.1

Rust WebAssembly target triple, target family, pointer-width, ABI, and profile label primitives.
Documentation
  • Coverage
  • 100%
    22 out of 22 items documented1 out of 10 items with examples
  • Size
  • Source code size: 8.63 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 538.02 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-target

Rust/WebAssembly target primitives for RustUse. This crate models common Rust Wasm target labels with family, pointer width, and profile helpers.

Example

use use_wasm_target::WasmTarget;

let target: WasmTarget = "wasm32-wasip1".parse().expect("known target");

assert_eq!(target.family(), "wasm32");
assert_eq!(target.pointer_width(), 32);

Scope

  • Common Rust Wasm targets.
  • Target family, pointer width, and profile labels.

Non-goals

  • No cargo invocation.
  • No target installation checks.

License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license