For the complete documentation index, see llms.txt
Compact toolchain 0.30.0
- Date: 2026-03-17
- Language version: 0.22.0
- Compact runtime version: 0.15.0
- Environment: Preview Testnet at time of release. For the full compatibility matrix, see the release notes overview
High-level summary
In version 0.30, the Compact toolchain now targets Midnight ledger version 8. Previous toolchain versions (e.g., 0.28 and 0.29) targeted ledger version 7. If you are compiling contracts for a ledger 8 blockchain, you should use Compact toolchain 0.30 or later. Earlier versions might work but these are untested and unsupported, and have known bugs. If you are compiling contracts for a ledger 7 blockchain, you must use Compact toolchain 0.29 or an earlier compatible one.
There is an accompanying Compact devtools release, version 0.5.0. You do not have to update the Compact devtools in order to use Compact toolchain version 0.30.0. However, the devtools update comes with some new features. If you have the devtools already installed, you can update them with the command compact self update. If you do not have the devtools already installed, you can install them with the curl command at https://github.com/midnightntwrk/compact/releases/tag/compact-v0.5.0.
Audience
These release notes are intended for Compact smart contract developers and for DApp developers who use the Compact runtime.
What changed
This release targets the new version of the Midnight ledger, version 8.0. The primary advantage is that this version of the blockchain has fixes for a number of bugs that were affecting users. In addition:
- The compiler supports
--ledger-versionand--runtime-versionflags - The compiler and fixup tool now support
--compact-pathand--trace-searchflags - The standard library
NativePointtype is renamed toJubjubPoint - It is a compiler error to use
persistentHashandpersistentCommiton JavaScript opaque values - There is a new search order for include files and modules imported from files
- The language reference is now largely up to date with the current version of the language
- The release notes are included in the release itself
New features
The compiler now supports --ledger-version and --runtime-version flags. The compiler and fixup tool now support --compact-path and --trace-search flags. The release notes are now included in the release itself.
Ledger and runtime version flags
Description: The compiler binary can now report the Midnight ledger version it targets, via a new --ledger-version flag. It can also now report the Compact runtime version that it will import in generated JavaScript code, via a new --runtime-version flag.
Compact smart contracts are currently compiled for a specific version of the Midnight ledger. The ledger version determines, for example, the format of the public state and the format of prover and verifier keys. Smart contracts will not in general work with a different ledger major version number than the one that they were compiled for.
The compiler can report the ledger version it targets with a new --ledger-version flag, for instance:
$ compact compile --ledger-version
ledger-8.0.0
The ledger version will correspond to a tag (or possibly a Git commit hash or branch name) from the Midnight ledger GitHub repository.
Compiler-generated JavaScript code imports a specific version of the Compact runtime to provide core language features. Until it reaches version 1.0, the Compact runtime may have breaking changes in new minor version numbers, so it is important to configure DApps to use the correct Compact runtime version. The generated JavaScript code will verify that it is using the expected version.
The compiler can report the Compact runtime version that will be imported with a new --runtime-version flag, for instance:
$ compact compile --runtime-version
0.15.0
The Compact runtime package is available from npm.
Other Compact toolchain tools, such as the format and fixup tools, do not depend on the ledger or runtime version so they will not understand these flags.
Search path flags
Description: The compiler and fixup tool now support a --compact-path flag whose value is a search path. If this flag is set, its value is used as the search path and the COMPACT_PATH environment variable is ignored. Both tools support a new --trace-search flag that will show on standard error the search order for included and imported files.
Release notes distributed with the release
Description: the release notes are distributed in the release .zip file as a Markdown document. They were previously available from the Midnight developer documentation, in the Compact release repository, and in the Minokawa project's Compact repository. Now they are also included in the .zip file artifacts that form the release.
The Compact devtools will unzip the artifacts into a subdirectory of its artifact directory. The devtools artifact directory is .compact in your home directory by default, but it can be changed by the COMPACT_DIRECTORY environment variable or the --directory command line flag to the compact devtool command.
So for example, for Apple silicon macOS, and if the default artifact directory is used, the release notes for this release will be found in ~/.compact/versions/0.30.0/aarch64-darwin/toolchain-0.30.0.md.