From c207ec669a633079e96fc9609cb24df2e7931d0c Mon Sep 17 00:00:00 2001 From: bkioshn Date: Mon, 4 Nov 2024 11:16:28 +0700 Subject: [PATCH] fix: add code gen web Signed-off-by: bkioshn --- earthly/flutter_rust_bridge/Earthfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/earthly/flutter_rust_bridge/Earthfile b/earthly/flutter_rust_bridge/Earthfile index 861962fc..0d3a277b 100644 --- a/earthly/flutter_rust_bridge/Earthfile +++ b/earthly/flutter_rust_bridge/Earthfile @@ -8,6 +8,8 @@ IMPORT ../rust AS rust-ci builder: FROM debian:stable-slim + WORKDIR /work + RUN apt-get update \ && apt-get install -y \ apt-utils \ @@ -22,3 +24,13 @@ builder: DO rust-ci+COPY_TOOL --tool="flutter-rust-bridge-codegen" --bin="flutter_rust_bridge_codegen" RUN flutter_rust_bridge_codegen --version + +# Generated necessary files for running Flutter web. +code-generator-web: + FROM +builder + RUN flutter_rust_bridge_codegen generate + RUN flutter_rust_bridge_codegen build-web + + SAVE ARTIFACT ./web/pkg pkg + SAVE ARTIFACT ./rust/src/frb_generated.rs frb_generated + SAVE ARTIFACT ./lib/src lib_src \ No newline at end of file