Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support uniffi-bindgen in cargo workspaces #1909

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

Hinton
Copy link
Contributor

@Hinton Hinton commented Jan 9, 2024

Uniffi suggests using a separate crate for uniffi-bindgen in a multi-crate workspace, https://mozilla.github.io/uniffi-rs/tutorial/foreign_language_bindings.html#multi-crate-workspaces. This workflow is currently not supported in maturin.

This PR expands the uniffi_bindgen_command to evaluate if the workspace has a bindgen package, and if so it runs the bindgen command from the root of the workspace. This seems to work correctly in my project https://github.com/Hinton/maturin-repro.

Resolves #1905

Copy link

netlify bot commented Jan 9, 2024

Deploy Preview for maturin-guide ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1039832
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/659d14cb76731b0008d39ea6
😎 Deploy Preview https://deploy-preview-1909--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@messense messense merged commit 3deff21 into PyO3:main Jan 9, 2024
29 checks passed
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Mar 18, 2024
https://build.opensuse.org/request/show/1158801
by user mia + anag+factory
- Update to 1.5.0
  * tutorial: fix abi to match comment
    gh#PyO3/maturin#1876
  * Allow identical VIRTUAL_ENV and CONDA_PREFIX env vars
    gh#PyO3/maturin#1879
  * Upgrade pyo3 to 0.20
    gh#PyO3/maturin#1881
  * Skip directory when adding license files to wheel
    gh#PyO3/maturin#1890
  * Reject -i python when cross compiling
    gh#PyO3/maturin#1891
  * simplified clear-cache github action
    gh#PyO3/maturin#1897
  * Support uniffi-bindgen in cargo workspaces
    gh#PyO3/maturin#1909
  * Upgrade globlin to 0.8.0
    gh#PyO3/maturin#1912
  * Update **Note** to [!NOTE] in README
    gh#PyO3/maturin#1917
  * Match dependency readmes
    gh#PyO3/maturin#1915
  * Update some actions version in generate ci cli
    gh#PyO3/maturin#1916
  * Use extension name as library name, instead of h
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.

Uniffi-bindgen not detected in cargo workspace
2 participants