docs(wit): document capability and component contracts
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
//! Example service that imports the versioned Wasmeld monotonic-clock capability.
|
||||
//!
|
||||
//! Each response is eight little-endian timestamp bytes followed by the input.
|
||||
//! The timestamp is Actor-local monotonic time, not a Unix timestamp.
|
||||
|
||||
mod bindings {
|
||||
// This macro generates Rust ABI adapters at compile time from the
|
||||
// materialized local WIT graph. It does not make a remote protocol call or
|
||||
// embed the WIT source files; the Component carries canonical ABI types.
|
||||
wit_bindgen::generate!({
|
||||
path: "wit",
|
||||
world: "clock-probe-component",
|
||||
|
||||
@@ -4,12 +4,12 @@ schema_version = 1
|
||||
name = "wasmeld:clock"
|
||||
version = "0.1.0"
|
||||
source = "path+../../wit/clock"
|
||||
sha256 = "93079c69d1b9cb3afc28da6fe4a7e37f724d0a09e780c847f8524d3920a90960"
|
||||
sha256 = "43ece485a550eca94cf06cb711f0b42c9f4977d275e9a042c3ac84eeb1f941e1"
|
||||
replaced = true
|
||||
|
||||
[[package]]
|
||||
name = "wasmeld:service"
|
||||
version = "0.1.0"
|
||||
source = "path+../../wit/service"
|
||||
sha256 = "d5497307bbcd1e159f7707f385b488a6f2e26362d5256d5bc1080ac603a51305"
|
||||
sha256 = "1b2069606ccbf5202789667570bc824f702f34b147aa38e81c2ab677444ffa0e"
|
||||
replaced = true
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package component:clock-probe@0.1.0;
|
||||
|
||||
/// Base service exports plus the exact monotonic-clock Host capability used by
|
||||
/// this Component. Other Wasmeld capabilities are not linked implicitly.
|
||||
world clock-probe-component {
|
||||
include wasmeld:service/service-component@0.1.0;
|
||||
import wasmeld:clock/monotonic-clock@0.1.0;
|
||||
|
||||
Reference in New Issue
Block a user