You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+64-17Lines changed: 64 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,10 @@
13
13
## Table of Contents
14
14
15
15
*[1. Overview](#1-overview)
16
-
*[2. Build Guide](#2-build-guide)
17
-
*[3. Contributors](#3-contributors)
18
-
*[4. License](#4-license)
16
+
*[2. Usage Guide](#2-usage-guide)
17
+
*[3. Build Guide](#3-build-guide)
18
+
*[4. Contributors](#4-contributors)
19
+
*[5. License](#5-license)
19
20
20
21
## 1. Overview
21
22
@@ -35,9 +36,51 @@
35
36
36
37
For more information, visit [Welcome to Aleo](https://github.com/AleoNet/welcome) to get started.
37
38
38
-
## 2. Build Guide
39
+
## 2. Usage Guide
39
40
40
-
### 2.1 Install Rust
41
+
snarkVM is primarily designed to be used as a library in Rust projects. Add it to your `Cargo.toml` with your favourite published version:
42
+
43
+
```toml
44
+
[dependencies]
45
+
snarkvm = "<major>.<minor>.<patch>"
46
+
```
47
+
48
+
### 2.1 Feature Flags
49
+
50
+
The following is an (incomplete) list of features flags in the snarkVM crate.
51
+
52
+
***cuda** -
53
+
Allows some operations to run on the (NVidia) GPU, instead of on the CPU.
54
+
***cli** -
55
+
Enables the command-line interface. Needed when installing the `snarkvm` binary.
56
+
***locktick** -
57
+
This feature turns on code for detecting deadlocks.
58
+
***test_targets** -
59
+
This feature allows the lowering of coinbase and proof targets for testing.
60
+
***instrumentation** -
61
+
Adds `tracing::instrument` statements to (some) functions. This is useful for profiling, but should not be used in production.
62
+
***serial** -
63
+
*Disables* paralle processing using `rayon`.
64
+
***algorithms** -
65
+
Adds the `algorithms` crate to `snarkvm` (as `snarkvm::algorithms`)
66
+
***circuit** -
67
+
Adds the `circuit` crate to `snarkvm` (as `snarkvm::circuit`)
68
+
***fields** -
69
+
Adds the `fields` crate to `snarkvm` (as `snarkvm::fields`)
70
+
***ledger** -
71
+
Adds the `ledger` crate to `snarkvm` (as `snarkvm::ledger`)
72
+
***synthesizer** -
73
+
Adds the `synthesizer` crate to `snarkvm` (as `snarkvm::synthesizer`)
74
+
***parameters** -
75
+
Adds the `parameters` crate to `snarkvm` (as `snarkvm::parameters`)
76
+
***wasm** -
77
+
Enables behavior specific for WebAssembly. This feature should only be enabled when compiling to the `wasm32` architecture.
78
+
79
+
### 3. Building Guide
80
+
81
+
You can also build snarkVM from source. Because snarkVM is a library, this follwing guide is only useful if you plan to make modifications to its source code.
82
+
83
+
### 3.1 Install Rust
41
84
42
85
We recommend installing Rust using [rustup](https://www.rustup.rs/). You can install `rustup` as follows:
43
86
@@ -49,30 +92,34 @@ We recommend installing Rust using [rustup](https://www.rustup.rs/). You can ins
49
92
- Windows (64-bit):
50
93
51
94
Download the [Windows 64-bit executable](https://win.rustup.rs/x86_64) or
52
-
[Windows 32-bit executable](https://win.rustup.rs/i686) and follow the on-screen instructions.
95
+
[Windows 32-bit executable](https://win.rustup.rs/i686) and follow the on-screen instructions.i
53
96
54
-
### 2.2 Using snarkVM as a Library
97
+
### 3.2 Additional Dependencies
55
98
56
-
snarkVM is primarily designed to be used as a library in Rust projects. Add it to your `Cargo.toml` with your favourite published version:
99
+
On Linux, you also need the `lld` linker. For example, on a Debian system you would run the following to install it.
57
100
58
-
```toml
59
-
[dependencies]
60
-
snarkvm = "<major>.<minor>.<patch>"
101
+
```
102
+
sudo apt install lld
61
103
```
62
104
63
-
### 2.3 Build from Source Code
105
+
### 3.3 Fetch Source Code
64
106
65
-
You can also build snarkVM from source:
107
+
The following snippet clones the `staging` branch of snarkVM.
66
108
67
109
```bash
68
-
# Fetch the repository's development (staging) branch
0 commit comments