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 stands alone — a frontend written in C never needs the Mica compiler
installed. What it does need is the Dragon runtime, the mica-dragon-rt
package: the floor the programs your frontend produces start in and call.
The standard library above that floor is yours to bring — a frontend ships its
own, the way the course’s PL/0 compiler ships its one-function pl0-stdlib.c,
or imports straight from libc. The SDK package therefore depends on
mica-dragon-rt and pins the exact version it was built with, so apt keeps
the pair consistent; the Mica compiler is suggested only for writing your
frontend in Mica.
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 runtime | Dragon SDK | |
|---|---|---|---|
| Package | mica | mica-dragon-rt | mica-dragon-sdk |
| Licence | Mica Compiler License 1.0 | Mica Runtime License 1.0 | PolyForm Noncommercial 1.0.0 |
| Free for | anything, commercial work included | anything — and binaries linked against it carry no terms from it | research, teaching, personal study, hobby projects; educational, charitable, public-research and government institutions |
| Commercial use | included | included; a toolchain of your own may ship the unmodified archives | 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 7.2.0, built from commit 9ebcec52.
Verify a download with sha256sum against the hash above.
Install
# from the directory holding both .deb files - no compiler package required
sudo apt install ./mica-dragon-sdk_<version>_<arch>.deb ./mica-dragon-rt_<version>_<arch>.debThe SDK depends on the Dragon runtime at the same version, so apt refuses a
mismatch instead of letting an archive meet a floor that believes something
else. If the Mica compiler is installed too, its own mica-dragon-rt
dependency is the same package — one floor serves every road. When you
upgrade any of them, upgrade all 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
The SDK pair on disk — and, when the Mica compiler is installed beside them, its two files complete the picture:
/usr/lib/
├── libmicadragon-<arch>.a the backend engine (mica-dragon-sdk)
├── libmicadragon-rt-<arch>.a the Dragon runtime (mica-dragon-rt)
├── libmicadragon-rt-fixedarena-<arch>.a … freestanding memory class
├── libmicadragon-rt-mc-<arch>.a … multicore tasking
└── libmicadragon-rt-fixedarena-mc-<arch>.a … both
/usr/include/
└── mica_dragon.h the whole consumer surface, one header
/usr/share/doc/
├── mica-dragon-rt/copyright Mica Runtime License 1.0
└── mica-dragon-sdk/
├── copyright PolyForm Noncommercial 1.0.0
└── dragon-engine.json the curated `dragon` import surface, as a
file you can read — held byte-identical to
what the compiler embeds
only with the mica package installed beside them:
/usr/bin/mica the compiler driver (mica)
/usr/lib/mica-stdlib-<arch>.a Mica's own standard library (mica)Nothing else — no shared libraries, no daemon, no configuration. Your frontend links the engine archive; the programs it emits link the runtime archives plus whatever standard library you ship. Removing the packages removes everything.
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