-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.toml
57 lines (48 loc) · 1.23 KB
/
Makefile.toml
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
[config]
default_to_workspace = false
additional_profiles = ["debug"]
[tasks.set_vars.env]
RUSTFLAGS = "-Copt-level=s"
MODE = "release"
ADDITIONAL = "--release"
[tasks.set_vars.env.debug]
RUSTFLAGS = ""
MODE = "debug"
ADDITIONAL = "--color=auto" # it's a stub
[tasks.build_example_client]
command = "cargo"
toolchain = "stable"
args = ["build", "-p", "example_client", "--target", "wasm32-unknown-unknown", "${ADDITIONAL}"]
dependencies = ["set_vars"]
[tasks.deploy_example_client]
command = "wasm-bindgen"
args = [
"--target",
"web",
"--no-typescript",
"--out-dir",
"static/target",
"--out-name",
"example_client",
"target/wasm32-unknown-unknown/${MODE}/example_client.wasm",
]
dependencies = ["set_vars"]
[tasks.example_client]
dependencies = ["build_example_client", "deploy_example_client"]
[tasks.run]
command = "cargo"
toolchain = "stable"
args = ["run", "-p", "example_server", "${ADDITIONAL}"]
dependencies = ["example_client"]
[tasks.checkfmt]
command = "cargo"
toolchain = "nightly"
args = ["fmt", "--", "--check"]
[tasks.fmt]
command = "cargo"
toolchain = "nightly"
args = ["fmt"]
[tasks.clippy]
command = "cargo"
toolchain = "stable"
args = ["clippy", "--all-targets", "--all-features"]