docs(wit): document capability and component contracts

This commit is contained in:
Maofeng
2026-07-30 08:13:24 +08:00
parent a1b808013a
commit 73d7c76446
28 changed files with 194 additions and 11 deletions
+7
View File
@@ -1,9 +1,16 @@
package wasmeld:clock@0.1.0;
/// Actor-local monotonic time for measuring elapsed durations.
interface monotonic-clock {
/// Returns nanoseconds elapsed since this Actor Store was created.
///
/// The value is monotonic and saturates at `u64::MAX`. It is not Unix time,
/// cannot be compared across Actor restarts, and must not be persisted as a
/// wall-clock timestamp.
now: func() -> u64;
}
/// Host-side world used by Wasmeld to link the clock implementation.
world clock-host {
import monotonic-clock;
}