Skip to content

Commit c138a14

Browse files
bushidocodesOthers
authored andcommitted
docs: update README
1 parent 73e9b28 commit c138a14

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,33 @@ ARGS:
2424
<input> Input wasm file
2525
2626
```
27-
Relies on you having a sensible llvm toolchain on your computer (so we can call llvm-config)
27+
28+
# Installation from Source
29+
30+
## Debian-based Systems
31+
```sh
32+
git clone https://github.com/gwsystems/silverfish.git
33+
cd silverfish
34+
./install_deb.sh
35+
```
36+
37+
The compiler can now be run via `silverfish`
38+
39+
## Others
40+
1. [Install Rust](https://www.rust-lang.org/tools/install)
41+
2. [Install LLVM](http://releases.llvm.org/download.html)
42+
3. Link Your Clang Installation so `clang-9` and `llvm-config-9` are in your path and invokable as `clang` and `llvm-config`. For example, the following commands accomplish this using `update-alternatives` after replacing LLVM_VERSION with the version returned you installed above (In *NIX systems, this can be confirmed with `ls /usr/bin/clang*`)
43+
```sh
44+
LLVM_VERSION=9
45+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$LLVM_VERSION 100
46+
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-$LLVM_VERSION 100
47+
```
48+
4. [Install the C++ Standard Library for LLVM](https://libcxx.llvm.org/)
49+
50+
5. Clone and build silverfish
51+
```sh
52+
git clone https://github.com/gwsystems/silverfish.git
53+
cd silverfish
54+
cargo build --release
55+
```
56+
6. The silverfish binary is built at `target/release/silverfish`. Copy this to the appropriaate place for your platform and add to your PATH if neccessary.

0 commit comments

Comments
 (0)