mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-26 17:03:09 +00:00
- examples/org.weft.demo.counter: stateless counter Wasm component using weft:app/ipc for increment/decrement/reset; built for wasm32-wasip2 with wit-bindgen 0.53; dark-themed HTML UI - examples/org.weft.demo.notes: persistent notes Wasm component using weft:app/ipc + WASI preopened /data dir (fs:rw:app-data); save/load via newline-delimited IPC protocol; HTML textarea UI - examples/keys/: committed demo Ed25519 keypair; both packages signed with weft-pack sign - workspace Cargo.toml: exclude examples from workspace members (they target wasm32-wasip2, not the host toolchain) - SERVO_PIN.md: update deps section and document shell-client display sharing resolved in full description of connect_with_display implementation
38 lines
745 B
Text
38 lines
745 B
Text
package weft:app@0.1.0;
|
|
|
|
interface notify {
|
|
ready: func();
|
|
}
|
|
|
|
interface ipc {
|
|
send: func(payload: string) -> result<_, string>;
|
|
recv: func() -> option<string>;
|
|
}
|
|
|
|
interface fetch {
|
|
record response {
|
|
status: u16,
|
|
content-type: string,
|
|
body: list<u8>,
|
|
}
|
|
|
|
fetch: func(
|
|
url: string,
|
|
method: string,
|
|
headers: list<tuple<string, string>>,
|
|
body: option<list<u8>>,
|
|
) -> result<response, string>;
|
|
}
|
|
|
|
interface notifications {
|
|
notify: func(
|
|
title: string,
|
|
body: string,
|
|
icon: option<string>,
|
|
) -> result<_, string>;
|
|
}
|
|
|
|
interface clipboard {
|
|
read: func() -> result<string, string>;
|
|
write: func(text: string) -> result<_, string>;
|
|
}
|