Skip to content

Hypijump31/FUJIN-BROWSER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FUJIN

FUJIN

The Programmable Browser Platform

Features β€’ Quick Start β€’ Architecture β€’ Docs β€’ Contributing

Project Status License Rust Version Discord


What is FUJIN?

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 browser

✨ Features

πŸ”’ WASM-First Security

Every 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

πŸ¦€ Built in Rust

  • Memory safety without garbage collection
  • Predictable, high performance
  • Modern tooling (cargo, clippy, rustfmt)
  • Language-level security guarantees

🧩 Everything is a Module

Build anything:

  • Password managers
  • Ad blockers
  • Developer tools
  • AI assistants
  • Automation scripts
  • Page modifiers

πŸš€ Developer Experience

We obsess over DX:

  • Hot reload β€” See changes instantly
  • Clear errors β€” Human-readable diagnostics
  • Instant feedback β€” fujin dev and you're running
  • Great docs β€” Comprehensive guides and API references

🎯 Quick Start

Prerequisites

# Install Rust (if needed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Add WASM target
rustup target add wasm32-unknown-unknown

Install FUJIN

# 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 Your First Module

# Create a new module
./target/release/fujin new hello-world
cd hello-world

# Build and run with hot reload
../target/release/fujin dev

Example Module

use 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());
        }
    }
}

πŸ—οΈ Architecture

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 β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Project Structure

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)

πŸ” Security Model

FUJIN implements Zero Trust Security. Every module is assumed potentially malicious.

Capability-Based Permissions

# 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

Permission Categories

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

πŸ“– Documentation

Build the documentation locally:

cargo install mdbook
cd docs/book
mdbook serve

πŸ› οΈ CLI Reference

fujin 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 environment

🎯 Who is FUJIN For?

FUJIN 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.

πŸ—ΊοΈ Roadmap

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

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# 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

Code Style

  • Format with cargo fmt
  • Lint with cargo clippy
  • All crates use #![forbid(unsafe_code)] where possible
  • Documentation is required (#![warn(missing_docs)])

πŸ“œ License

FUJIN is dual-licensed under:

Choose whichever license works best for your project.

πŸ™ Acknowledgments

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

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages