diff --git a/src/lib.rs b/src/lib.rs index adc224d..1bfbd0f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,3 +2,4 @@ pub const WASM_RPC_WIT: &str = include_str!("../wit/deps/wasm-rpc/wasm-rpc.wit"); pub const WASI_POLL_WIT: &str = include_str!("../wit/deps/io/poll.wit"); +pub const WASI_WALL_CLOCKS_WIT: &str = include_str!("../wit/deps/clocks/wall-clock.wit"); diff --git a/wit/deps/golem-1.1/golem-host-1.1.wit b/wit/deps/golem-1.x/golem-host.wit similarity index 99% rename from wit/deps/golem-1.1/golem-host-1.1.wit rename to wit/deps/golem-1.x/golem-host.wit index 60c6f0e..c6560fa 100644 --- a/wit/deps/golem-1.1/golem-host-1.1.wit +++ b/wit/deps/golem-1.x/golem-host.wit @@ -1,9 +1,9 @@ -package golem:api@1.1.1; +package golem:api@1.1.2; /// The Golem host API provides low level access to Golem specific features such as promises and control over /// the durability and transactional guarantees the executor provides. interface host { - use golem:rpc/types@0.1.1.{uri}; + use golem:rpc/types@0.1.2.{uri, wit-value}; use wasi:clocks/monotonic-clock@0.2.0.{duration}; /// An index into the persistent log storing all performed operations of a worker diff --git a/wit/deps/golem-1.1/golem-oplog-processor-1.1.wit b/wit/deps/golem-1.x/golem-oplog-processor.wit similarity index 96% rename from wit/deps/golem-1.1/golem-oplog-processor-1.1.wit rename to wit/deps/golem-1.x/golem-oplog-processor.wit index 30485b1..b37310b 100644 --- a/wit/deps/golem-1.1/golem-oplog-processor-1.1.wit +++ b/wit/deps/golem-1.x/golem-oplog-processor.wit @@ -1,8 +1,8 @@ -package golem:api@1.1.1; +package golem:api@1.1.2; interface oplog-processor { use wasi:clocks/wall-clock@0.2.0.{datetime}; - use golem:rpc/types@0.1.1.{wit-value}; + use golem:rpc/types@0.1.2.{wit-value}; use host.{account-id, component-id, oplog-index, worker-id, worker-metadata}; use oplog.{oplog-entry}; diff --git a/wit/deps/golem-1.1/golem-oplog-1.1.wit b/wit/deps/golem-1.x/golem-oplog.wit similarity index 99% rename from wit/deps/golem-1.1/golem-oplog-1.1.wit rename to wit/deps/golem-1.x/golem-oplog.wit index f896640..8cd6246 100644 --- a/wit/deps/golem-1.1/golem-oplog-1.1.wit +++ b/wit/deps/golem-1.x/golem-oplog.wit @@ -1,9 +1,9 @@ -package golem:api@1.1.1; +package golem:api@1.1.2; /// Host interface for enumerating and searching for worker oplogs interface oplog { use wasi:clocks/wall-clock@0.2.0.{datetime}; - use golem:rpc/types@0.1.1.{wit-value}; + use golem:rpc/types@0.1.2.{wit-value}; use host.{account-id, component-version, oplog-index, retry-policy, uuid, worker-id}; diff --git a/wit/deps/golem-durability/golem-durability-1.2.wit b/wit/deps/golem-durability/golem-durability-1.2.wit index 5653234..634e7a7 100644 --- a/wit/deps/golem-durability/golem-durability-1.2.wit +++ b/wit/deps/golem-durability/golem-durability-1.2.wit @@ -2,10 +2,10 @@ package golem:durability@1.2.0; interface durability { - use golem:api/host@1.1.1.{persistence-level}; - use golem:api/oplog@1.1.1.{oplog-index, wrapped-function-type}; + use golem:api/host@1.1.2.{persistence-level}; + use golem:api/oplog@1.1.2.{oplog-index, wrapped-function-type}; use wasi:clocks/wall-clock@0.2.0.{datetime}; - use golem:rpc/types@0.1.1.{value-and-type}; + use golem:rpc/types@0.1.2.{value-and-type}; type durable-function-type = wrapped-function-type; diff --git a/wit/deps/golem/golem-host.wit b/wit/deps/golem/golem-host.wit index 017a30f..da3ffa3 100644 --- a/wit/deps/golem/golem-host.wit +++ b/wit/deps/golem/golem-host.wit @@ -1,9 +1,9 @@ -package golem:api@0.2.0; +package golem:api@0.2.1; /// The Golem host API provides low level access to Golem specific features such as promises and control over /// the durability and transactional guarantees the executor provides. interface host { - use golem:rpc/types@0.1.1.{uri}; + use golem:rpc/types@0.1.2.{uri}; use wasi:clocks/monotonic-clock@0.2.0.{duration}; /// An index into the persistent log storing all performed operations of a worker diff --git a/wit/deps/wasm-rpc/wasm-rpc.wit b/wit/deps/wasm-rpc/wasm-rpc.wit index fda44c4..bce9bbc 100644 --- a/wit/deps/wasm-rpc/wasm-rpc.wit +++ b/wit/deps/wasm-rpc/wasm-rpc.wit @@ -1,6 +1,7 @@ -package golem:rpc@0.1.1; +package golem:rpc@0.1.2; interface types { + use wasi:clocks/wall-clock@0.2.0.{datetime}; use wasi:io/poll@0.2.0.{pollable}; type node-index = s32; @@ -93,6 +94,9 @@ interface types { invoke: func(function-name: string, function-params: list) -> result<_, rpc-error>; async-invoke-and-await: func(function-name: string, function-params: list) -> future-invoke-result; + + /// Schedule invocation for later + schedule-invocation: func(scheduled-time: datetime, function-name: string, function-params: list) -> (); } resource future-invoke-result {