Skip to main content

Crate use_wasm_component

Crate use_wasm_component 

Source
Expand description

§use-wasm-component

WebAssembly Component Model primitives for RustUse. This crate models component, world, interface, package reference, import, and export metadata without encoding or decoding components.

§Example

use use_wasm_component::{ComponentImport, ComponentItemKind, InterfaceName};

let import = ComponentImport::new(
    InterfaceName::new("filesystem").expect("valid interface"),
    ComponentItemKind::Interface,
);

assert_eq!(import.kind(), ComponentItemKind::Interface);

§Scope

  • Component, world, interface, and package-reference names.
  • Component import and export metadata.

§Non-goals

  • No component encoding.
  • No component decoding.

§License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license

Structs§

ComponentExport
Component export metadata.
ComponentImport
Component import metadata.
ComponentName
InterfaceName
PackageReference
WorldName

Enums§

ComponentItemKind
Component Model import/export item kind.
ComponentNameError
Error returned when Component Model names are invalid.