-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.toml
49 lines (38 loc) · 1.64 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
[env]
ENV_DIR = {source="${CARGO_MAKE_PROFILE}", default_value = "debug", mapping = {release = "release"}}
CARGO_TARGET_DIR = {value = "target", condition = {env_not_set = ["CARGO_TARGET_DIR"]}}
CARGO_WASM_PATH = "${CARGO_TARGET_DIR}/wasm32-unknown-unknown/${ENV_DIR}/${CARGO_MAKE_CRATE_NAME}.wasm"
CARGO_PROFILE = "dev"
TARGET_DIR = "target"
CARGO_MANIFEST_DIR = "${CARGO_MAKE_WORKING_DIRECTORY}"
[env.release]
CARGO_RELEASE_ARGS = "--release"
[tasks.show-env]
command = "env"
[tasks.install-target-wasm32-unknown-unknown]
args = ["target", "install", "wasm32-unknown-unknown"]
command = "rustup"
[tasks.basic-http-server]
install_crate = {crate_name = "basic-http-server", binary = "basic-http-server", test_arg="--help"}
[tasks.wasm-bindgen-cli]
install_crate = {crate_name = "wasm-bindgen-cli", binary = "wasm-bindgen", test_arg="--help"}
[tasks.cargo-build-web]
args = ["build", "--target", "wasm32-unknown-unknown", "--features", "visualization_wasm", "@@split(CARGO_RELEASE_ARGS, )"]
command = "cargo"
dependencies = ["install-target-wasm32-unknown-unknown"]
[tasks.build-web]
args = ["--out-dir", "${TARGET_DIR}", "--out-name", "wasm", "--target", "web", "--no-typescript", "${CARGO_WASM_PATH}"]
command = "wasm-bindgen"
dependencies = ["cargo-build-web", "wasm-bindgen-cli"]
[tasks.build-native]
args = ["build", "--features", "visualization", "@@split(CARGO_RELEASE_ARGS, )"]
command = "cargo"
[tasks.run]
command = "${CARGO_TARGET_DIR}/${ENV_DIR}/${CARGO_MAKE_BINARY_EXECUTABLE_NAME}"
dependencies = ["build-native"]
[tasks.serve]
command = "basic-http-server"
args = ["-x"]
dependencies = ["build-web", "basic-http-server"]
[tasks.test]
disabled = true