Skip to content
Rust Integration Beta

Auto × Rust

Use Auto as a scripting environment for Rust. Call any Rust code from AutoVM, or transpile Auto to production-grade Rust with A2R.

Deep Rust Integration

Any
Rust Code
AutoVM can call almost any Rust code directly.
A2R
Transpiler
Auto → Rust with behavior parity to AutoVM.
2
Stdlib Modes
Auto-native stdlib or Rust-native stdlib.
100%
Backend Freedom
Call any Rust crate from your Auto code.
Scripting

AutoVM as a Rust Scripting Environment

AutoVM is no longer just a language VM — it is a full Rust scripting environment.

  • Call any Rust code from Auto scripts
  • Hot reload — iterate on Rust logic without recompiling the host
  • Zero FFI boilerplate — AutoVM handles marshalling automatically
  • Embed Rust libraries as first-class Auto modules
script.at
use.rs std::path::PathBuf
use.rs std::time::Duration
let p = PathBuf.from("src/main.rs")
print(p)
let d = Duration.from_secs(5)
print(d)  // prints 5000ms
Transpilation

A2R Transpiler

Compile Auto to Rust with behavior parity to AutoVM. Ship production binaries from your Auto source.

  • Behavior parity — A2R output matches AutoVM semantics
  • Axum HTTP generation — #[api] → full Axum servers
  • Tauri IPC — #[tauri::command] and Channel support
  • Escape analysis — optimal borrow/clone/Rc selection
  • Merge mode — multi-file project transpilation
a2r output
// Auto source
fn add(a: int, b: int) -> int { a + b }
// Generated Rust
fn add(a: i64, b: i64) -> i64 { a + b }
Stdlib

Dual Standard Library Modes

Choose the stdlib that fits your deployment target.

  • Auto-native stdlib — io, net, http, fs, and more. Targets Rust today, Python and others tomorrow.
  • Rust-embedded mode — use Rust stdlib and any crates.io library directly. No re-implementation needed. Import with use.rs (the older use.rust spelling is deprecated).

Auto Stdlib

Portable across targets

Json.parse(data)

Rust Stdlib

Full crates.io access

use.rs std::net::TcpListener

Why Auto + Rust?

🚀

Scripting Speed

Write Rust-powered scripts in Auto without setting up a Cargo project for every task.

📦

Crate Ecosystem

Tap into crates.io without leaving Auto. Axum, Tokio, Serde — all accessible.

🔄

Iterative Workflow

Prototype in AutoVM, ship with A2R. Same code, two execution modes.

🛡️

Memory Safety

Auto's ownership system maps naturally to Rust's borrow checker.

⚡

Zero-Cost Abstraction

A2R generates idiomatic Rust with no runtime overhead.

🔧

Escape Analysis

Compiler picks borrow, clone, or Rc based on actual usage patterns.

Start using Auto with Rust

Read the design documents, run the cookbook examples, or try the Rust scripting mode in the Playground.

Released under the MIT License.