From d7832e5e443f4600a4ba76c88231ad167cc190a1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 11 Dec 2020 22:58:33 +0000 Subject: [PATCH] README.md: wip build and test instructions Not yet finished Signed-off-by: Ian Jackson --- README.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 882023d0..922a2bc1 100644 --- a/README.md +++ b/README.md @@ -87,12 +87,67 @@ Contributions should be via git branch, eg a merge request on Salsa: -BUILDING -======== +BUILDING AND TESTING +==================== -Otter is not so easy to build. You will want to start with the git -branch - https://salsa.debian.org/iwj/otter +These instructions have been tested on Debian buster. + +Setup +----- + +You will need about 6Gby of disk space. + +1. + sudo apt install build-essential git curl pkg-config libssl-dev node-typescript + +2. Install Rust. This is most easily done with rustup: + + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + +and then follow the instructions about your PATH. If this rune alarms +you, see below about Rust privsep. + +3. Switch your Rust install to use Rust Nightly and add the WASM +target: + + rustup default nightly + rustup target add wasm32-unknown-unknown + +4. Install some build tools: + + cargo install usvg + cargo install bundle-sources + +This will put them in ~/.cargo/bin, which the rustup curl rune above +will have arranged to put on your PATH. + +5. Install the version of wasm-pack with the option I need, which +upstream haven't taken (or refused) the MR for: + + git clone https://github.com/ijackson/wasm-pack.git -b cargo-opts + cd wasm-pack + cargo install + +NB that wasm-pack will itself download and install more stuff when it +is run by the otter Makefile. + + +Build +----- + + git clone https://salsa.debian.org/iwj/otter + cd otter + make -j8 + + + + + +You will want to start with the git branch + + +You must use "make" to build the whole thing, although you can run +"cargo build" to build the You cannot build it just with `cargo`, you must use `make`. -- 2.30.2