Skip to content

Latest commit

History

History
105 lines (63 loc) 路 2.68 KB

File metadata and controls

105 lines (63 loc) 路 2.68 KB

CJIT logo

CJIT is a TinyCC-powered C runner and lightweight compiler frontend.

It can:

  • compile and execute one or more C inputs directly from memory
  • compile one source file to an object
  • build an executable without running it

CJIT is designed for fast iteration, scripting-style execution, and small deployment footprints.

Homepage at Dyne.org/CJIT.

馃殌 Quick start

Download the latest CJIT release for your system.

Launch CJIT from a terminal console command prompt: one can mix c source files and dynamic libraries as arguments:

./cjit.exe mysource.c mylib.dll

Take a tour with the CJIT tutorial.

Basic usage

Run one source file:

./cjit hello.c

Compile one source file to an object:

./cjit -c hello.c

Build an executable without running it:

./cjit -o hello hello.c

Pass arguments to the compiled program:

./cjit app.c -- --name cjit --verbose

Inspect the runtime configuration:

./cjit -v

What CJIT Is Not

CJIT is not a tracing or adaptive JIT in the VM sense. It does not interpret first and optimize hot paths later.

CJIT uses TinyCC to compile C quickly, often in memory, and can execute the resulting code immediately.

馃摝 Download the demo

The CJIT demo package comes with running examples

馃獰 On Windows

iex ((New-Object System.Net.WebClient).DownloadString('https://dyne.org/cjit/demo'))

馃崕 / 馃惂 On Apple/OSX and GNU/Linux

curl -sL https://dyne.org/cjit/demo.sh | bash

馃摉 and follow the The CJIT tutorial

Manpage

When installed on UNIX systems, CJIT(1) has a manpage! try man cjit after installing.

It is also visible online at dyne.org/docs/cjit.

This manual gives you insights about the CJIT command-line options.

The CJIT's Frequently Asked Questions page may provide more information.

馃搼 Acknowledgements

CJIT is copyright (C) 2024-2026 by the Dyne.org foundation. Designed, written and maintained by Jaromil. Free and open source (GNU General Public License v3).

The TinyCC core component is copyright (C) 2001-2004 by Fabrice Bellard. TinyCC is also free and open source (GNU Lesser General Public License).

The CJIT manual offers more information on CJIT licensing.

software by Dyne.org