-
Notifications
You must be signed in to change notification settings - Fork 1
/
Justfile
124 lines (85 loc) · 3.56 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
set dotenv-load
build: build-transactor build-cli
dep:
cargo fetch
npm --prefix ./js i -ws
npm --prefix ./examples/demo-app i
build-facade:
cargo build -r -p race-facade
build-transactor:
cargo build -r -p race-transactor
build-cli:
cargo build -r -p race-cli
cli *ARGS:
cargo run -p race-cli -- {{ARGS}}
test: test-core test-transactor
test-transactor:
cargo test -p race-transactor
test-core:
cargo test -p race-core
examples: example-chat example-raffle
run-examples: examples preview-demo-app
example-minimal:
cargo build -r -p race-example-minimal --target wasm32-unknown-unknown
wasm-opt -Oz target/wasm32-unknown-unknown/release/race_example_minimal.wasm -o target/race_example_minimal.wasm
example-counter:
cargo build -r -p race-example-counter --target wasm32-unknown-unknown
example-simple-settle:
cargo build -r -p race-example-simple-settle --target wasm32-unknown-unknown
wasm-opt -Oz target/wasm32-unknown-unknown/release/race_example_simple_settle.wasm -o target/race_example_simple_settle.wasm
example-chat:
cargo build -r -p race-example-chat --target wasm32-unknown-unknown
wasm-opt -Oz target/wasm32-unknown-unknown/release/race_example_chat.wasm -o target/race_example_chat.wasm
example-raffle:
cargo build -r -p race-example-raffle --target wasm32-unknown-unknown
wasm-opt -Oz target/wasm32-unknown-unknown/release/race_example_raffle.wasm -o target/race_example_raffle.wasm
mkdir -p dev/dist
cp target/race_example_raffle.wasm dev/dist/
example-draw-card:
cargo build -r -p race-example-draw-card --target wasm32-unknown-unknown
wasm-opt -Oz target/wasm32-unknown-unknown/release/race_example_draw_card.wasm -o target/race_example_draw_card.wasm
mkdir -p dev/dist
cp target/race_example_draw_card.wasm dev/dist/
dev-demo-app:
npm --prefix ./examples/demo-app run dev
build-demo-app:
npm --prefix ./examples/demo-app run build
preview-demo-app: build-demo-app
npm --prefix ./examples/demo-app run preview
dev-facade *ARGS:
cargo run -p race-facade -- {{ARGS}}
dev-reg-transactor conf:
cargo run -p race-transactor -- -c {{conf}} reg
dev-run-transactor conf:
cargo run -p race-transactor -- -c {{conf}} run
dev-transactor conf: (dev-reg-transactor conf) (dev-run-transactor conf)
solana:
(cd contracts/solana; cargo build-sbf)
solana-local: solana
solana program deploy ./target/deploy/race_solana.so
borsh:
npm --prefix ./js/borsh run build
sdk-core:
npm --prefix ./js/sdk-core run build
sdk-solana:
npm --prefix ./js/sdk-solana run build
sdk-facade:
npm --prefix ./js/sdk-facade run build
sdk: borsh sdk-core sdk-solana sdk-facade
publish name url:
cargo run -p race-cli -- -e local publish solana {{name}} {{url}}
create-reg:
cargo run -p race-cli -- -e local create-reg solana
create-game spec:
cargo run -p race-cli -- -e local create-game solana {{spec}}
validator:
solana-test-validator --bpf-program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s token_metadata_program.so
publish-npmjs pkg:
npm --prefix ./js/{{pkg}} run build
(cd js/{{pkg}}; npm publish --access=public)
publish-npmjs-all: (publish-npmjs "borsh") (publish-npmjs "sdk-core") (publish-npmjs "sdk-facade") (publish-npmjs "sdk-solana")
publish-crates pkg:
cargo check -p {{pkg}}
cargo test -p {{pkg}}
cargo publish -p {{pkg}}
publish-crates-all: (publish-crates "race-api") (publish-crates "race-proc-macro") (publish-crates "race-core") (publish-crates "race-encryptor") (publish-crates "race-client") (publish-crates "race-test")