Jargon is a self-hosting compiled programming language that targets LLVM IR and produces native executables on Windows. The compiler (jlc1) is written in Jargon itself, making it a bootstrapping compiler.
- Self-hosting — the compiler is written in Jargon and can compile itself
- LLVM backend — emits LLVM IR (
.llfiles) and usesclang-clfor final linking - C-like syntax — familiar syntax with classes, templates, enums, and more
- Automatic Reference Counting — automatic memory management via reference-counted objects
- Debug support — generates debug information compatible with standard debuggers (
-gflag) - Interop with C — direct declaration of external C functions
- JargonLib - Jargon Compiler library implemented in C#
- jlc0 - Jargon Compiler implemented in C#
- Jargon - Jargon Runtime implemented in Jargon
- jlc1 - Jargon Compiler implemented in Jargon, compiled with jlc0
- jlc2 - Jargon Compiler implemented in Jargon, compiled with jlc1, to check for no degradation
- Test - Test project
- ComTest - Exampe of using COM
- WinApp - Example of minimal Windows application
| Flag | Description |
|---|---|
-g |
Generate debug information |
-k |
Keep intermediate files |
-o <file> |
Specify output file name |
-O<level> |
Optimization level (O0, O1, O2, Os, Ofast, Od, Ot, Ox) |
-I<dir> |
Add directory to library search path |
-l<library> |
Link with specified library |
-V |
Verbose output |
-h, --help |
Show help |
jlc1 -g Main.jr -o Test.exe
- Windows with Visual Studio 2022
- LLVM / Clang toolchain (
clang-clmust be available)
- Create a JARGON_LIB system variable pointing to your binary folder. i.e JARGON_LIB=C:\Jargon\x64\Debug
- Open the solution in Visual Studio 2022.
- Build the
Testproject to perform a build of all projects in the solution in the correct order.
This project is available under the MIT License.