A window manager written in rust + yew compiled to web assembly.
Make sure you have wasm-pack installed
cargo install wasm-pack
And execute it
wasm-pack build --target web
Attach the required css file
<link rel="stylesheet" href="/static/waw.css">
Import the javascript glue module
import init, {Screen} from "/pkg/waw.js"; // Static (Inside another module)
const {default: init, Screen} = await import("./waw.js"); // Asynchronous
Run the init
function
await init();
Create a Screen
inside an html container element (currently only <body>
is really supported)
const screen = new Screen(document.body);
Register a window
const windowId = await screen.newWindow({title: "Some Window", dock: "left"});
See example/index.html
or pnp-zone for more.
For now see example/static/pnp-zone.css
as ref.