diff --git a/.config/dictionaries/project.dic b/.config/dictionaries/project.dic index b2c7866f9..38dad90c8 100644 --- a/.config/dictionaries/project.dic +++ b/.config/dictionaries/project.dic @@ -55,6 +55,7 @@ gopls gosec graphviz idents +iohk ipynb javascripts JDBC diff --git a/Justfile b/Justfile index ffa493350..348a425b4 100644 --- a/Justfile +++ b/Justfile @@ -14,7 +14,6 @@ check-spelling: earthly +clean-spelling-list earthly +check-spelling - # Fix and Check Code Format for Python files format-python-code: ruff check --select I --fix . diff --git a/earthly/flutter_rust_bridge/Earthfile b/earthly/flutter_rust_bridge/Earthfile index 0c9bcb3ee..95292894f 100644 --- a/earthly/flutter_rust_bridge/Earthfile +++ b/earthly/flutter_rust_bridge/Earthfile @@ -22,7 +22,8 @@ builder: git \ build-essential \ curl \ - unzip + unzip \ + clang DO flutter-ci+INSTALL_FLUTTER DO rust-ci+INSTALL_RUST @@ -31,11 +32,20 @@ builder: # Generated necessary files for running Flutter web. CODE_GENERATOR_WEB: FUNCTION + ARG --required WASM_MODULE_NAME - RUN flutter_rust_bridge_codegen generate --default-external-library-loader-web-prefix=/assets/packages/catalyst_key_derivation/assets/js/ - # https://blog.rust-lang.org/2025/04/04/c-abi-changes-for-wasm32-unknown-unknown/ - RUN flutter_rust_bridge_codegen build-web + # TODO(dt-iohk): revert to official version when changes from the fork are merged into the official version + GIT CLONE --branch feat/wasm-bindgen-configurable-module https://github.com/input-output-hk/catalyst_flutter_rust_bridge.git /usr/local/flutter_rust_bridge + RUN cargo run --manifest-path /usr/local/flutter_rust_bridge/frb_codegen/Cargo.toml -- generate + RUN cargo run --manifest-path /usr/local/flutter_rust_bridge/frb_codegen/Cargo.toml -- build-web --wasm-bindgen-args="--no-modules-global=$WASM_MODULE_NAME" + + # RUN flutter_rust_bridge_codegen generate + # TODO(damian-molinski) add --release flag to the command below to optimize for performance + # RUN flutter_rust_bridge_codegen build-web --wasm-bindgen-args="--no-modules-global=$WASM_MODULE_NAME" RUN mkdir -p assets/js && cp -rf ./web/pkg/* assets/js/ # Don't want this gitignore file. RUN rm -rf ./assets/js/.gitignore + + # Reformat code once it's generated under lib directory. + RUN dart format lib diff --git a/earthly/rust/Earthfile b/earthly/rust/Earthfile index ff147bd94..394770ff2 100644 --- a/earthly/rust/Earthfile +++ b/earthly/rust/Earthfile @@ -463,5 +463,6 @@ INSTALL_TOOLS: DO +COPY_TOOL --tool="cargo-sweep" DO +COPY_TOOL --tool="cargo-component" DO +COPY_TOOL --tool="wasm-pack" - DO +COPY_TOOL --tool="flutter-rust-bridge-codegen" --bin="flutter_rust_bridge_codegen" + # TODO(dt-iohk): reenable when we're no longer using forked flutter_rust_bridge + # DO +COPY_TOOL --tool="flutter-rust-bridge-codegen" --bin="flutter_rust_bridge_codegen" \ No newline at end of file diff --git a/earthly/rust/stdcfgs/deny.toml b/earthly/rust/stdcfgs/deny.toml index 0dbd4732d..db1d6c582 100644 --- a/earthly/rust/stdcfgs/deny.toml +++ b/earthly/rust/stdcfgs/deny.toml @@ -63,6 +63,8 @@ allow-git = [ "https://github.com/input-output-hk/mithril", # Maintained fork of an archived crates-io version. "https://github.com/dariusc93/rust-ipfs", + # TODO(dt-iohk): remove this when changes from forked flutter_rust_bridge are merged into the official version + "https://github.com/input-output-hk/catalyst_flutter_rust_bridge", ] [licenses] @@ -109,7 +111,6 @@ crate = "ring" expression = "MIT" license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }] - # SPDX considers OpenSSL to encompass both the OpenSSL and SSLeay licenses # https://spdx.org/licenses/OpenSSL.html # ISC - Both BoringSSL and ring use this for their new files diff --git a/examples/rust/deny.toml b/examples/rust/deny.toml index bc68ee126..db1d6c582 100644 --- a/examples/rust/deny.toml +++ b/examples/rust/deny.toml @@ -63,6 +63,8 @@ allow-git = [ "https://github.com/input-output-hk/mithril", # Maintained fork of an archived crates-io version. "https://github.com/dariusc93/rust-ipfs", + # TODO(dt-iohk): remove this when changes from forked flutter_rust_bridge are merged into the official version + "https://github.com/input-output-hk/catalyst_flutter_rust_bridge", ] [licenses]