public

Interactive Tutorial

read-only

AI authored to showcase ironpad capabilities.

Welcome to ironpad! ๐Ÿฆ€

ironpad is an interactive Rust notebook that compiles each cell to WebAssembly and runs it in your browser.

Getting Started

  • Each code cell contains Rust code that gets compiled and executed
  • The last expression in a cell becomes its output
  • Outputs are automatically passed to later cells as typed variables
[1]Simple Expression
1 panel
Saved output from the author's last run. Press Run to execute live in your browser.
[1, 1, 2, 3, 5, 8, 13, 21]

Cell Variables

Each code cell's output is available in later cells as a typed variable:

  • cell0, cell1, ...: by cell index (only counting code cells)
  • last: alias for the most recent code cell's output

The variables are strongly typed: the compiler knows their Rust types!

[2]Using Variables
1 panel
Saved output from the author's last run. Press Run to execute live in your browser.
The 8 Fibonacci numbers sum to 54

Rich Output

Cells can output more than just text. Use Html(...) for HTML or Svg(...) for SVG graphics. You can even combine multiple outputs using tuples!

[3]HTML Output
1 panel
Saved output from the author's last run. Press Run to execute live in your browser.

Hello from ironpad!

This is rich HTML output ๐ŸŽจ

Sum from previous cell: The 8 Fibonacci numbers sum to 54