File tree 2 files changed +12
-8
lines changed 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -3,20 +3,22 @@ RUN cargo install cargo-chef
3
3
RUN cargo install trunk
4
4
RUN rustup target add wasm32-unknown-unknown
5
5
6
- FROM base as planner
7
- WORKDIR /usr/src/sumi
8
- COPY . .
9
- RUN cargo chef prepare --recipe-path recipe.json
10
-
11
6
FROM base as cacher
12
7
WORKDIR /usr/src/sumi
13
- COPY --from=planner /usr/src/sumi/recipe.json recipe.json
14
- RUN cargo chef cook --release --recipe-path recipe.json
8
+ COPY ./Cargo.lock ./
9
+ COPY ./Cargo.toml ./
10
+ COPY ./frontend/Cargo.toml ./frontend/Cargo.toml
11
+ COPY ./backend/Cargo.toml ./backend/Cargo.toml
12
+ COPY ./frontend/.cargo ./frontend/.cargo
13
+ RUN mkdir ./backend/src && mkdir ./frontend/src && echo 'fn main() { println!("Dummy"); }' > ./backend/src/main.rs && echo 'fn main() { println!("Dummy"); } ' > ./frontend/src/lib.rs
14
+ RUN cargo build --release --manifest-path ./backend/Cargo.toml
15
+ WORKDIR /usr/src/sumi/frontend
16
+ RUN cargo build --release
15
17
16
18
FROM base as builder
17
19
WORKDIR /usr/src/sumi
18
- COPY . .
19
20
COPY --from=cacher /usr/src/sumi/target target
21
+ COPY . .
20
22
RUN trunk build -d dist ./frontend/index.html --release
21
23
RUN cargo build --manifest-path ./backend/Cargo.toml --release
22
24
Original file line number Diff line number Diff line change
1
+ [build ]
2
+ target = " wasm32-unknown-unknown"
You can’t perform that action at this time.
0 commit comments