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

Add support for uniffi library mode #1729

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ macos_arm64_task:
- cat Cargo.lock
install_script:
- brew install python3
- python3 -m pip install uniffi-bindgen==0.24.1
- python3 -m pip install uniffi-bindgen==0.25.0
<<: *BUILD_AND_TEST

linux_aarch64_task:
Expand All @@ -62,5 +62,5 @@ linux_aarch64_task:
- echo $CIRRUS_OS
- cat Cargo.lock
install_script:
- python3 -m pip install uniffi-bindgen==0.24.1
- python3 -m pip install uniffi-bindgen==0.25.0
<<: *BUILD_AND_TEST
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
if: ${{ !contains(matrix.python-version, 'pypy') }}
run: pip install cffi
- name: Install python packages
run: pip install virtualenv ziglang~=0.10.0 twine uniffi-bindgen==0.24.1
run: pip install virtualenv ziglang~=0.10.0 twine uniffi-bindgen==0.25.0
- uses: dtolnay/rust-toolchain@stable
id: rustup
with:
Expand Down
7 changes: 0 additions & 7 deletions src/module_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,13 +921,6 @@ fn generate_uniffi_bindings(
false
};

// Disallow library mode without UDL files for now
// Should be removed in https://github.com/PyO3/maturin/pull/1729
// once uniffi release a new version
if is_library {
bail!("No UDL files found in {}", crate_dir.join("src").display());
}

let mut cmd = uniffi_bindgen_command(crate_dir)?;
cmd.current_dir(crate_dir);
cmd.args([
Expand Down
4 changes: 2 additions & 2 deletions src/templates/Cargo.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ pyo3 = "0.19.0"
{% elif bindings == "rust-cpython" -%}
cpython = "0.7.1"
{% elif bindings == "uniffi" -%}
uniffi = "0.24.1"
uniffi = "0.25.0"

[build-dependencies]
uniffi = { version = "0.24.1", features = ["build"] }
uniffi = { version = "0.25.0", features = ["build"] }
{% endif -%}
Loading
Loading