ml-rust
venus
Rust

Reactive notebook environment for Rust that uses standard .rs files. Features process isolation, hot reloading, and instant compilation via Cranelift.

Last updated Jul 3, 2026
37
Stars
2
Forks
0
Issues
+1
Stars/day
Attention Score
56
Language breakdown
Rust 85.7%
JavaScript 10.0%
CSS 3.2%
HTML 0.8%
Shell 0.3%
Files click to expand
README

Venus

Venus

A reactive notebook environment for Rust.

License

What is Venus?

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 Web UI

⚠️ Security Warning

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.

Features

  • Interactive web UI - Monaco editor with syntax highlighting, cell outputs, and execution status
  • Native Rust files - Write notebooks as .rs files 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 .ipynb files for GitHub preview

Markdown Support

Venus supports rich markdown cells with full GitHub Flavored Markdown syntax:

Markdown Features

  • 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

Quick Start

# 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.rs

Venus automatically creates/updates Cargo.toml to enable rust-analyzer LSP support.

Then open http://localhost:8080 in your browser.

Example

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

CLI Commands

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

Documentation

See the docs directory for detailed documentation:

Development Setup

# 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 warnings
Note: 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.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

🔗 More in this category

© 2026 GitRepoTrend · ml-rust/venus · Updated daily from GitHub