Jin is a statically typed, procedural and safe programming language.
fn main() unit = {
println("Hello, World!")
}
- Automatic, deterministic memory management
- Pattern matching and tagged union types
- Parametric polymorphism and distinct typing
- Local type inference with required top level type annotations
- Compiled to machine code (Currently compile to C)
- Simple enough that it can be learned in an afternoon
- Fast compile times
- Performance that statisfies use-cases such as servers and applications
- You'll need to install Zig on your machine, since we use
zig cc
to compile the generated C code.
jin build main.jin
./main
To build from source, you'll need Rust to build the compiler and Zig for compiling the runtime (which is done automatically when building the compiler).
After both are installed, you can cd
to the repository and run cargo build -r
(remove the -r
for a debug build). The compiler artifacts will be under target/release
or target/debug
, depending on the mode you built the compiler in.
The artifacts you'll need to run the compiler are:
jin
- The compiler binarystd/
- The standard libraryrt/
- The runtime library
It's important that both std/ and rt/ are in the same directory as the binary, as that is where it searches them!