Skip to content

feat(python): generate Python wrapper with UniFFI instead of pyo3#391

Merged
Sébastien Duquette (sduquette-devolutions) merged 1 commit into
masterfrom
experiment/uniffi-python
Jun 3, 2026
Merged

feat(python): generate Python wrapper with UniFFI instead of pyo3#391
Sébastien Duquette (sduquette-devolutions) merged 1 commit into
masterfrom
experiment/uniffi-python

Conversation

@mmorrissette-devolutions
Copy link
Copy Markdown
Contributor

@mmorrissette-devolutions mmorrissette-devolutions commented Jun 1, 2026

Builds the Python bindings from the existing devolutions-crypto-uniffi scaffolding via maturin (bindings = "uniffi") instead of pyo3. Still imported as import devolutions_crypto.

Breaking API change (shapes follow UniFFI); the wrapper is testing-only. Verified locally: wheel builds, installs, and the ported test suite passes (23/23).

@mmorrissette-devolutions mmorrissette-devolutions force-pushed the experiment/uniffi-python branch 4 times, most recently from 9484126 to fbf9711 Compare June 3, 2026 14:25
@mmorrissette-devolutions mmorrissette-devolutions marked this pull request as ready for review June 3, 2026 15:19
@mmorrissette-devolutions mmorrissette-devolutions requested a review from a team as a code owner June 3, 2026 15:19
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fbf971137a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread Cargo.toml
Build the Python bindings from the existing devolutions-crypto-uniffi
scaffolding via maturin (bindings = "uniffi") rather than a hand-written pyo3
wrapper. Still imported as `devolutions_crypto`.

- Drop the pyo3 crate and the hand-written .pyi stub; the python/ crate now
  only hosts the uniffi-bindgen binary maturin invokes
- Gate that binary's uniffi CLI dependency to non-wasm targets so wasm builds
  (wasm-pack over the workspace) are unaffected
- Build a single py3-none wheel per target in CI (UniFFI bindings are
  ABI-independent, so the per-Python-version matrix is no longer needed)
- Port the Python test suite to the UniFFI API and add derive_encrypt tests
  mirroring the other wrappers
- Update the PyPI usage examples for the UniFFI API

This is a breaking API change for Python consumers (shapes follow UniFFI);
the wrapper is used only for testing.
@sduquette-devolutions Sébastien Duquette (sduquette-devolutions) merged commit 2a547bf into master Jun 3, 2026
27 checks passed
@sduquette-devolutions Sébastien Duquette (sduquette-devolutions) deleted the experiment/uniffi-python branch June 3, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants