Compiled language

A compiled language, with its own tooling.

Jaguar is a compiled language with a syntax close to C: explicit types, classes, namespaces, and simple collections — with a runtime that keeps memory management out of reach of the code. A compiler, a build system, and a bindgen make up its toolchain.

What the language covers

Familiar syntax, a safer runtime.

Jaguar deliberately borrows several ideas from C while simplifying certain everyday aspects.

Classic compiler

jcc compiles your programs into native executables, with a --c89 mode for portability.

Explicit types

Classic C types and short aliases (i32, f64, u8…), normalized by the compiler.

Classes & inheritance

Fields, methods, constructors/destructors, virtual methods, override, and access control ($ / %).

Overloading & namespaces

Several functions with the same name, named arguments, and name mangling that avoids collisions between namespaces.

Simple collections

list, map, pair, container, and dynamic_list, with deliberately simple syntax.

Controlled runtime

No malloc/free or raw pointers exposed: the runtime manages strings, classes, and containers.

Under the hood

Close to C, with its own rules.

Jaguar embraces a few choices that deliberately set it apart from classic C.

Access control

Private by default, one symbol for the rest

A class member without a marker is private. $ makes it public, % makes it protected — checked by the compiler.

class Player { $int health = 100; %int stamina; int secret_value; int get_health() const { return health; } }
Ownership

container<T> owns its data

A container automatically destroys the object it owns. Handy for a class allocated with new, without managing its release by hand.

container<Player> player = new Player(100); player.get().damage(25); // short form for a simple type container<int> value => 42;
Loops

Conditionless while, inclusive for_loop

Jaguar's while never takes a condition — you exit with break. for_loop includes its final bound.

while { if (health <= 0) { break; } health = health - 1; } int i = for_loop(0, 10) { sys:print(i); // 0..10, bound included }
Function calls

Named arguments and default values

A parameter can have a default value, and be passed by name in any order — as long as no positional argument follows a named one.

int move(int x, int y, int speed = 1) { return x + y + speed; } move(y = 20, x = 10); move(x = 10, y = 20, speed = 5);
C interop

Mangled namespaces, explicit output to C

A function inside a namespace is mangled to avoid collisions. @extern disables this mangling to call native C.

namespace math { int add(int a, int b) { return a + b; } // becomes math_add on the C side } @extern int native_function(int value);
Quick reference

Core types

JaguarAliasApproximate C type
inti32int
uintu32unsigned int
short / longi16 / i64short / long long
float / doublef32 / f64float / double
char / bytei8 / u8signed / unsigned char
bool_jBool
stringJaguar string object
Toolchain

Three tools, one language.

jcc compiles, jbs orchestrates builds, jbg imports existing C APIs.

Compiler

jcc, the Jaguar compiler

jcc is a classic compiler: it takes a Jaguar program and produces an executable. Under the hood, it goes through a transpilation step to C before calling a C compiler — an internal implementation detail rather than a constraint of the language.

jcc main.ja -o game jcc main.ja --c89 -o game // without -o: the generated C is written to standard output jcc main.ja > main.c
Build system

jbs, the build orchestrator

jbs describes a project in a configuration file: compilation options, global macros, targets to build, and link steps.

version 1.0 out . include lib c89 keep_c define PI 3.14 compile Main { main.ja } link Main { add.a }
Bindgen

jbg, importing a C API

jbg generates Jaguar declarations (@extern) from an existing C API, to call a C library without writing the signatures by hand.

// generates bindings from a C header jbg mylib.h -o mylib_bindings.ja // usable directly from Jaguar @extern int mylib_init();
Get the compiler

GitHub releases, live.

This page queries the repository's releases on load. Until a first package is out, compiling from source remains the simplest route.

Compile and run a program

With Python and GCC installed.

  1. git clone https://github.com/oscar-soirey/JaguarCC.git
    Fetches the jcc.py compiler and its sources.
  2. python jcc.py main.ja -o game
    Generates game.c, then calls GCC to produce the game executable.
  3. python jcc.py main.ja > main.c
    Without -o, only the generated C is written to standard output.
  4. python jcc.py main.ja --c89 -o game
    Generates C89-compatible C — Jaguar semantics stay identical.