Repository navigation
Mini 0.4.0
First prebuilt release of Mini: Kotlin compiled to native code (Kotlin to C17 to a native binary), with a memory model the compiler can check.
What it is
- The compiler is self-hosted:
minic-native(own parser, type checker, lowering and C backend, written in Kotlin) compiles itself, and stage 2 and stage 3 of the bootstrap are byte-identical. No JDK is needed to use it. - Memory model: reference counting by default (with RC elision), allocators as context parameters (Arena, Heap, Pool), and opt-in Strict mode (
@file:MemoryMode(Mode.Strict)) where leaks, double frees and use-after-free are compile errors. - Kotlin 1:1: classes, sealed/data/enum/object, interfaces, generics, lambdas, inline/reified, exceptions, extensions, ranges, collections and large parts of the stdlib. The stdlib is Kotlin source and ships in the tarball.
What is in the release
mini-<version>-<target>.tar.gzfor linux-x64, linux-arm64 and macos-arm64:bin/minic(minic build foo.kt -o foo),bin/minic-native,lib/libminirt.a,include/,stdlib/.mini-<version>-bootstrap-c.tar.gz: the generated C of the compiler plus the runtime sources; a C compiler alone builds a working compiler from it.SHA256SUMS. Install withcurl -fsSL https://raw.githubusercontent.com/HenrySchwerdt/mini/main/install.sh | sh.
Known gaps
- A C compiler (clang or gcc) is still needed at build time;
minicis a thin wrapper aroundminic-nativeandcc. - The Strict-mode checker and the
miniproject tool run on the JVM and are not part of the native release yet. - No Windows, no coroutines or async IO, no reflection or JSON yet. Strict-mode codegen and the stdlib on the memory model are in progress.