The Dragon SDK is the Mica compiler’s backend, published as a deliverable: one C header and one static archive, behind which sit control-flow analysis, an SSA middle-end, storage placement, register allocation, and native emission for x86-64 and ARM64. A compiler front end written in any language hands it an intermediate-code unit and gets optimized native code back — the same engine that compiles Mica, not a reduced version of it. The announcement tells the whole story, and Build a compiler with Mica is the guided course built on it. This page is the practical part: the licence, the download, and the check that it works.
The SDK is an add-on to the compiler, not a replacement for it — and it needs
the compiler even if your frontend is written in C and never runs mica: the
programs your frontend produces are linked against the Mica
standard-library archive, which the compiler package installs — the runtime
the emitted code starts in and calls. That is why the SDK package depends on
mica and pins the exact version it was built with, so apt keeps the pair
consistent. Install the compiler first.
The licence, before the download
The compiler and the SDK ship under different licences, and this is the one place in the Mica ecosystem where that matters. Mica itself is free for every purpose, commercial work included — that does not change. The Dragon SDK is licensed under the PolyForm Noncommercial License 1.0.0:
| Mica compiler | Dragon SDK | |
|---|---|---|
| Package | mica | mica-dragon-sdk |
| Licence | free for every purpose, commercial work included | PolyForm Noncommercial 1.0.0 |
| Free for | anything | research, teaching, personal study, hobby projects; educational, charitable, public-research and government institutions |
| Commercial use | included | separate written agreement — info@mica-dev.com |
Anyone may try it. Install it, read the header, write a front end, run the
course — for study or your own interest, that is inside the free grant. If it
is work for a company, including internal work toward a commercial product,
write to us first and we will sort it out with you. The full licence text
installs at /usr/share/doc/mica-dragon-sdk/copyright.
Zero-install: the container
The container image deliberately does not carry the SDK — taking a licence should be a decision, not something that happens to you. One command inside the image prints the terms, waits for your answer, and then installs the two files:
mica-install-sdkEverything below is the native installation.
Download
The licence is not the compiler's. Mica itself is free for every purpose, commercial work included. The Dragon SDK is licensed under the PolyForm Noncommercial License 1.0.0: free for research, teaching, personal study, hobby projects, and for educational, charitable, public research and government institutions — and any commercial use requires a separate written agreement. Write to info@mica-dev.com before you begin, and we will sort it out with you. Downloading it means accepting those terms.
Version 6.12.8, built from commit 6aaa3230.
Verify a download with sha256sum against the hash above.
Install
# from the directory holding the .deb, with the mica package already installed
sudo apt install ./mica-dragon-sdk_<version>_<arch>.debThe package depends on mica at the same version, so apt refuses a mismatch
instead of letting an archive meet a compiler that believes something else.
When you upgrade the compiler, upgrade the SDK in the same command.
Check it worked
The smallest honest check is a C program that opens a Dragon session and closes
it again. Save this as probe.c:
#include <mica_dragon.h>
#include <stdio.h>
int main(void) {
drg_ctx session;
if (dragon_context_new(&session) != 0) return 1;
dragon_context_free(session);
puts("dragon: ready");
return 0;
}and build it against the archive — <arch> is amd64 or arm64, matching
your machine:
gcc -std=c23 probe.c /usr/lib/libmicadragon-<arch>.a -lpthread -o probe
./probeYou should see dragon: ready. From here, the course’s
chapter 2 builds and runs a complete
compiler against the same two files.
From Mica the engine is reached by import instead — imp ContextNew, UnitNew : dragon; — and no header is involved: the dragon surface is embedded in the
compiler, so a Mica front end compiles and type-checks without the SDK
installed. Only the link asks for the archive, and names the missing file if it
is not there. What that surface contains is the installed
dragon-engine.json — the Mica-side counterpart of reading the header.
What gets installed
| Path | |
|---|---|
/usr/lib/libmicadragon-<arch>.a | the backend engine as a static archive |
/usr/include/mica_dragon.h | the whole consumer surface, one header |
/usr/share/doc/mica-dragon-sdk/dragon-engine.json | the curated dragon import surface, as a file you can read — held byte-identical to what the compiler embeds |
/usr/share/doc/mica-dragon-sdk/copyright | the licence text |
Nothing else — no shared libraries, no daemon, no configuration. Removing the package removes the SDK completely.
See also
- The Dragon SDK announcement — what it is and why we published it
- Build a compiler with Mica — the eleven-chapter course on the shipped example
- Installing Mica — the compiler this package installs beside
- Licensing — the compiler’s own licence, free for any use