Skip to content
dirkdev98Public

About

AOT JS to C compiler

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

The Maligator mascot

Maligator

An ahead-of-time JavaScript compiler and native runtime. Maligator compiles JavaScript and erasable TypeScript to C and links it with its runtime into a standalone executable. Configure language features such as eval and Intl. Production builds link supported Web APIs and Node.js modules by use.

Maligator is an experimental alpha. Check compatibility before relying on a Web API, Node.js module, or language feature.

Install

npm install --global @maligator/cli@alpha

Prebuilt packages cover macOS 15 or newer and glibc-based Linux on arm64 and x64. The npm launcher needs Node.js 20 or newer; the CLI itself and the executables it builds do not.

Quick start

From the root of an application project:

maligator init
maligator run
maligator build --production

init creates maligator.build.ts and, when no entry point exists yet, a starter src/index.ts. run compiles a development image and executes it. build produces a native executable and prints its path. See Getting started for the full walkthrough.

Native toolchain

The npm platform package includes runners for run, dev, and test. Projects with a matching configuration and no C bindings can use them without a local toolchain.

build --production compiles C on the build host and uses the packaged Rust archives when they match the target and configuration. It downloads a pinned Zig release if it cannot use the host compiler or an existing Zig installation. maligator doctor --verbose reports the selected compiler or planned download. See Set up native builds for local runtime builds and cross-builds.

Documentation

The documentation has task guides and an API reference with signatures, defaults, and failure behavior. Good places to start:

Every page has a Markdown copy, and the public symbol index lists every symbol with its signature and availability.

Contributing

CONTRIBUTING.md covers setting up the checkout, running the compiler from source, and verifying a change. Coding agents follow AGENTS.md.

License

MIT

About

AOT JS to C compiler

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages