1
0
forked from M-Labs/nac3
New ARTIQ compiler, third iteration
Go to file
2021-12-19 18:01:49 +08:00
llvm remove a small amount of LLVM bloat 2021-12-08 17:41:34 +08:00
nac3artiq update kernel-only attribute annotation 2021-12-19 11:04:53 +08:00
nac3ast fix clippy warnings 2021-11-06 23:00:18 +08:00
nac3core nac3core: fix for loop type inference 2021-12-19 18:01:49 +08:00
nac3parser nac3parser: modify parser to handle negative integer edge cases 2021-12-03 16:35:58 +08:00
nac3standalone update kernel-only attribute annotation 2021-12-19 11:04:53 +08:00
runkernel runkernel: improve print_int debug functions 2021-11-19 12:39:57 +08:00
.gitignore nac3embedded: basic source extraction 2020-12-18 23:45:09 +08:00
Cargo.lock nac3artiq: embed linker script, put intermediate objects in temp dir 2021-11-06 13:04:00 +08:00
Cargo.toml integrate nac3parser 2021-11-03 17:11:00 +08:00
flake.lock flake: update nixpkgs and work around openssh cross compilation breakage. Closes #123 2021-12-08 21:21:37 +08:00
flake.nix flake: update nixpkgs and work around openssh cross compilation breakage. Closes #123 2021-12-08 21:21:37 +08:00
README.md README: update 2021-12-13 19:02:46 +08:00

NAC3

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.

Packaging

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 github:m-labs/artiq/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.

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.