From a4a5720ebf45471f1005f3269d6bc6e439ba7961 Mon Sep 17 00:00:00 2001 From: Luke Gorrie Date: Wed, 15 Mar 2017 13:40:40 +0000 Subject: [PATCH] README.md: Updated build instructions --- README.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d446a53251..2da5617239 100644 --- a/README.md +++ b/README.md @@ -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