New ARTIQ compiler, third iteration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wylited 35b6459c58 nac3core: replace paramter with parameter 12 months ago
nac3artiq nac3artiq: cleanup demo 12 months ago
nac3ast nac3ast/parser/core: use i128 for u64 constants 1 year ago
nac3core nac3core: replace paramter with parameter 12 months ago
nac3parser fix warnings 1 year ago
nac3standalone nac3standalone: fix broken test 1 year ago
nix windows: add wine-msys2-build 1 year ago
runkernel indentation 1 year ago
.gitignore build LLVM with Wine + MSYS2 1 year ago
Cargo.lock update dependencies 12 months ago
Cargo.toml update inkwell. Closes #67 1 year ago README: update Windows instructions 1 year ago
flake.lock update dependencies 12 months ago
flake.nix windows: create MSYS2 package 1 year ago
rustfmt.toml move rustfmt.toml upper 1 year ago


NAC3 is a major, backward-incompatible rewrite of the compiler for the ARTIQ physics experiment control and data acquisition system. It features greatly improved compilation speeds, a much better type system, and more predictable and transparent operation.

NAC3 has a modular design and its applicability reaches beyond ARTIQ. The nac3core module does not contain anything specific to ARTIQ, and can be used in any project that requires compiling Python to machine code.

WARNING: NAC3 is currently experimental software and several important features are not implemented yet.


NAC3 is packaged using the Nix Flakes system. Install Nix 2.4+ and enable flakes by adding experimental-features = nix-command flakes to nix.conf (e.g. ~/.config/nix/nix.conf).

Try NAC3


After setting up Nix as above, use nix shell git+ to get a shell with the NAC3 version of ARTIQ. See the examples directory in ARTIQ (nac3 Git branch) for some samples of NAC3 kernel code.


Install MSYS2, and open "MSYS2 MinGW x64". Edit /etc/pacman.conf to add:

SigLevel = Optional TrustAll
Server =

Then run the following commands:

pacman -Syu
pacman -S mingw-w64-x86_64-artiq

Install lld-msys2 manually:

mv ld.lld.exe C:/msys64/mingw64/bin

Note: This build of NAC3 cannot be used with Anaconda Python nor the binaries for Windows. Those Python versions are compiled with Visual Studio (MSVC) and their ABI is incompatible with the GNU ABI used in this build. We have no plans to support Visual Studio nor the MSVC ABI. If you need a MSVC build, please install the requisite bloated spyware from Microsoft and compile NAC3 yourself.

For developers

This repository contains:

  • nac3ast: Python abstract syntax tree definition (based on RustPython).
  • nac3parser: Python parser (based on RustPython).
  • nac3core: Core compiler library, containing type-checking and code generation.
  • nac3standalone: Standalone compiler tool (core language only).
  • nac3artiq: Integration with ARTIQ and implementation of ARTIQ-specific extensions to the core language.
  • runkernel: Simple program that runs compiled ARTIQ kernels on the host and displays RTIO operations. Useful for testing without hardware.

Use nix develop in this repository to enter a development shell. If you are using a different shell than bash you can use e.g. nix develop --command fish.

Build NAC3 with cargo build --release. See the demonstrations in nac3artiq and nac3standalone.