Rust

The rust-mos project is based on llvm-mos and llvm-mos-sdk and allows Rust programs to run on 6502. You may either build and install rust-mos from scratch by following the instructions here, or use a pre-build Docker image.

Using Docker from Visual Studio Code
By providing a  file, VSC can automatically launch a container for your project. See Hello World, mos-hardware, or other examples at the bottom of this page for how to set this up.

Using Docker from the terminal
Install and run Docker desktop and start the image from a terminal: This will start up a new container where  is mounted in   on the virtual machine. This will work regardless of your local architecture, but will run slower on e.g. arm-based systems as the image is prepared for x86. You may replace  with   for an arm-based build (see link below for building an image for arm64). If you have exited from the shell, you may return to the running container with: A stopped container can be started with:

Minimal Example
For a minimal example, see this github project. Here you will also find instructions of how to use the above Docker container from Visual Studio Code.

Other resources

 * Atari 800XL utility crate.
 * mos-alloc crate for heap allocation needed by e.g.  and.
 * mos-test crate providing alternative test harness that lets you write and run tests on all llvm-mos platforms
 * mos-hardware crate for Commodore targets like C64 and MEGA65 that allows named access to registers, raster interrupts etc. (examples). There's also a GitHub template for starting a new project.
 * How to build rust-mos Docker image for arm64 (faster on Apple silicon)
 * Example: Hello world.
 * Example: Atari Ferris Demo. See also emulation in browser.
 * Example: Advent of Code 2022 on Atari. 🎄