In addition to default stable Rust toolchain you will a nightly Rust toolchain for rustfmt.
$ rustup toolchain install nightly
Also, you need install wasm-pack for Jason building and testing:
$ curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sudo sh
Take a look at Makefile
for commands usage details.
Boot up dockerized environment for Medea with Jason:
$ make up.dev
Boot up only Medea without Jason:
$ make up.medea
To build/rebuild project and its Docker image use docker-wrapped command from Makefile
:
$ make build dockerized=yes
To build only Medea:
$ make build.medea
# or in Docker
$ make build.medea dockerized=yes
To build only Jason:
$ make build.jason
# or in Docker
$ make build.jason dockerized=yes
To rebuild protobuf specs for Medea gRPC Control API:
$ make cargo.gen crate=medea-control-api-proto
To auto-format Rust sources use command from Makefile
:
$ make fmt
To lint Rust sources use command from Makefile
:
$ make lint
To run unit tests use command from Makefile
:
$ make test.unit
# or for concrete crate only
$ make test.unit crate=medea
$ make test.unit crate=medea-jason
To run integration tests use docker-wrapped commands from Makefile
:
$ make test.integration
To run E2E tests use docker-wrapped commands from Makefile
:
$ make test.e2e
To generate Rust sources project documentation use command from Makefile
:
$ make docs.rust
# if you don't wish to automatically open docs in browser
$ make docs.rust open=no
# or for concrete crate only
$ make docs.rust crate=medea-jason
Add [skip ci]
mark to commit message to omit triggering a CI build.