arcella-types

Crates.ioarcella-types
lib.rsarcella-types
version0.1.1
created_at2025-11-22 10:45:37.348351+00
updated_at2025-11-22 10:45:37.348351+00
descriptionCore data types and manifests for the Arcella WebAssembly runtime
homepage
repositoryhttps://github.com/ArcellaTeam/arcella/
max_upload_size
id1945205
size84,358
Alexey Rybakov (rybakov-an)

documentation

README

arcella-types

Crates.io Docs.rs License

Core data types and manifests for the Arcella WebAssembly runtime.

This crate defines the shared contract used across the Arcella platform — a modular, secure runtime for WebAssembly Component Model and WASI applications.

It is designed to be:

  • Pure data: no runtime logic, no I/O, no external engine dependencies.
  • Serializable: full serde support for JSON/TOML.
  • Validated: strict parsing of module IDs, interfaces, and manifests.
  • Reusable: useful for CLI tools, IDE extensions, package managers, and custom integrations.

📦 Key Types

Type Purpose
ModuleId Canonical name@version identifier (e.g., http-logger@0.1.0)
ComponentManifest Describes a component’s identity, interfaces (imports/exports), and capabilities
InterfaceList Dual-format (["iface"] or {"iface": {...}}) interface declaration
ComponentItemSpec Typed representation of WIT items (functions, instances, components, etc.)
ConfigData Hierarchical configuration with dot-separated keys (arcella.log.level)
Value Universal dynamic value type (like serde_json::Value, but tailored for Arcella)

🚀 Example: Parsing a Component Manifest

use arcella_types::manifest::ComponentManifest;

let toml = r#"
    name = "http-logger"
    version = "0.1.0"
    description = "Logs HTTP requests"
    exports = ["logger:log@1.0"]
    imports = ["wasi:http/incoming-handler@0.2.0"]
"#;

let manifest: ComponentManifest = toml::from_str(toml)?;
assert_eq!(manifest.id.to_string(), "http-logger@0.1.0");
manifest.validate()?; // Ensures interface format is valid
Commit count: 0

cargo fmt