Caution
Ignis is under active development and evolving. It is currently in its early stages and is an experimental language. APIs and syntax may change between versions.
Ignis is a general-purpose programming language with strong, static typing, and immutability by default. Inspired by TypeScript and Rust, Ignis compiles to C and produces native executables via GCC.
- Strong static typing:
i8-i64,u8-u64,f32,f64,boolean,char,str,atom - Immutability by default:
letfor immutable,let mutfor mutable - Generics: Type parameters for functions, records, enums, and type aliases
- Records and enums: User-defined types with fields, methods, and variants
- Traits: Lang traits (
Drop,Clone,Copy) and user-defined traits - Pattern matching:
matchexpressions,if let,while let,let else - Compile-time directives:
@config(...),@abi(...), and conditional item inclusion - Namespaces: Module-level organization with
::access - References and pointers:
&T,&mut T,*T,*mut T - Control flow:
if/else,while,for,for-of,break,continue - Extension methods:
@extension(Type)for adding methods to existing types - Function overloading: Multiple functions with the same name, different signatures
- Modules:
import/exportfor multi-file projects - FFI:
externblocks for C interop - Borrow checking: Rust-style borrow analysis
- Collections and memory foundations:
HashMap,HashSet, and low-level std memory helpers - UTF-8 scalar chars + byte-backed strings:
charis one Unicode scalar value, whilestr/Stringkeep UTF-8 byte storage
See docs/LANGUAGE_REFERENCE_CURRENT.md for full language documentation.
- Linux (amd64 for release artifacts)
- GCC,
ar(binutils), andmake
# Install to /usr/local (requires sudo)
curl -fsSL https://raw.githubusercontent.com/Ignis-lang/ignis/main/scripts/install.sh | sudo bash
# Install to ~/.local (no sudo required)
curl -fsSL https://raw.githubusercontent.com/Ignis-lang/ignis/main/scripts/install.sh | bash -s -- --prefix ~/.localThe installer puts the compiler at <prefix>/bin/ignis and the standard library
at <prefix>/share/ignis/std. The compiler finds that directory by itself, next
to its binary, so it works without any profile edit. By default the installer
also appends one marked block per prefix (# >>> ignis [<prefix>] >>> ...
# <<< ignis [<prefix>] <<<) to your shell profile that exports IGNIS_STD_PATH
and IGNIS_HOME (<prefix>/share/ignis) and adds <prefix>/bin to PATH. The
profile is chosen from $SHELL: for bash, ~/.bashrc and the login file bash
reads (the first of ~/.bash_profile, ~/.bash_login, ~/.profile, created as
~/.profile when none exists); for zsh, $ZDOTDIR/.zshrc (or ~/.zshrc); for
fish, ~/.config/fish/conf.d/ignis.fish; otherwise ~/.profile. Re-running
replaces that prefix's block only; installing a second prefix adds a second
block, and the later block's IGNIS_STD_PATH and IGNIS_HOME win in a shell.
Pass --no-modify-path to skip the edit and print the lines instead, or
--dry-run to see what would change. Open a new shell afterwards. When run as
root through sudo (for example curl ... | sudo bash), the installer does not
edit any profile: it prints the lines for you to add to your own. It also leaves
a profile with an unbalanced marker, a profile owned by another user (for
example one named by IGNIS_PROFILE_FILE while running as root) and a profile
it cannot write untouched, and prints the lines instead; this includes a failed
mode copy (cp -p), which skips that profile edit with a warning. --dry-run
reports the same outcome (the warning and the lines, not "write to"). The prefix
is normalized first (trailing slashes dropped, an existing directory resolved to
its canonical path), so --prefix p/ and a symlink to p share one block, and
blocks of other prefixes are kept with a warning naming the profile and the
prefix. A --prefix containing a newline or carriage return is rejected.
The compiler is written in Ignis (ignis/). Building it from source needs no
prebuilt compiler: the repository commits a C seed (bootstrap/seed/) that GCC
turns into a first compiler, which then builds the current sources. Besides the
requirements above, this needs xz, sha256sum and git, and takes several
minutes.
# Build from source with the installer
curl -fsSL https://raw.githubusercontent.com/Ignis-lang/ignis/main/scripts/install.sh | bash -s -- --build
# Or build manually with the bootstrap ladder (also needs python3)
git clone https://github.com/Ignis-lang/ignis.git
cd ignis
scripts/bootstrap.sh stage1-from-seed # C seed -> stage0 -> stage1
scripts/bootstrap.sh stage2 # stage1 -> stage2, the binary a release ships
./build/bootstrap/stage2/ignis --helpSee BOOTSTRAP.md for the stages and the gates.
cd scripts
makepkg -siThe Nix package builds the compiler from the C seed, which takes several minutes.
# Run from flake
nix run github:Ignis-lang/ignis
# Install in your profile
nix profile install github:Ignis-lang/ignis
# Development shell
nix develop github:Ignis-lang/ignisOr with traditional Nix:
nix-build -A package
./result/bin/ignis --helpThe uninstaller also removes the profile block of that prefix (blocks of other prefixes stay; not under sudo, where it prints a note instead).
# Uninstall from /usr/local
curl -fsSL https://raw.githubusercontent.com/Ignis-lang/ignis/main/scripts/uninstall.sh | sudo bash
# Uninstall from ~/.local
curl -fsSL https://raw.githubusercontent.com/Ignis-lang/ignis/main/scripts/uninstall.sh | bash -s -- --prefix ~/.localsha256sum -c ignis-linux-amd64.tar.gz.sha256
# Optional: verify detached signature if present
gpg --verify ignis-linux-amd64.tar.gz.asc ignis-linux-amd64.tar.gzCreate a file hello.ign:
import Io from "std::io";
function main(): void {
Io::println("Hello, Ignis!");
return;
}
Build and run:
ignis build hello.ign -o hello
./hello# Compile a single file
ignis build main.ign
# Compile a project (uses ignis.toml)
ignis build
# Build the standard library
ignis build-std
# Type-check without code generation or linking
ignis check main.ign
# Additional options
ignis build main.ign -o main # Name the output binary
ignis build main.ign -O 2 # Set the C optimization level (0-3)
ignis build main.ign --debug # Build with debug information
ignis build main.ign --dump-drop-schedule # Print the ownership drop schedules
# Run the project's @test functions
ignis test
# Format one or more files canonically
ignis fmt src/main.ign
ignis fmt std/fs/mod.ign std/io/mod.ign std/path/mod.ign
# Check formatting without rewriting
ignis fmt --check src/main.ign
# Emit diffs instead of rewriting
ignis fmt --emit diff src/main.ignFormatter defaults: indent_width = 2, line_width = 100, use_tabs = false, sort_imports = false.
Canonical layout includes inline empty high-level blocks (namespace Foo {}), multiline trailing commas, and no trailing comma on single-line signatures or record initializers.
import Io from "std::io";
import String from "std::string";
record Box<T> {
value: T;
}
function identity<T>(x: T): T {
return x;
}
function main(): void {
let box: Box<i32> = Box { value: 42 };
let result: i32 = identity<i32>(box.value);
Io::println(String::toString(result));
return;
}
For multi-file projects, create an ignis.toml:
[package]
name = "myproject"
version = "0.1.0"
[build]
source_dir = "src"
out_dir = "build"ignis build in that directory writes the executable to build/bin/myproject.
Ignis is open for contributions. You can:
- Report bugs or issues
- Propose new features
- Submit pull requests with improvements