Showing
4 changed files
with
10 additions
and
8 deletions
... | ... | @@ -4,7 +4,7 @@ PROFILE ?= dev |
4 | 4 | ifeq "$(PROFILE)" "release" |
5 | 5 | CARGO_PROFILE = --release |
6 | 6 | WASM_PROFILE = --release |
7 | -WASM_EXTRA = --no-default-features | |
7 | +WASM_EXTRA = --no-default-features --features wee_alloc | |
8 | 8 | else |
9 | 9 | CARGO_PROFILE = |
10 | 10 | WASM_PROFILE = --dev |
... | ... | @@ -17,20 +17,20 @@ endef |
17 | 17 | |
18 | 18 | start: |
19 | 19 | systemfd --no-pid -s 0.0.0.0:3000 -- \ |
20 | - cargo watch -i static/ -s "make run" | |
20 | + cargo watch -i static/ -s "PROFILE=$(PROFILE) make run" | |
21 | 21 | |
22 | 22 | wasm: |
23 | 23 | $(call msg,BUILD WASM UI) |
24 | - @wasm-pack build $(WASM_PROFILE) -d ../static/ui -t web ./ui -- \ | |
25 | - $(WASM_EXTRA) | |
24 | + @PROFILE=$(PROFILE) wasm-pack build $(WASM_PROFILE) -d ../static/ui \ | |
25 | + -t web ./ui -- $(WASM_EXTRA) | |
26 | 26 | |
27 | 27 | build: |
28 | 28 | $(call msg,BUILD SERVER) |
29 | - @cargo build $(CARGO_PROFILE) --bin artshop-server | |
29 | + @PROFILE=$(PROFILE) cargo build $(CARGO_PROFILE) --bin artshop-server | |
30 | 30 | |
31 | 31 | run: build wasm |
32 | 32 | $(call msg,RUN SERVER) |
33 | - @cargo run $(CARGO_PROFILE) --bin artshop-server | |
33 | + @PROFILE=$(PROFILE) cargo run $(CARGO_PROFILE) --bin artshop-server | |
34 | 34 | |
35 | 35 | release: |
36 | 36 | docker build -t artshop -f build/Dockerfile . | ... | ... |
... | ... | @@ -17,6 +17,8 @@ default = ["console_error_panic_hook"] |
17 | 17 | |
18 | 18 | [dependencies] |
19 | 19 | artshop-common = { path = "../common" } |
20 | +cfg-if = "1.0" | |
21 | +chrono = "0.4.15" | |
20 | 22 | console_log = "^0.1" |
21 | 23 | js-sys = "^0.3" |
22 | 24 | #katex = { version = "0.4", default-features = false, features = ["wasm-js"] } | ... | ... |
Please
register
or
login
to post a comment