Nothing Special   »   [go: up one dir, main page]

Skip to content
/ jank Public
forked from jank-lang/jank

A Clojure dialect on LLVM with gradual typing, a native runtime, and C++ interop

License

Notifications You must be signed in to change notification settings

seanstrom/jank

 
 

Repository files navigation

The jank programming language Build codecov Sponsor

jank is a general-purpose programming language which embraces the interactive, functional, value-oriented nature of Clojure, the desire for native compilation and minimal runtimes of C++, and the gradual, structural typing of languages like TypeScript. jank aims to be strongly compatible with Clojure. While Clojure's default host is the JVM and its interop is with Java, jank's host is LLVM and its interop is with C++ or LLVM IR.

https://jank-lang.org

For the current progress of jank and its usability, see the tables here: https://jank-lang.org/progress/

The current tl;dr for jank's usability is: getting there, but not ready for use yet.

Latest binaries

There are pre-compiled binaries for Ubuntu 22.04, which are built to follow the main branch. You can download a tarball with everything you need here: https://github.com/jank-lang/jank/releases/tag/latest

Building locally

Dependencies

For Debian-based distros, this should be all you need:

$ sudo apt-get install -y curl git zip build-essential entr libssl-dev libdouble-conversion-dev pkg-config ninja-build python3-pip cmake debhelper devscripts gnupg zlib1g-dev

For macOS, try this:

$ brew install curl git zip entr openssl double-conversion pkg-config ninja python cmake gnupg zlib

Clone the repo as follows:

$ git clone --recurse-submodules https://github.com/jank-lang/jank.git

# If you didn't recurse submodules when cloning, you'll need to run this.
$ git submodule update --recursive --init

Compiling Cling

Note that you must compile Cling/Clang/LLVM. This can take an hour or two, depending on your machine. Building jank itself should take less than a minute.

$ mkdir -p build
$ cd build
$ ../bin/build-cling
$ export CC=$PWD/cling-build/bin/clang; export CXX=$PWD/cling-build/bin/clang++;

You then need to provide it to ./bin/configure by using -Djank_cling_build_dir=cling-build.

Compiling jank

  • ./bin/configure -- For setting up the project.
  • ./bin/compile -- For one-off compilation.
  • ./bin/test -- For one-off testing.
  • ./bin/watch -- For hot reloading on save.
  • ./bin/install -- For packaging.

Release

A typical release build just needs the following:

$ ./bin/configure -GNinja -DCMAKE_BUILD_TYPE=Release -Djank_cling_build_dir=cling-build
$ ./bin/compile

Debug

To make a debug build, specify the build type when configuring.

$ ./bin/configure -GNinja -DCMAKE_BUILD_TYPE=Debug -Djank_cling_build_dir=cling-build -Djank_tests=on
$ ./bin/compile

# When developing, continuously run the tests locally.
$ ./bin/watch ./bin/test

Packaging

There's also a script for installing jank and all its necessary dependencies. Note that this includes a lot of header files, which are necessary for jank's JIT compilation.

$ ./bin/configure -GNinja -DCMAKE_BUILD_TYPE=Release -Djank_cling_build_dir=cling-build
$ ./bin/install

Sponsors

If you'd like your name, company, or logo here, you can sponsor this project. Sponsor

In the news

The REPL Interview devmio Interview Compiler Spotlight

About

A Clojure dialect on LLVM with gradual typing, a native runtime, and C++ interop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 95.4%
  • CMake 3.1%
  • Shell 1.4%
  • Other 0.1%