Kris is a tool for cross-compiling Janet projects for multiple platforms using Zig.
Usage: kris <subcommand> [<args>]
A tool for cross-compiling Janet projects for multiple platforms using Zig.
Options:
-h, --help Show this help message.
Subcommands:
c, clean Delete the kris cache directory.
j, janet Cross-compile Janet.
q, quickbin Cross-compile a standalone executable.
For more information on each subcommand, type 'kris help <subcommand>'.
Kris requires GNU Make and Zig to be installed and available on your PATH. Zig is used to cross-compile for different target platforms.
If you use Janet, you can install kris using Jeep:
$ jeep install https://github.com/pyrmont/kris
To install the kris binary from source, you need Janet installed on your
system. Then run:
$ git clone https://github.com/pyrmont/kris
$ cd kris
$ git tag --sort=creatordate
$ git checkout <version> # check out the latest tagged version
$ janet --install .Run kris --help for usage information. The command-line arguments are
explained in more detail in the man page.
Cross-compile Janet for a specific platform:
$ kris janet --target linux-x64 --version 1.40.1Supported targets:
native- Your current platformlinux-x64- Linux x86-64linux-arm64- Linux ARM64macos-x64- macOS x86-64macos-arm64- macOS ARM64windows-x64- Windows x86-64windows-arm64- Windows ARM64
By default, kris uses the latest release from the Janet repository. You can
specify a specific version with --version.
To optimize for the smallest binary size, use the --small flag:
$ kris janet --smallCreate a standalone executable from a Janet script:
$ kris quickbin script.janet outputThis embeds your Janet script's bytecode into a standalone executable that includes the Janet runtime.
You can target different platforms:
$ kris quickbin --target linux-x64 script.janet outputAs with the janet subcommand, you can optimize for the smallest binary size,
use the --small flag:
$ kris quickbin --small script.janet outputKris caches Janet source code and build artifacts in ~/.cache/kris (or
$XDG_CACHE_HOME/kris). To clean the cache:
$ kris cleanFound a bug? I'd love to know about it. The best way is to report your bug in the Issues section on GitHub.
Kris is licensed under the MIT Licence. See LICENSE for more details.