Skip to content

Repository files navigation

Lanix

Status: archived prototype. Lanix is a research proof-of-concept that Loopwork built and is sharing as-is. It is not maintained — expect no updates, releases, or responses to issues and pull requests. Fork freely.

Lanix is a Rust-native environment inspired by Plan 9: processes, devices, services, namespaces, remote peers, and agents compose through one filesystem contract. The active implementation in this repository builds the lanix CLI.

Historical note: Lanix grows out of the original Wanix, which was implemented in Go, targeted running in the browser, and treated the browser as the runtime host. That project lives at https://github.com/tractordev/wanix/. In this repository and its docs, plain lanix refers to the Rust-native CLI/core; wanix still names that separate Go upstream.

What It Does

Runtime. Lanix owns task identity, namespaces, cwd/env/cmd, stdio/fds, exit status, and WASI filesystem semantics. qjs runs JavaScript through QuickJS/WASI, and wasm runs compiled wasm32-wasi modules as a second task runtime on the same substrate. turn runs a resident tier-1 task the host wakes one event at a time — snapshot it at any turn boundary, resume it in a fresh process, or fork one snapshot into divergent continuations. Terminals (#term) drive native and served qjs-shell sessions with filesystem/env builtins, child task launches, resize tracking, and lifecycle control.

Devices. Beyond #task and #term, service devices are plain filesystems: #kv for key/value state, #pipe for byte channels, #plumb for pub/sub, #cas for content-addressed storage, #watch for change-event streams, #sites for the host→route table behind served sites, and #agent for an LLM session as files — approvals as files, and under lanix agent every conversation retained as a durable transcript in ~/.lanix/agent-sessions.

Mesh. Lanix nodes import remote namespaces over the native FileSystem-over-iroh wire. Each node has a persisted ed25519 identity, attach is capability-gated, and devices import across the mesh because they are just filesystems. #cpu runs a task on a peer against the caller's reverse-exported namespace, and lanix capsule freezes a world into a portable CAS-backed snapshot.

Serve + cockpit. lanix serve exports Lanix filesystems over TCP/WebSocket/HTTP with a discovery document (lanix p9-stdio is the stdio export), plus direct-v86 and native QEMU handoffs. The browser cockpit is Rust-served: the operator Home plus a per-room Space of micro-app panes (--bundle workbench, crates/lanix-cli/src/serve/apex.rs + serve/portal.html) talking to the serve's /.lanix/portal/* HTTP+WS endpoints. The native lanix/fs/3 FileSystem WebSocket door serves agents, the CLI, and external clients; 9P (export9p) remains the foreign-edge gateway for Linux/v86/QEMU guests and external 9P tools.

Try It

Build and install the CLI once from the workspace root (the first build compiles the whole workspace — expect 3–6 minutes for the 34 workspace crates plus their dependencies, once; it is compiling, not hung, so pre-build the binary before any live demo). just install builds release and drops lanix in ~/.local/bin (put that on your PATH); see /reference/build-and-install for the in-place dev build + alias alternative:

just install
lanix qjs examples/qjs-demo.js
lanix qjs-term --stdin "hello terminal" examples/qjs-term-demo.js
printf 'write note.txt hello\nls\ncat note.txt\nexit\n' | lanix qjs-shell

Snapshot and fork a resident agent at a turn boundary:

printf 'add 5\nadd 7\n' | lanix turn run examples/turn-agent/agent.js --save-snapshot /tmp/agent.turnsnap
printf 'add 1\n' | lanix turn resume /tmp/agent.turnsnap    # turn 3: count=13
printf 'add 100\n' | lanix turn resume /tmp/agent.turnsnap  # turn 3: count=112 — a fork

Serve the browser cockpit:

mkdir -p /tmp/lanix-root
lanix serve --root /tmp/lanix-root --bundle workbench --lanix-services

Run the workspace gate:

just check

Project Map

The workspace crates and active ADR index are documented in AGENTS.md. The mesh's current shape is in docs/mesh-the-missing-half-of-9p.md (files at the core, 9P at the foreign edge); the original blueprint and the seven-slice build narrative live in docs/history/. Hands-on recipes live in docs/site/content/recipes/, and a longer manual walkthrough lives in rust-walkthrough.md.

Contributing

Start with CONTRIBUTING.md, then use just check before sending changes.

License

MIT

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages