forked from bytecodealliance/javy
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
61 lines (48 loc) · 1.28 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.PHONY: cli core test fmt clean
.DEFAULT_GOAL := cli
install:
cargo install --path crates/cli --locked
cli: core
cd crates/cli && cargo build --release --locked && cd -
check-benchmarks:
cd crates/benchmarks \
&& cargo check --benches --release \
&& cd -
core:
cd crates/core \
&& cargo build --release --locked --target=wasm32-wasi \
&& cd -
test-core:
cd crates/core \
&& cargo wasi test --features standalone-wasi -- --nocapture \
&& cd -
# Test in release mode to skip some debug assertions
# Note: to make this faster, the engine should be optimized beforehand (wasm-strip + wasm-opt).
test-cli: core
cd crates/cli \
&& cargo test --release \
&& cd -
tests: check-benchmarks test-core test-cli
fmt: fmt-quickjs-sys fmt-core fmt-cli
fmt-quickjs-sys:
cd crates/quickjs-sys/ \
&& cargo fmt -- --check \
&& cargo clippy --target=wasm32-wasi -- -D warnings \
&& cd -
fmt-core:
cd crates/core/ \
&& cargo fmt -- --check \
&& cargo clippy --target=wasm32-wasi -- -D warnings \
&& cd -
fmt-cli:
cd crates/cli/ \
&& cargo fmt -- --check \
&& cargo clippy -- -D warnings \
&& cd -
fmt-binaries:
cd crates/binaries/ \
&& cargo fmt -- --check \
&& cargo clippy -- -D warnings \
&& cd -
clean:
cargo clean