|Sebastien Bourdeauducq adadf56e2b||2 days ago|
|nac3artiq||1 month ago|
|nac3ast||3 months ago|
|nac3core||2 weeks ago|
|nac3ld||2 months ago|
|nac3parser||3 months ago|
|nac3standalone||2 days ago|
|nix||2 weeks ago|
|runkernel||3 months ago|
|.gitignore||2 weeks ago|
|Cargo.lock||2 days ago|
|Cargo.toml||3 months ago|
|README.md||2 weeks ago|
|flake.lock||4 days ago|
|flake.nix||4 days ago|
|nac3.svg||2 years ago|
|rustfmt.toml||2 years 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.8+ and enable flakes by adding
experimental-features = nix-command flakes to
After setting up Nix as above, use
nix shell git+https://github.com/m-labs/artiq.git?ref=nac3 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 CLANG64". Edit
/etc/pacman.conf to add:
[artiq] SigLevel = Optional TrustAll Server = https://msys2.m-labs.hk/artiq-nac3
Then run the following commands:
pacman -Syu pacman -S mingw-w64-clang-x86_64-artiq
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).
nac3ld: Minimalist RISC-V and ARM linker.
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.
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