Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ gopls
gosec
graphviz
idents
iohk
ipynb
javascripts
JDBC
Expand Down
1 change: 0 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
18 changes: 14 additions & 4 deletions earthly/flutter_rust_bridge/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ builder:
git \
build-essential \
curl \
unzip
unzip \
clang

DO flutter-ci+INSTALL_FLUTTER
DO rust-ci+INSTALL_RUST
Expand All @@ -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 are merged
GIT CLONE --branch feat/wasm_bindgen_configurable https://github.com/dt-iohk/flutter_rust_bridge.git /usr/local/flutter_rust_bridge
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay of doing it this way, but let's comment out flutter_rust_bridge thing from INSTALL_TOOLS and tool-flutter-rust-bridge-codegen and make some note there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. These changes are temporary. I hope it's short lived rather than long-lived but depends on how much time it'll take to merge it to the original lib.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarification, I'm not going to merge this PR while it still points to my own fork, I'll wait until we have the IOHK one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides from that LGTM

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
3 changes: 2 additions & 1 deletion earthly/rust/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"

3 changes: 2 additions & 1 deletion earthly/rust/stdcfgs/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,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 forked flutter_rust_bridge is no longer needed
"https://github.com/dt-iohk/flutter_rust_bridge",
]

[licenses]
Expand Down Expand Up @@ -106,7 +108,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
Expand Down
2 changes: 1 addition & 1 deletion earthly/rust/stdcfgs/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.88"
channel = "1.89"
profile = "default"
2 changes: 2 additions & 0 deletions examples/rust/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,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 forked flutter_rust_bridge is no longer needed
"https://github.com/dt-iohk/flutter_rust_bridge",
]

[licenses]
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.88"
channel = "1.89"
profile = "default"
Loading