Skip to content

fix(build): include Cargo config in pub archive - #134

Open
reez wants to merge 1 commit into
bitcoindevkit:mainfrom
reez:pubpackarc
Open

reez wants to merge 1 commit into
bitcoindevkit:mainfrom
reez:pubpackarc

Conversation

@reez

@reez reez commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Pub.dev omits the hidden native/.cargo directory, but the build hook passes its config.toml path to Cargo, causing published-package builds to fail.

This moves the config to native/cargo-config.toml, updates the build references, and adds CI coverage confirming the file is included in the publish archive.

@reez
reez requested a review from Johnosezele September 16, 2026 14:38
@reez

reez commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator Author

@Johnosezele (and anyone else that wants to give feedback) does moving the Cargo config to a non hidden path and verifying it in the pub.dev package manifest seem like the right fix, or is there a better Dart packaging convention we should use?

@Johnosezele

Copy link
Copy Markdown
Collaborator

I think moving the file is the right approach. Dart excludes hidden folders like .cargo from published packages, and there isn’t another Dart packaging convention for Cargo config files.

We could keep .cargo/config.toml using .pubignore exceptions, but that’s more fragile. Since the build already tells Cargo where the config is with --config, using native/cargo-config.toml seems cleaner.

Only small suggestion: make the CI check verify the exact archived file if possible, rather than matching any file named cargo-config.toml.

@Johnosezele Johnosezele left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Only tradeoff I see is that direct Cargo builds from native/ will no longer discover the config automatically, so those builds must also pass --config.

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.

2 participants