-
-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Labels
bindings/uniffiuniffi bindingsuniffi bindingsenhancementNew feature or requestNew feature or request
Description
Bug Description
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 types exposed by crate a are exported in a.py, and b in b.py. In order to correctly use the library both python files needs to be imported.
The sample repository https://github.com/Hinton/maturin-repro produces the following wheel:
a.whl
a/
__init__.py
a.py
liba.dylib
a-0.1.0.dist-info/
As noted, b.py is missing which is referenced by a.py.
Your maturin version (maturin --version)
1.4.0
Your Python version (python -V)
3.9.6
Your pip version (pip -V)
21.2.4
What bindings you're using
uniffi
Does cargo build work?
- Yes, it works
If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?
- Yes
Steps to Reproduce
- Checkout https://github.com/Hinton/maturin-repro
- Run
maturin build - Unpack
target/wheels/a-0.1.0-py3-none-macosx_11_0_arm64.whl - Note missing
b.py. - Attempt to run and get an error complaining about
bmissing since it's imported froma.py.
Metadata
Metadata
Assignees
Labels
bindings/uniffiuniffi bindingsuniffi bindingsenhancementNew feature or requestNew feature or request