Upgrade UniFFI

This commit is contained in:
Jonas Platte
2023-01-11 12:23:18 +01:00
committed by Jonas Platte
parent 6a9cf1f9ce
commit 7af2bea2fc
8 changed files with 18 additions and 29 deletions

27
Cargo.lock generated
View File

@@ -5652,8 +5652,7 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
[[package]]
name = "uniffi"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f71cc01459bc34cfe43fabf32b39f1228709bc6db1b3a664a92940af3d062376"
source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"anyhow",
"camino",
@@ -5674,8 +5673,7 @@ dependencies = [
[[package]]
name = "uniffi_bindgen"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbbba5103051c18f10b22f80a74439ddf7100273f217a547005d2735b2498994"
source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"anyhow",
"askama",
@@ -5698,8 +5696,7 @@ dependencies = [
[[package]]
name = "uniffi_build"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ee1a28368ff3d83717e3d3e2e15a66269c43488c3f036914131bb68892f29fb"
source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"anyhow",
"camino",
@@ -5709,8 +5706,7 @@ dependencies = [
[[package]]
name = "uniffi_checksum_derive"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03de61393a42b4ad4984a3763c0600594ac3e57e5aaa1d05cede933958987c03"
source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"quote",
"syn",
@@ -5719,8 +5715,7 @@ dependencies = [
[[package]]
name = "uniffi_core"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a2b4852d638d74ca2d70e450475efb6d91fe6d54a7cd8d6bd80ad2ee6cd7daa"
source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"anyhow",
"bytes",
@@ -5735,8 +5730,7 @@ dependencies = [
[[package]]
name = "uniffi_macros"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa03394de21e759e0022f1ea8d992d2e39290d735b9ed52b1f74b20a684f794e"
source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"bincode",
"camino",
@@ -5754,8 +5748,7 @@ dependencies = [
[[package]]
name = "uniffi_meta"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66fdab2c436aed7a6391bec64204ec33948bfed9b11b303235740771f85c4ea6"
source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"serde",
"siphasher",
@@ -5765,8 +5758,7 @@ dependencies = [
[[package]]
name = "uniffi_testing"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92b0570953ec41d97ce23e3b92161ac18231670a1f97523258a6d2ab76d7f76c"
source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"anyhow",
"camino",
@@ -6050,8 +6042,7 @@ dependencies = [
[[package]]
name = "weedle2"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e79c5206e1f43a2306fd64bdb95025ee4228960f2e6c5a8b173f3caaf807741"
source = "git+https://github.com/mozilla/uniffi-rs?rev=58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4#58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4"
dependencies = [
"nom",
]

View File

@@ -38,8 +38,8 @@ serde_html_form = "0.2.0"
serde_json = "1.0.91"
thiserror = "1.0.38"
tracing = { version = "0.1.36", default-features = false, features = ["std"] }
uniffi = "0.23.0"
uniffi_bindgen = "0.23.0"
uniffi = { git = "https://github.com/mozilla/uniffi-rs", rev = "58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4" }
uniffi_bindgen = { git = "https://github.com/mozilla/uniffi-rs", rev = "58758341b72e9e8ff51ecd57a3eb22d6cc41a4b4" }
vodozemac = { git = "https://github.com/matrix-org/vodozemac", rev = "fb609ca1e4df5a7a818490ae86ac694119e41e71" }
zeroize = "1.3.0"

View File

@@ -27,8 +27,7 @@ pub enum PkDecryptionError {
}
/// Error type for the decoding and storing of the backup key.
#[derive(Debug, Error, uniffi::Error)]
#[uniffi(flat_error)]
#[derive(Debug, Error)]
pub enum DecodeError {
/// An error happened while decoding the recovery key.
#[error(transparent)]
@@ -41,7 +40,7 @@ pub enum DecodeError {
/// Struct containing info about the way the backup key got derived from a
/// passphrase.
#[derive(Debug, Clone, uniffi::Record)]
#[derive(Debug, Clone)]
pub struct PassphraseInfo {
/// The salt that was used during key derivation.
pub private_key_salt: String,

View File

@@ -39,8 +39,7 @@ pub enum SignatureError {
UnknownUserIdentity(String),
}
#[derive(Debug, thiserror::Error, uniffi::Error)]
#[uniffi(flat_error)]
#[derive(Debug, thiserror::Error)]
pub enum CryptoStoreError {
#[error("Failed to open the store")]
OpenStore(#[from] OpenStoreError),

View File

@@ -47,6 +47,7 @@ use ruma::{
};
use serde::{Deserialize, Serialize};
use tokio::runtime::Runtime;
use uniffi_api::*;
pub use users::UserIdentity;
pub use verification::{
CancelInfo, ConfirmVerificationResult, QrCode, QrCodeListener, QrCodeState,

View File

@@ -112,7 +112,7 @@ impl From<ToDeviceRequest> for OutgoingVerificationRequest {
}
}
#[derive(Debug, uniffi::Enum)]
#[derive(Debug)]
pub enum Request {
ToDevice { request_id: String, event_type: String, body: String },
KeysUpload { request_id: String, body: String },

View File

@@ -39,7 +39,7 @@ pub struct Room {
timeline: TimelineLock,
}
#[derive(Clone, uniffi::Enum)]
#[derive(Clone)]
pub enum MembershipState {
/// The user is banned.
Ban,

View File

@@ -254,7 +254,6 @@ pub struct UpdateSummary {
pub rooms: Vec<String>,
}
#[derive(uniffi::Record)]
pub struct RequiredState {
pub key: String,
pub value: String,
@@ -324,7 +323,7 @@ impl From<VectorDiff<MatrixRoomEntry>> for SlidingSyncListRoomsListDiff {
}
}
#[derive(Clone, Debug, uniffi::Enum)]
#[derive(Clone, Debug)]
pub enum RoomListEntry {
Empty,
Invalidated { room_id: String },