Skip to content

Conversation

dt-iohk
Copy link
Contributor

@dt-iohk dt-iohk commented Sep 4, 2025

Description

  • Reimplements catalyst_compression with rust using flutter_rust_bridge.
  • Removes the old (web-only) implementation of catalyst_compression. The federated packages published to pub.dev will be discontinued, only catalyst_compression will remain active.
  • Follows a similar implementation path as for catalyst_key_derivation.
  • Builds on top of forked flutter_rust_bridge since the official version doesn't allow to run two packages built with the tool in the same app on the web platform. Each package exports global modules under window.wasm_bindgen and they conflict with each other. The fork added configuration options to differentiate between modules. The changes done in the fork will be moved to iohk owned repository once it is available. A PR will be opened to merge the changes from the fork to the official version.
  • Adds the flutter_rust_bridge boilerplate that must be committed into the repository. You can skip reviewing it (pattern for these files: **/cargokit/**).
  • rust version, lint rules and other configuration is synced with the rust template from catalyst-ci, every rust project including the ones built with flutter_rust_bridge is reusing the configuration.
  • Reviewed and fixed lint issues, re-enabled disabled targets in Earthfiles and Justfiles related to flutter_rust_bridge.
  • Updated pre-push tasks in all justfiles to make sure all necessary checks are run.
  • To build flutter web no cargo/rust setup needed. To build any native version working cargo/rust setup is needed. This can be mitigated with precompiled rust binaries but at the moment it was decided to skip it. You can install rust/cargo using rustup from here.
  • Dropped integration tests for packages built with flutter_rust_bridge, these tests were failing and disabled. Instead added tests in rust code and made sure they are run and passing in the CI. In the future when native assets are ready we might create regular dart unit tests running on the host machine instead of integration tests which require browser and are flaky.

Related Issue(s)

Closes #3266
Depends on input-output-hk/catalyst-ci#448

Please confirm the following checks

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream module

…ompression-with-rust

# Conflicts:
#	Earthfile
#	catalyst-gateway/event-db/Earthfile
#	catalyst-gateway/tests/Earthfile
#	catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/Earthfile
#	catalyst_voices/packages/libs/catalyst_key_derivation/Earthfile
#	catalyst_voices/utilities/uikit_example/Earthfile
#	docs/Earthfile
#	utilities/docs-preview/Earthfile
@dt-iohk dt-iohk self-assigned this Sep 4, 2025
@dt-iohk dt-iohk added this to Catalyst Sep 4, 2025
@dt-iohk dt-iohk added do not merge yet PR is not ready to be merged yet do not review yet Do not review yet squad: face Frontend Catalyst Experience Team labels Sep 4, 2025
@dt-iohk dt-iohk added the no-track Used to skip tracking in Swarmia analytics, etc. label Sep 4, 2025
@dt-iohk dt-iohk changed the base branch from main to feat/enable-mobile-support-voices September 4, 2025 09:11
@dt-iohk dt-iohk added the draft Draft label Sep 4, 2025
…ompression-with-rust

# Conflicts:
#	Earthfile
#	catalyst-gateway/Earthfile
#	catalyst-gateway/event-db/Earthfile
#	catalyst-gateway/tests/Earthfile
#	catalyst_voices/Earthfile
#	catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/Earthfile
#	catalyst_voices/packages/libs/catalyst_key_derivation/Earthfile
#	catalyst_voices/packages/libs/catalyst_key_derivation/rust/Earthfile
#	catalyst_voices/utilities/uikit_example/Earthfile
#	docs/Earthfile
#	utilities/docs-preview/Earthfile
@dt-iohk dt-iohk requested a review from Mr-Leshiy September 11, 2025 12:54
Copy link
Contributor

📚 Docs Preview

The docs for this PR can be previewed at the following URL:

https://docs.dev.projectcatalyst.io/voices/feat/catalyst-compression-with-rust

Copy link
Contributor

@LynxLynxx LynxLynxx left a comment

Choose a reason for hiding this comment

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

From Dart perspective only formatting is mixed up a little bit. But I'm not sure if these files are generated and this the answer to that formatting problem

Copy link
Contributor

@damian-molinski damian-molinski left a comment

Choose a reason for hiding this comment

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

Was able to build and run same code on web android and iOS. Very important PR!

One small comment tho

LGTM

Copy link
Contributor

@Mr-Leshiy Mr-Leshiy left a comment

Choose a reason for hiding this comment

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

Rust part LGTM, but dont forget to change cat-ci version to some release from feat/catalyst-compression-setup

@dt-iohk dt-iohk merged commit 3e59cbf into feat/enable-mobile-support-voices Sep 12, 2025
44 checks passed
@dt-iohk dt-iohk deleted the feat/catalyst-compression-with-rust branch September 12, 2025 14:04
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Catalyst Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dart Pull requests that update Dart code F15 review me PR is ready for review squad: face Frontend Catalyst Experience Team
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

First
4 participants