version: '3'
silent: true
tasks:
all:
cmds:
- cmd: cargo clean
- cmd: cargo build
- cmd: cargo test
- cmd: cargo clippy
bench:
desc: Runs benchmarks
cmds:
- cmd: cargo +nightly bench
build:
desc: Builds the library
cmds:
- cmd: cargo build
build-all:
desc: Builds the library for multiple targets
cmds:
- cmd: cargo +stable build --release --target=x86_64-unknown-linux-gnu
- cmd: cargo +nightly build --release --target=x86_64-unknown-linux-musl
- cmd: cargo +nightly build --release --target=wasm32-unknown-unknown
- cmd: cargo +nightly build --release --target=wasm32-unknown-emscripten
- cmd: cargo +nightly build --release --target=wasm32-wasi
clean:
desc: Cleans all targets
cmds:
- cmd: cargo clean
cov:
desc: Generates code coverage report
cmds:
- cmd: cargo llvm-cov --no-cfg-coverage --no-cfg-coverage-nightly --workspace --html
- cmd: echo -e "\n\e[1;32mOpen coverage report\x3A\e[0m file:///$(pwd)/target/llvm-cov/html/index.html\n"
doc:
desc: Generates the documentation
cmds:
- cmd: cargo doc --no-deps
doc-open:
desc: Generates the documentation and opens it in the browser
cmds:
- cmd: cargo doc --no-deps --open
release:
desc: Builds the library in release mode
cmds:
- cmd: cargo clean
- cmd: cargo +stable build --release
test:
desc: Tests the library
cmds:
- cmd: cargo test
clippy:
desc: Runs clippy for all targets
cmds:
- cmd: cargo +nightly clippy --all-targets
fmt:
desc: Runs the code formatter
cmds:
- cmd: cargo +nightly fmt