The Programmable Browser Platform
Features β’ Quick Start β’ Architecture β’ Docs β’ Contributing
FUJIN is not just another browser. It's a developer platform for building applications that augment, automate, and transform the web experience.
Think of it as:
Chrome DevTools meets VS Code Extensions meets Rust Safety
# Create your first module in seconds
fujin new my-module
cd my-module
fujin dev
# β Your module is running in the browserEvery module runs in a WebAssembly sandbox with:
- Memory isolation β Modules cannot access each other's memory
- Capability-based permissions β Fine-grained, auditable access control
- Crash resistance β A faulty module cannot crash the browser
- Fuel metering β Resource limits prevent runaway code
- Memory safety without garbage collection
- Predictable, high performance
- Modern tooling (
cargo,clippy,rustfmt) - Language-level security guarantees
Build anything:
- Password managers
- Ad blockers
- Developer tools
- AI assistants
- Automation scripts
- Page modifiers
We obsess over DX:
- Hot reload β See changes instantly
- Clear errors β Human-readable diagnostics
- Instant feedback β
fujin devand you're running - Great docs β Comprehensive guides and API references
# Install Rust (if needed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add WASM target
rustup target add wasm32-unknown-unknown# Clone the repository
git clone https://github.com/fujin-browser/fujin.git
cd fujin
# Build the browser
cargo build --release -p fujin-browser
# Build the CLI
cargo build --release -p fujin-cli# Create a new module
./target/release/fujin new hello-world
cd hello-world
# Build and run with hot reload
../target/release/fujin devuse fujin_sdk::prelude::*;
#[fujin_module]
#[derive(Default)]
pub struct HelloWorld;
impl Module for HelloWorld {
fn on_load(&self) -> ModuleInfo {
ModuleInfo::new("hello-world", "0.1.0", "My first module")
}
fn on_page_ready(&self) {
console::info!("Hello from FUJIN!");
// Access the DOM (requires permission)
if let Some(title) = dom::query_selector("title") {
console::info!("Page title: {}", title.text_content());
}
}
}FUJIN follows a micro-kernel architecture where the kernel remains minimal and all extensions happen through sandboxed WASM modules.
ββββββββββββββββββββββββββββββββββββββ
β PROGRAMMABLE BROWSER β
ββββββββββββββββββββββββββββββββββββββ€
β Applications (WASM Modules) β
β β β
β Module Runtime β
β β β
β Kernel β
β βββββββββ βββββββββ βββββββββββ β
β β Servo β β IPC β β Runtime β β
β βββββββββ βββββββββ βββββββββββ β
β βββββββββ βββββββββ βββββββββββ β
β βNetworkβ βWindow β βSecurity β β
β βββββββββ βββββββββ βββββββββββ β
ββββββββββββββββββββββββββββββββββββββ
fujin/
βββ kernel/ # Trust boundary (minimal, secure)
β βββ fujin-kernel/ # Core orchestration
β βββ fujin-servo/ # Rendering engine integration
β βββ fujin-process/ # Process management
β βββ fujin-ipc/ # Inter-process communication
β βββ fujin-network/ # Network stack
β βββ fujin-window/ # Window management
βββ runtime/ # Module execution
β βββ fujin-runtime/ # WASM executor (Wasmtime)
β βββ fujin-capability/# Permission system
β βββ fujin-lifecycle/ # Module lifecycle
βββ security/ # Security enforcement
β βββ fujin-security/ # Policy enforcement
β βββ fujin-crypto/ # Cryptographic primitives
βββ sdk/ # Developer interface
β βββ fujin-sdk/ # Module SDK
β βββ fujin-sdk-macros/# Procedural macros
βββ cli/ # Developer tools
β βββ fujin-cli/ # CLI application
βββ browser/ # Browser application
β βββ fujin-browser/ # Main entry point
βββ examples/ # Example modules
βββ docs/ # Documentation (mdBook)
FUJIN implements Zero Trust Security. Every module is assumed potentially malicious.
# fujin.toml
[permissions]
dom = { level = "read", scope = ["body", ".content"] }
network = { level = "scoped", scope = ["api.example.com"] }
storage = "local"
[permissions.denied]
filesystem = true
input_capture = true| Category | Levels | Description |
|---|---|---|
dom |
none, read, write | DOM access |
network |
none, scoped, full | HTTP requests |
storage |
none, local, sync | Persistent storage |
tabs |
none, read, manage | Tab information |
system |
none, limited, full | System APIs |
All permission requests are:
- β Human-readable
- β Auditable
- β Revocable at runtime
- Getting Started Guide β Installation and first module
- SDK Reference β Complete API documentation
- Architecture Guide β Deep dive into the platform
- Security Model β Understanding permissions
Build the documentation locally:
cargo install mdbook
cd docs/book
mdbook servefujin new <name> # Create a new module project
fujin init # Initialize module in current directory
fujin build # Build the module to WASM
fujin dev # Start dev server with hot reload
fujin validate # Validate module manifest
fujin package # Package for distribution
fujin doctor # Check development environmentFUJIN is built for builders:
- Rust developers exploring browser extensions
- Automation engineers building web scrapers and tools
- AI application developers creating browser-based agents
- Power users wanting programmatic browser control
- Developer tool creators building the next generation of dev tools
We're not (yet) targeting general consumers. We're building the foundation for those who build.
| Phase | Status | Description |
|---|---|---|
| M0 β Foundation | β | Project structure, dependencies |
| M1 β Window | β | Native window management |
| M2 β Rendering | β | WebView integration |
| M3 β Navigation | β | URL loading, history |
| M4 β Runtime | β | WASM execution (Wasmtime) |
| M5 β Capabilities | π | Permission system |
| M6 β DOM Bridge | β | Module β DOM communication |
| M7 β SDK & CLI | β | Developer tools |
| M8 β Browser UI | β | Tabs, toolbar, navigation |
| M9 β Ecosystem | β³ | Module registry, distribution |
We welcome contributions! Please see our Contributing Guide for details.
# Clone the repository
git clone https://github.com/fujin-browser/fujin.git
cd fujin
# Build everything
cargo build
# Run tests
cargo test
# Run the browser
cargo run -p fujin-browser -- --debug- Format with
cargo fmt - Lint with
cargo clippy - All crates use
#![forbid(unsafe_code)]where possible - Documentation is required (
#![warn(missing_docs)])
FUJIN is dual-licensed under:
Choose whichever license works best for your project.
FUJIN stands on the shoulders of giants:
- Servo β The original vision for a parallel browser engine
- Wasmtime β Secure, fast WebAssembly runtime
- wry β Cross-platform WebView
- Tokio β Async runtime for Rust
We're not building a browser. We're building the programmable runtime of the web.
β Star us on GitHub β’ π¬ Join Discord β’ π¦ Follow on Twitter
