Commit ebb7d1db30707d60b9874a29dd0e13db3a9e7cfa

Authored by Georg Hopp
1 parent 4391a2e0

Some more changes to build system

... ... @@ -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 .
... ...
... ... @@ -8,4 +8,4 @@ repository = "https://gitlab.weird-web-workers.org/rust/artshop"
8 8 license = "GPL-3.0-or-later"
9 9
10 10 [dependencies]
11   -serde = "^1.0"
  11 +serde = { version = "^1.0", features = ["derive"] }
... ...
... ... @@ -22,7 +22,7 @@ flate2 = "^1.0"
22 22 futures = "^0.3"
23 23 listenfd = "0.3"
24 24 r2d2 = "0.8.9"
25   -serde = "1.0"
  25 +serde = { version = "^1.0", features = ["derive"] }
26 26 serde_derive = "1.0"
27 27 serde_json = "1.0"
28 28 uuid = { version = "^0.8", features = ["v4"] }
... ...
... ... @@ -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