Skip to content

Commit e22de42

Browse files
feat: update to [email protected] (#168)
* feat: update to [email protected] * update to released
1 parent 1522bae commit e22de42

File tree

8 files changed

+294
-183
lines changed

8 files changed

+294
-183
lines changed

Cargo.lock

Lines changed: 280 additions & 167 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "iroh-ffi"
3-
version = "0.20.0"
3+
version = "0.21.0"
44
edition = "2021"
55
publish = false
66
readme = "README.md"
@@ -30,13 +30,11 @@ async-trait = "0.1.80"
3030
blake3 = "1.3.3"
3131
bytes = "1"
3232
data-encoding = { version = "2.3.3" }
33-
iroh = { version = "0.20.0" }
33+
iroh = { version = "0.21.0" }
3434
iroh-io = { version = "0.6.0" }
3535
libc = "0.2.141"
36-
multibase = { version = "0.9.1" }
3736
num_cpus = { version = "1.15.0" }
3837
range-collections = "0.4.0"
39-
tempfile = "3.4"
4038
thiserror = "1.0.44"
4139
tokio = "1.25.0"
4240
tokio-util = { version = "0.7", features = ["io-util", "io"] }
@@ -51,6 +49,7 @@ serde_json = "1.0.113"
5149

5250
[dev-dependencies]
5351
rand = "0.8"
52+
tempfile = "3.4"
5453
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
5554
tokio = { version = "1", features = ["full"] }
5655

IrohLib.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Pod::Spec.new do |spec|
22
spec.name = "IrohLib"
3-
spec.version = "0.20.0"
3+
spec.version = "0.21.0"
44
spec.summary = "iroh is a toolkit for building distributed apps"
55
spec.description = <<-DESC
66
Build distributed apps that raise the status quo for your users.
7-
Open source and universally compatible, it's the quickest route from
7+
Open source and universally compatible, it's the quickest route from
88
concept to connected devices.
99
DESC
1010
spec.homepage = "https://iroh.computer"
@@ -22,4 +22,4 @@ Pod::Spec.new do |spec|
2222
spec.framework = "SystemConfiguration"
2323
spec.ios.deployment_target = '15.0'
2424
spec.dependency 'IrohLibFramework', "#{spec.version}"
25-
end
25+
end

IrohLibFramework.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = "IrohLibFramework"
3-
spec.version = "0.20.0"
3+
spec.version = "0.21.0"
44
spec.summary = "Complied rust cocoa framework for Iroh"
55
spec.description = <<-DESC
66
Complied rust cocoa framework for Iroh.
@@ -15,4 +15,4 @@ Pod::Spec.new do |spec|
1515
spec.static_framework = true
1616
spec.source = { :http => "https://github.com/n0-computer/iroh-ffi/releases/download/v#{spec.version}/IrohLib.xcframework.zip" }
1717
spec.vendored_frameworks = 'Iroh.xcframework'
18-
end
18+
end

kotlin/blob_test.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ runBlocking {
286286
// delete the tag for the first blob
287287
node.tags().delete(removeTag)
288288
// wait for GC to clear the blob
289-
java.lang.Thread.sleep(250)
289+
java.lang.Thread.sleep(500)
290290

291291
val clearedHashes = node.blobs().list()
292292
assert(clearedHashes.size == numBlobs - 1)

python/blob_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ async def test_list_and_delete():
246246
# delete the tag for the first blob
247247
await node.tags().delete(remove_tag)
248248
# wait for GC to clear the blob
249-
time.sleep(0.25)
249+
time.sleep(0.5)
250250

251251
got_hashes = await node.blobs().list()
252252
assert len(got_hashes) == num_blobs - 1

src/blob.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,7 @@ mod tests {
15251525
let iroh_dir = tempfile::tempdir().unwrap();
15261526
// we're going to use a very fast GC interval to get this test to delete stuff aggressively
15271527
let opts = NodeOptions {
1528-
gc_interval_millis: Some(100),
1528+
gc_interval_millis: Some(50),
15291529
};
15301530
let node = Iroh::persistent_with_options(iroh_dir.into_path().display().to_string(), opts)
15311531
.await
@@ -1559,7 +1559,7 @@ mod tests {
15591559
// delete the tag for the first blob
15601560
node.tags().delete(remove_tag).await.unwrap();
15611561
// wait for GC to clear the blob. windows test runner is slow & needs like 500ms
1562-
std::thread::sleep(Duration::from_millis(500));
1562+
tokio::time::sleep(Duration::from_secs(1)).await;
15631563

15641564
let got_hashes = node.blobs().list().await.unwrap();
15651565
assert_eq!(num_blobs - 1, got_hashes.len());

src/doc.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use std::{path::PathBuf, str::FromStr, sync::Arc, time::SystemTime};
22

33
use bytes::Bytes;
44
use futures::{StreamExt, TryStreamExt};
5-
use iroh::client::MemDoc;
65
use serde::{Deserialize, Serialize};
76

87
use crate::{ticket::AddrInfoOptions, AuthorId, CallbackError, Hash, Iroh, IrohError, PublicKey};
@@ -147,7 +146,7 @@ pub struct NamespaceAndCapability {
147146
/// A representation of a mutable, synchronizable key-value store.
148147
#[derive(Clone, uniffi::Object)]
149148
pub struct Doc {
150-
pub(crate) inner: MemDoc,
149+
pub(crate) inner: iroh::client::Doc,
151150
}
152151

153152
#[uniffi::export]
@@ -246,7 +245,7 @@ impl Doc {
246245
///
247246
/// Returns the number of entries deleted.
248247
#[uniffi::method(async_runtime = "tokio")]
249-
pub async fn delete_entry(
248+
pub async fn delete(
250249
&self,
251250
author_id: Arc<AuthorId>,
252251
prefix: Vec<u8>,

0 commit comments

Comments
 (0)