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

ffi: Add Python bindings UniFFI config #3929

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 2 additions & 1 deletion bindings/matrix-sdk-crypto-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ license = "Apache-2.0"
publish = false

[lib]
name = "matrix_sdk_crypto_ffi"
crate-type = ["cdylib", "staticlib"]

[[bin]]
name = "matrix_sdk_crypto_ffi"
name = "uniffi-bindgen"
path = "uniffi-bindgen.rs"

[features]
Expand Down
3 changes: 3 additions & 0 deletions bindings/matrix-sdk-crypto-ffi/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
3 changes: 3 additions & 0 deletions bindings/matrix-sdk-crypto-ffi/uniffi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ cdylib_name = "matrix_sdk_crypto_ffi"

[bindings.swift]
module_name = "MatrixSDKCrypto"

[bindings.python]
cdylib_name = "matrix_sdk_crypto_ffi"
7 changes: 6 additions & 1 deletion bindings/matrix-sdk-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ rust-version = { workspace = true }
repository = "https://github.com/matrix-org/matrix-rust-sdk"

[lib]
name = "matrix_sdk_ffi"
crate-type = ["cdylib", "staticlib"]

[[bin]]
name = "uniffi-bindgen"
path = "uniffi-bindgen.rs"

[features]
default = ["bundled-sqlite"]
bundled-sqlite = ["matrix-sdk/bundled-sqlite"]
Expand Down Expand Up @@ -41,7 +46,7 @@ tracing-core = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
tracing-appender = { version = "0.2.2" }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
uniffi = { workspace = true, features = ["tokio"] }
uniffi = { workspace = true, features = ["cli", "tokio"] }
url = { workspace = true }
zeroize = { workspace = true }
uuid = { version = "1.4.1", features = ["v4"] }
Expand Down
3 changes: 3 additions & 0 deletions bindings/matrix-sdk-ffi/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
3 changes: 3 additions & 0 deletions bindings/matrix-sdk-ffi/uniffi-bindgen.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
uniffi::uniffi_bindgen_main()
}
5 changes: 4 additions & 1 deletion bindings/matrix-sdk-ffi/uniffi.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[bindings.kotlin]
package_name = "org.matrix.rustcomponents.sdk"
cdylib_name = "matrix_sdk_ffi"
android_cleaner = true
android_cleaner = true

[bindings.python]
cdylib_name = "matrix_sdk_ffi"
Loading