Showing
4 changed files
with
10 additions
and
8 deletions
@@ -4,7 +4,7 @@ PROFILE ?= dev | @@ -4,7 +4,7 @@ PROFILE ?= dev | ||
4 | ifeq "$(PROFILE)" "release" | 4 | ifeq "$(PROFILE)" "release" |
5 | CARGO_PROFILE = --release | 5 | CARGO_PROFILE = --release |
6 | WASM_PROFILE = --release | 6 | WASM_PROFILE = --release |
7 | -WASM_EXTRA = --no-default-features | 7 | +WASM_EXTRA = --no-default-features --features wee_alloc |
8 | else | 8 | else |
9 | CARGO_PROFILE = | 9 | CARGO_PROFILE = |
10 | WASM_PROFILE = --dev | 10 | WASM_PROFILE = --dev |
@@ -17,20 +17,20 @@ endef | @@ -17,20 +17,20 @@ endef | ||
17 | 17 | ||
18 | start: | 18 | start: |
19 | systemfd --no-pid -s 0.0.0.0:3000 -- \ | 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 | wasm: | 22 | wasm: |
23 | $(call msg,BUILD WASM UI) | 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 | build: | 27 | build: |
28 | $(call msg,BUILD SERVER) | 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 | run: build wasm | 31 | run: build wasm |
32 | $(call msg,RUN SERVER) | 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 | release: | 35 | release: |
36 | docker build -t artshop -f build/Dockerfile . | 36 | docker build -t artshop -f build/Dockerfile . |
@@ -8,4 +8,4 @@ repository = "https://gitlab.weird-web-workers.org/rust/artshop" | @@ -8,4 +8,4 @@ repository = "https://gitlab.weird-web-workers.org/rust/artshop" | ||
8 | license = "GPL-3.0-or-later" | 8 | license = "GPL-3.0-or-later" |
9 | 9 | ||
10 | [dependencies] | 10 | [dependencies] |
11 | -serde = "^1.0" | 11 | +serde = { version = "^1.0", features = ["derive"] } |
@@ -22,7 +22,7 @@ flate2 = "^1.0" | @@ -22,7 +22,7 @@ flate2 = "^1.0" | ||
22 | futures = "^0.3" | 22 | futures = "^0.3" |
23 | listenfd = "0.3" | 23 | listenfd = "0.3" |
24 | r2d2 = "0.8.9" | 24 | r2d2 = "0.8.9" |
25 | -serde = "1.0" | 25 | +serde = { version = "^1.0", features = ["derive"] } |
26 | serde_derive = "1.0" | 26 | serde_derive = "1.0" |
27 | serde_json = "1.0" | 27 | serde_json = "1.0" |
28 | uuid = { version = "^0.8", features = ["v4"] } | 28 | uuid = { version = "^0.8", features = ["v4"] } |
@@ -17,6 +17,8 @@ default = ["console_error_panic_hook"] | @@ -17,6 +17,8 @@ default = ["console_error_panic_hook"] | ||
17 | 17 | ||
18 | [dependencies] | 18 | [dependencies] |
19 | artshop-common = { path = "../common" } | 19 | artshop-common = { path = "../common" } |
20 | +cfg-if = "1.0" | ||
21 | +chrono = "0.4.15" | ||
20 | console_log = "^0.1" | 22 | console_log = "^0.1" |
21 | js-sys = "^0.3" | 23 | js-sys = "^0.3" |
22 | #katex = { version = "0.4", default-features = false, features = ["wasm-js"] } | 24 | #katex = { version = "0.4", default-features = false, features = ["wasm-js"] } |
Please
register
or
login
to post a comment