Skip to content

Overview

Magnetite is a model-based development tool for safety-critical embedded software written in Rust. You build discrete-time control models on a canvas, in text, or both at once, and compile them to clean, dependency-free Rust, with simulation, export and traceability built in.

The name covers three things:

  1. The magscript language, a domain-specific language for synchronous data-flow models. Every diagram you draw is magscript underneath, and you can write it by hand instead.
  2. The magnet CLI, which holds:
    • the compiler and the simulator;
    • the sync between a diagram and its text;
    • the exports;
    • the editor’s server.
  3. The editor, a browser-based block-diagram editor served by magnet itself, where you build, simulate and deploy.

A project lives on your disk, defined by its Magnet.toml as a Rust crate is by its Cargo.toml. Nothing is stored in the cloud: magnet reaches the network to activate a license and to let cargo fetch dependencies, and for nothing else. You keep your projects under your own version control, which the plain-text magscript and the JSON layout files are made for.

  1. Install magnet with the command your dashboard shows for your seat, then:

    Terminal window
    magnet new hello && cd hello
    magnet gui

    Your browser opens on a live canvas. Place blocks, wire a feedback loop, press Run, and watch the probed signals plot. The quickstart walks you through it in five minutes.

  2. The guides build real controllers feature by feature, with copyable magscript throughout.

  3. The reference answers targeted questions about:

    • the magnet CLI;
    • Magnet.toml;
    • the magscript language;
    • every built-in block.
A PID feedback loop on the magnet gui canvas beside the .mag text it wrote: the model, the step, and the params block

The canvas and the text are one artifact: everything the mouse does is written into your package’s .mag, and everything you type there renders back onto the canvas.