Skip to content

Commit

Permalink
README.md: Updated build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
lukego committed Mar 15, 2017
1 parent 631e214 commit a4a5720
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,41 @@ PRs welcome! Shock me with your radical ideas! :-)

### Compilation

RaptorJIT is built using GNU Make, Clang (C compiler), and LuaJIT 2 (bootstrap Lua for DynASM etc.) The build environment is specified formally in `default.nix` and can be automatically provided using the [nix](http://nixos.org/nix/) package manager.
RaptorJIT uses [nix](http://nixos.org/nix/) to define a reproducible
build environment that includes Clang for C and LuaJIT 2.0 for
bootstrapping. The recommended way to build RaptorJIT is with nix,
which provides the dependencies automatically, but you can build
manually if you prefer.

Here is how to install nix:
#### Build with nix

Install nix:

```
$ curl https://nixos.org/nix/install | sh
```

Here is how to build raptorjit once nix is installed (note: the first
compilation takes time to download dependencies):
Build in batch-mode (option 1):

```shell
$ nix-build # produces result/bin/raptorjit
```

Here is the interactive version:
Build interactively (option 2):

```
```shell
$ nix-shell # start sub-shell with pristine build environment in $PATH
[nix-shell]$ make -j # build manually as many times as you like
[nix-shell]$ exit # quit when done
```

(You can also skip `nix` and install `clang` and `luajit` yourself if
you like. The nix approach is future proof to new dependencies and
allows for pinning specific versions.)
#### Build without nix

```shell
$ make
```

... but make sure you have at least `make`, `clang`, and `luajit` in your `$PATH`.

### Quotes

Expand Down

0 comments on commit a4a5720

Please sign in to comment.