Compiled language

A compiled language, with its own toolchain.

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 your code. A compiler, a build system, and a bindgen make up its toolchain.

Test on your browser
What the language covers

A familiar syntax, a safer runtime.

Jaguar deliberately borrows several ideas from C while simplifying some 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

Multiple 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 exposed malloc/free or raw pointers: the runtime manages strings, classes, and containers.

Under the hood

Close to C, with its own rules.

Jaguar makes a few deliberate choices that set it apart from classic C.

Access control

Private by default, a symbol for the rest

A class member with no marker is private. $ makes it public and % makes it protected. The access marker can be placed around the type/name boundary without changing its meaning.

class Player { $int health = 100; %int stamina; int secret_value; // All four forms are public: $int life_a; int$ life_b; int$life_c; int $life_d; 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

Conditional while, unconditional loop

while requires a condition. Use loop for an unconditional loop. for_loop includes its final bound.

while (health > 0) { health = health - 1; } loop { if (done) { break; } } int i = for_loop(0, 10) { sys:print(i); // 0..10, inclusive }
Collections

list and map APIs

Collections expose their size through size(). Lists also provide get() for indexed reads.

list<int> numbers = {1, 2, 3}; i32 count = numbers.size(); i32 value = numbers.get(1); map<string, int> scores; i32 entries = scores.size();
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 escapes 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 in C } @extern int native_function(int value);
Quick reference

Main types

JaguarAliasApproximate C type
inti32int
uintu32unsigned int
short / longi16 / i64short / long long
float / doublef32 / f64float / double
char / bytei8 / u8signed / unsigned char
bool—_jBool
string—Jaguar 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 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, so you can 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();
Ecosystem

Built for the tools around a game engine.

Jaguar is not only a language. Its editor integration, build tooling, and engine-oriented features are meant to work together as one development workflow.

Editor

Jaguar in VS Code

The official Jaguar VS Code extension brings the language into the editor with syntax highlighting, completions, hover information, symbol navigation, rename support, real-time diagnostics, JBS support, file icons, and project build commands.

Microsoft also provides the Language Server Protocol (LSP) as the standard integration path for language tooling such as completion, diagnostics, hover, and navigation. It is a more useful foundation for Jaguar tooling than relying on editor-specific features alone.

// A Jaguar project in VS Code src/ main.ja player.ja include/ engine.jah // The same files can be resolved by JBS using engine;
Build

Crimson + JBS

Crimson is Jaguar's package manager — think of it as the Jaguar equivalent of pip. It installs, updates, removes and searches Jaguar packages, with package manifests and version/dependency handling.

JBS is the build system and project orchestrator. The two tools complement each other: JBS handles the project build, while Crimson handles packages and dependencies. JBS can also invoke Crimson directly through its crimson command.

version 1.0 out build include include compile Game { src/main.ja src/player.ja include/engine.jah } # JBS can invoke Crimson for package operations crimson install myapi
Origins

A language born from game development

Jaguar was created by a game and game-engine developer who kept running into the same problem: many things that feel natural inside an engine end up requiring awkward layers of C++ code, templates, macros, generated code, or handwritten glue.

The idea behind Jaguar is to move those recurring engine problems closer to the language itself, instead of rebuilding them project after project.

Engine-oriented features

Jaguar already exposes several concepts directly in the language and runtime:

@register + factory:construct for runtime class construction.

@exposed + GetMember / SetMember for controlled reflection.

container<T> for ownership and automatic destruction.

signal: for variable-change reactions.

dynamic_list for collections that can hold different value types.

Why not just do this in C++?

The point is not that C++ cannot implement these systems. It can — but in a game engine, getting there can mean layers of templates, lambdas, variants or unions, complex macros, registration code, and generated glue. Jaguar makes some of these recurring patterns explicit language features instead.

Get the compiler

Live GitHub releases.

This page queries the repo's releases on load. Until a first packaged release ships, building from source remains the simplest option.

Build 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 the same.