Skip to content

Feat/dart precompiled binary#1307

Open
BitcoinZavior wants to merge 17 commits intopayjoin:masterfrom
LtbLightning:feat/dart-precompiled-binary
Open

Feat/dart precompiled binary#1307
BitcoinZavior wants to merge 17 commits intopayjoin:masterfrom
LtbLightning:feat/dart-precompiled-binary

Conversation

@BitcoinZavior
Copy link
Contributor

@BitcoinZavior BitcoinZavior commented Feb 2, 2026

Details

Precompiled Binaries Feature

Resolves #1308
This PR introduces a comprehensive precompiled binaries system that significantly improves the developer experience by reducing build times and providing secure, signed artifacts.

Key Features

Secure Distribution

  • Ed25519-signed precompiled binaries with public key verification
  • Automated signing and verification pipeline
  • Secure artifact hosting via GitHub Releases

Performance Improvements

  • Skip local Rust compilation for supported platforms
  • Automatic fallback to local builds when precompiled binaries unavailable
  • Configurable modes: auto, always, or never

Developer Experience

  • Zero-configuration setup for most users
  • Comprehensive CLI tooling for maintainers
  • Detailed documentation and troubleshooting guides

Configuration

Users can configure precompiled binaries in their pubspec.yaml:
Defaulting to auto which most users would want.

payjoin_dart:
  precompiled_binaries:
    mode: auto  # auto | always | never

Done the old fashioned way without AI

Pull Request Checklist

Please confirm the following before requesting review:

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 21574637307

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 83.203%

Totals Coverage Status
Change from base Build 21447062880: 0.0%
Covered Lines: 10140
Relevant Lines: 12187

💛 - Coveralls

Copy link
Contributor

@DanGould DanGould left a comment

Choose a reason for hiding this comment

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

Whoa, massive PR! Thanks for your contribution.

I am curious about the history first. Having a bit of trouble understanding how this came together piece by piece because as far as I can tell each commit does not build on the previous one (in that I can run some code at each stage and see it evolve from a simple MVP to a full blown precompilation software tooling suite). Can you help me understand what each piece does?

One example of something I'm confused about is the dart CLI to build. What does that do that benefits from dart tooling vs some universal tooling that could work across projects (if that's even possible, I really don't know).

This is going to be really hard to review as 6k lines. Is there any intermediate step that or guidance you could give me to make this easier to review?

CI failure is OK for a start but we'll have to address that to merge, too.

!example.config.toml
*.sqlite
Cargo.lock

Copy link
Contributor

Choose a reason for hiding this comment

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

? why include this commit

Comment on lines +10 to +13
dependencies:
payjoin:
path: ../rust-payjoin/payjoin-ffi/dart
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the SOP be to get this from pub.dev? Why mention path?

dart test
```

Maintainers: see `docs/precompiled_binaries.md` for CI details, manual release steps, and configuration.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this file exists as of commit 1e57740 where this is introduced

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, yes, adding it now.

Copy link
Contributor

Choose a reason for hiding this comment

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

May you explain the purpose of this file? I'm new to precompiled binaries and it's not readily apparent what this is for. If the rationale was left in a the commit log it'd be super helpful for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter/Dart - Support prebuilt binaries as default (with opt-in source builds)

3 participants