UPDATE: see examples and ask questions at the official GH repo github.com/Suzhou-Tongyuan/JuliaCon2024-JuliaAOT.
This is an unofficial announcement of the Julia AOT compiler (SyslabCC) created by Suzhou-Tongyuan, and I am the one who lead the compiler team and designed the architecture.
This compiler is now integrated into MWORKS.Syslab, and you can find the documentations for the compiler at SyslabCC. Unfortunately, it is written in Chinese due to our bandwidth, and I hope our circumstance not bother you much.
As an overview, I’d give as follow the features that the community would probably care about:
-
SyslabCC converts Julia programs into small binaries (executable or shared libs), these binaries are small (1~2MB for small projects) and do not depend on libjulia.
-
SyslabCC supports full multiple-dispatch, but limited to a type-stable subset.
-
SyslabCC supports full Julia syntax (this is obvious as we started at the IR level).
-
SyslabCC supports full try-catch usage. Rasing errors using
throw
,error
and other functions are fine, but printing stacktrace programmatically is still WIP. -
SyslabCC supports
const
global variables (actually, we now support converting any complex structures into C/C++ static variables, no matter for stack/heap memory). -
SyslabCC supports a wide range of Julia libraries with good type-stability, i.e., Base, LinearAlgebra, FFTW, SpecialFunctions, DataStructures, Unitful, etc. Support for these libraries might not perfect, as even Julia Stdlib use a lot of type-unstable code.
-
SyslabCC supports heap allocation and
mutable struct
. -
SyslabCC supports type-stable
ccall
.@cfunction
is not released for the current version but partially supported at ourdev
branch. For bits only types/recursively stack-allocated types, the behavior should match the vanilla Julia. -
SyslabCC supports calling into blas, so
a * b
is supported and optimized by open-blas, MKL or other blas impl compatible to libblastrampoline. -
SyslabCC supports cross compilation from Windows to Linux, currently when cross-compilation you cannot reference any shared libraries at the local machine.
--no-blas
option is required to disable linking blas. -
Compile-time computations and macros are fully supported (you could use MLStyle for type-stable cases
However, there are also many restrictions to the compiler (and also the small runtime bundled). The major obstacles might be the mandatory requirement for type safety. Task
-based async is missing, and multi-threading is missing. Besides, several special language constructs are not supported, including but not limited to self-recursive struct
s and llvmcall
.
Several meaningful (EDIT: fix link) examples are given in the documentations. For instance, you could write use Julia to write heat equations, create a minimal shared library, and use it in Python: Heat Equation 2D: Calling Julia AOT Libraries from Python.
Due to my extremeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee workload, I can’t attend JuliaCon in person. Hence, I will make some video and exemplar GH repositories to show the design, roadmap and usage of this Julia AOT compiler.
Besides, I hope you might not get blocked when accessing SyslabCC. Applying for a personal/educational license is required but it seems things need to be done in Chinese pages…
(Easter eggs: you might find some .NET things in the compiler
UPDATE: The leadership team at Tongyuan has confirmed that we can provide an offline license checker and a standalone installation of the AOT compiler, independent of the full Syslab package, if there is potential for future commercial cooperation.
If you are interested in our AOT compiler, please DM me.
We look forward to hearing from you regarding:
- The specific scenarios and needs for using Julia’s AOT compiler, so we can assess how well our technology meets your requirements.
- Basic information about your company, such as the email address or a brief description of your company.
Thank you, and we look forward to your response.