-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
27 lines (22 loc) · 1.04 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
test:
# to test specific test run: cargo test <test name>
@cargo test
test-debug:
# "--" allows to pass extra arguments
# "--nocapture" disables stdout capturing (testes print all println)
@RUST_BACKTRACE=1 cargo test -- --nocapture
test-unit:
@cargo test --lib
# run specific tests: cargo test --lib <testname> -- --nocapture
build-doc:
@cargo doc
# remove all files
# for i in $$(ls docs); do if [ -f $$i ]; then rm "docs/$$i"; fi; done;
for i in $$(ls docs); do test -f docs/$$i && rm "docs/$$i" ; done;
@rm -rf docs/api
@cp -r target/doc/vostok_dao/ docs/
@for i in ayu.css brush.svg favicon* light.css main.js normalize.css noscript.css rustdoc.css rust-logo.png search-index.js source* storage.js theme.js wheel.svg ; do cp target/doc/$$i docs/; done;
@echo '<html> <head><meta http-equiv="refresh" content="0; url=./vostok_dao/index.html" /></head></html>' > docs/index.html
build:
@env 'RUSTFLAGS=-C link-arg=-s' cargo build --all --lib --target wasm32-unknown-unknown --release
@cp target/wasm32-unknown-unknown/release/*.wasm ./res/