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

PoC for supporting uniffi bindgen with multiple crates #1910

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Hinton
Copy link
Contributor

@Hinton Hinton commented Jan 9, 2024

Uniffi supports using types from dependent crates, https://mozilla.github.io/uniffi-rs/proc_macro/index.html#types-from-dependent-crates. Consider a crate a which depends on b. This results in two python files being generated, a.py and b.py.

The previous solution relied on manually building the expected bindgen filename, which worked well with just a single python output. This atlernative approach relies on finding all python files in the target directory and including them in the wheel.

At the current stage this is a fairly brute force approach which resolves my use case. I would appreciate feedback on the general approach.

Resolves #1904

Copy link

netlify bot commented Jan 9, 2024

Deploy Preview for maturin-guide ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 36f9ac6
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/659d1818b7ff7f00089e965f
😎 Deploy Preview https://deploy-preview-1910--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.

@messense messense self-requested a review January 10, 2024 02:27
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 multiple crates not supported
1 participant