How Rust reaches the VM

Zipp's pure-Rust parser (zipp-rsparse, #![forbid(unsafe_code)], zero dependencies) parses Rust 2021/2024 source into an AST. The frontend discovers Cargo.toml and src/lib.rs, loads multi-file mod foo; and #[path = "..."] trees, resolves use and cross-module pub use re-exports, expands macro_rules! and built-in macros, filters #[cfg(test)], and emits register bytecode directly.

Run Rust scripts, Cargo projects, tests and HTTP servers
zipp rs examples/rust/hello.rs [args...]
zipp rs examples/rust/issue_tracker

# Run sync and async #[test] functions
zipp rs --test examples/rust/issue_tracker

# Multi-threaded HTTP/1.1 worker server (with optional live reload)
zipp rs --serve 127.0.0.1:8080 examples/rust/issue_tracker
zipp rs --watch --serve 127.0.0.1:8080 examples/rust/issue_tracker

Language and backend coverage

The frontend ships with a full multi-file Cargo web application (examples/rust/issue_tracker) exercising Cargo.toml metadata, src/lib.rs re-exports, async fn HTTP handlers, JWT authentication, salted password hashing, JSON persistence and sync/async #[cfg(test)] suites.

  • Core Rust language: fn, async fn / async { ... } / .await on Zipp's native Promise/microtask engine, structs, enums, impl and trait (default methods, Self, &mut self with *self = ..., custom Iterator, From/TryFrom), #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Serialize, Deserialize)], #[serde(...)] attributes, closures (move, mutable captures, Box<dyn Fn>), full pattern matching (guards, @, slices, if let chains, let ... else), ? with automatic From conversion and declarative macro_rules!.
  • Macros: println!, format! (full std::fmt specifiers and inline {var}), vec!, assert*!, panic!, matches!, json!, include_str!, include_bytes!, env!, tokio::join!, tokio::try_join!, tokio::select!, anyhow!/bail!/ensure! and tracing log macros.
  • Backend ecosystem: std::fs, std::io, std::path, std::env, std::process, std::time, std::net, std::sync (Arc, Mutex, RwLock, OnceLock, Atomic*), serde_json, regex, argon2, jsonwebtoken, uuid, time/Utc::now(), zipp::kv::Store, http::Router and Axum 0.7 routing, extractors, middleware and WebSockets plus SQLx bridged over app.sql.*.

Native JIT and sandboxed WebAssembly

User Rust functions (__rs_fn_*) and integer for i in a..b / a..=b loops lower to unboxed Zipp register bytecode (LoadInt, Add, Sub, Mul, Lt, Le, AddInt, Call, Return) and compile natively on Zipp's x86-64 Tier-A and Tier-C JITs while the Rust runtime seed stays interpreted.

In the browser, zipp-0.0.37-javascript-rust.wasm (5,954,532 bytes raw, 1,466,783 bytes after Brotli-11) compiles out host filesystem, process and TCP networking under safe-sandbox, substituting an in-memory binary-safe VFS overlay (RustProgramConfig::vfs) and Axum/SQLx worker-boot dispatch over host-owned addAppBridge capabilities.