-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
justfile
53 lines (39 loc) · 1.32 KB
/
justfile
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
set windows-shell := ["pwsh.exe", "-Command"]
init:
cargo install cargo-binstall
cargo binstall cargo-insta cargo-nextest cargo-wasi
build:
cargo build --bin proto --bin proto-shim --no-default-features
build-shim:
cargo build --bin proto-shim
build-wasm:
cd plugins && cargo wasi build
check:
cargo check --workspace
format:
cargo fmt --all
format-check:
cargo fmt --all --check
gen:
cargo run -p proto_codegen
lint:
cargo clippy --workspace --all-targets
lint-wasm:
cd plugins && cargo clippy --workspace --all-targets
test name="":
just build
cargo nextest run --workspace {{name}}
test-ci:
cargo nextest run --workspace --exclude proto_pdk --profile ci --config-file ./.cargo/nextest.toml
setup-shims:
cargo build --workspace
mkdir -p ./shims
cp -f "$CARGO_TARGET_DIR/debug/proto-shim" ./shims/node
ln -f "$CARGO_TARGET_DIR/debug/proto-shim" ./shims/node-hard
ln -fs "$CARGO_TARGET_DIR/debug/proto-shim" ./shims/node-soft
setup-shims-win:
cargo build --workspace
New-Item -ItemType Directory -Force -ErrorAction SilentlyContinue shims
New-Item -ItemType HardLink -Force -Name "shims\node-hard.exe" -Value "target\debug\proto-shim.exe"
New-Item -ItemType SymbolicLink -Force -Name "shims\node-soft.exe" -Value "target\debug\proto-shim.exe"
Copy-Item "target\debug\proto-shim.exe" -Destination "shims\node.exe"