Update docs, set stdlib-path as optional parameter
This commit is contained in:
parent
2ca237be84
commit
4c2a1fc74b
5 changed files with 11 additions and 13 deletions
|
@ -4,9 +4,10 @@ MAINTAINER JacobEberhardt <jacob.eberhardt@tu-berlin.de>, Thibaut Schaeffer <thi
|
|||
|
||||
RUN useradd -u 1000 -m zokrates
|
||||
|
||||
ARG RUST_TOOLCHAIN=nightly-2020-01-01
|
||||
ENV WITH_LIBSNARK=1
|
||||
ENV ZOKRATES_HOME=/home/zokrates/.zokrates
|
||||
|
||||
ARG RUST_TOOLCHAIN=nightly-2020-01-01
|
||||
ARG ZOKRATES_HOME=/home/zokrates/.zokrates
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
|
|
|
@ -5,7 +5,6 @@ MAINTAINER JacobEberhardt <jacob.eberhardt@tu-berlin.de>, Thibaut Schaeffer <thi
|
|||
RUN useradd -u 1000 -m zokrates
|
||||
|
||||
ENV WITH_LIBSNARK=1
|
||||
ENV ZOKRATES_HOME=/home/zokrates/ZoKrates/zokrates_stdlib/stdlib/
|
||||
|
||||
COPY ./scripts/install_libsnark_prerequisites.sh /tmp/
|
||||
RUN /tmp/install_libsnark_prerequisites.sh
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Standard library
|
||||
|
||||
ZoKrates comes with a number of reusable components which are defined at `./stdlib/` in the ZoKrates root repository. In order to import the standard library as described in the [imports](./imports.html) section the `$ZOKRATES_HOME` environment variable needs to be set to the `stdlib` folder. The standard library is solely based on the ZoKrates DSL and can be easily extended.
|
||||
ZoKrates comes with a number of reusable components which are defined at `./stdlib/` in the ZoKrates root repository. In order to import the standard library as described in the [imports](./imports.html) section, the `--stdlib-path` argument needs to be set to the `stdlib` folder in the compilation step. The standard library is solely based on the ZoKrates DSL and can be easily extended.
|
||||
|
||||
The following section highlights a subset of available imports:
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
# Testing
|
||||
|
||||
Before running any tests, make sure your `ZOKRATES_HOME` environment variable is set correctly.
|
||||
It has to point to `zokrates_stdlib/stdlib/`
|
||||
|
||||
## Unit tests
|
||||
In ZoKrates, unit tests comprise of
|
||||
- internal tests for all zokrates crates
|
||||
|
@ -23,15 +20,14 @@ cargo test --release
|
|||
Integration tests are excluded from `cargo test` by default.
|
||||
They are defined in the `zokrates_cli` crate in `integration.rs` and use the test cases specified in `zokrates_cli/tests/code`.
|
||||
|
||||
Before running integration tests:
|
||||
1. Make sure your `$ZOKRATES_HOME` is set correctly
|
||||
2. You have [solc](https://github.com/ethereum/solc-js) installed and in your `$PATH`.
|
||||
Before running integration tests, make sure:
|
||||
1. You have [solc](https://github.com/ethereum/solc-js) installed and in your `$PATH`.
|
||||
|
||||
Solc can conveniently be installed through `npm` by running
|
||||
```
|
||||
npm install -g solc
|
||||
```
|
||||
3. You have an Ethereum node running on localhost with a JSON-RPC interface on the default port 8545 (`http://localhost:8545`).
|
||||
2. You have an Ethereum node running on localhost with a JSON-RPC interface on the default port 8545 (`http://localhost:8545`).
|
||||
|
||||
Integration tests can then be run with the following command:
|
||||
|
||||
|
|
|
@ -439,7 +439,8 @@ fn cli() -> Result<(), String> {
|
|||
.help("Path to the standard library")
|
||||
.value_name("PATH")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.required(false)
|
||||
.default_value("")
|
||||
).arg(Arg::with_name("abi_spec")
|
||||
.short("s")
|
||||
.long("abi_spec")
|
||||
|
@ -484,7 +485,8 @@ fn cli() -> Result<(), String> {
|
|||
.help("Path to the standard library")
|
||||
.value_name("PATH")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.required(false)
|
||||
.default_value("")
|
||||
).arg(Arg::with_name("curve")
|
||||
.short("c")
|
||||
.long("curve")
|
||||
|
|
Loading…
Reference in a new issue