A reactive notebook environment for Rust.
Venus lets you write Rust notebooks as regular .rs files with full IDE support. Cells are functions marked with #[venus::cell], and dependencies between cells are automatically inferred from function parameters.
Venus executes arbitrary Rust code with full system access.
- ✅ Safe for: Local development, testing, learning
- ❌ NOT safe for: Production, shared servers, untrusted code
- 🔒 Cloud deployments: Providers MUST use containers/VMs for isolation
Venus provides NO sandboxing. Cells can access files, network, and spawn processes. You are responsible for running Venus in a secure environment.
See SECURITY.md for details.
- Interactive web UI - Monaco editor with syntax highlighting, cell outputs, and execution status
- Native Rust files - Write notebooks as
.rsfiles with full rust-analyzer support - Reactive dependency tracking - Dependent cells marked dirty when upstream changes
- Fast compilation - Cranelift codegen backend with smart caching (only recompiles when source changes)
- Hot reload - Run modified cells instantly without losing state from other cells
- Markdown cells - Full markdown support with syntax highlighting, images, and links
- Interactive widgets - Sliders, text inputs, dropdowns, and checkboxes
- Rich output - Render HTML, images, tables, and custom formats
- Jupyter export - Generate
.ipynbfiles for GitHub preview
Venus supports rich markdown cells with full GitHub Flavored Markdown syntax:
- Text formatting - Bold, italic, code blocks with syntax highlighting
- Links and images - External URLs and embedded images
- Code blocks - Multi-language syntax highlighting
- Lists and tables - Organized documentation
# Install Venus
cargo install venus
# Create a new notebook (adds to Cargo.toml for LSP support)
venus new my_notebook
# Or create as workspace member
venus new my_notebook --workspace
# Run the notebook
venus run my_notebook.rs
# Start the interactive server
venus serve my_notebook.rsVenus automatically creates/updates Cargo.toml to enable rust-analyzer LSP support.
Then open http://localhost:8080 in your browser.
use venus::prelude::*;
/// Configuration for the analysis
#[venus::cell]
pub fn config() -> Config {
Config { count: 10 }
}
/// Generate squared numbers
#[venus::cell]
pub fn numbers(config: &Config) -> Vec<i32> {
(1..=config.count).map(|i| i * i).collect()
}
/// Calculate the sum
#[venus::cell]
pub fn total(numbers: &Vec<i32>) -> i32 {
numbers.iter().sum()
}| Command | Description |
|---|---|
venus run <notebook> |
Execute notebook headlessly |
venus serve <notebook> |
Start interactive web server |
venus sync <notebook> |
Generate .ipynb file |
venus build <notebook> |
Build standalone binary |
venus new <name> |
Create new notebook |
venus export <notebook> |
Export to standalone HTML |
venus watch <notebook> |
Auto-run on file changes |
See the docs directory for detailed documentation:
- Installation - Platform-specific setup instructions
- Getting Started - Create your first notebook
- How It Works - Internal execution model and architecture
- API Reference - Build custom frontends
- Deployment - Production deployment options
- Cells - Cell syntax and dependencies
- Widgets - Interactive inputs
- CLI Reference - Command-line interface
- Render Trait - Custom output formatting
- API Stability - Versioning and breaking change policy
# Install stable Rust
rustup install stable
# Install nightly + Cranelift backend (required for fast compilation)
rustup install nightly
rustup component add rustc-codegen-cranelift-preview --toolchain nightly
# Run tests
cargo test --workspace
# Lint
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warningsNote: The Cranelift codegen backend is used for fast debug compilation of notebook cells. Integration tests require nightly with the Cranelift component installed. Tests run on Linux, macOS, and Windows.
Contributions are welcome! Please feel free to submit issues and pull requests.
Licensed under the Apache License, Version 2.0. See LICENSE for details.


