Avatar
Yuki Kishimoto
68d81165918100b7da43fc28f7d1fc12554466e1115886b9e7bb326f65ec4272
GitHub: https://github.com/yukibtc PGP: 86F3 105A DFA8 AB58 7268 DCD7 8D3D CD04 2496 19D1
Replying to Avatar dluvian

nostr:npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e0vgfeq0eseet is it possible to use the underlying http client of nostr-relay-pool to make regular http requests or do I have to include a new dependency to some http lib for this?

No, for HTTP requests I'm using reqwest

It's now available a pre-release of the nostr-sdk library for Kotlin JVM (linux, macos and windows)!

```kotlin

implementation("org.rust-nostr:nostr-sdk-jvm:0.39.0-alpha.1")

```

https://central.sonatype.com/artifact/org.rust-nostr/nostr-sdk-jvm

Does anyone know if it's possible to cross-compile rust from Linux to iOS targets?

#rustlang #ios #asknostr

nostr:npub1acg6thl5psv62405rljzkj8spesceyfz2c32udakc2ak0dmvfeyse9p35c, I'm trying with this example:

```toml

[dependencies]

nostr-sdk = { version = "0.38", features = ["lmdb"] }

tokio = { version = "1.42", features = ["full"] }

tracing-subscriber = { version = "0.3", features = ["env-filter"] }

```

```rust

use nostr_sdk::prelude::*;

#[tokio::main]

async fn main() -> Result<()> {

tracing_subscriber::fmt::init();

let keys = Keys::parse("nsec1ufnus6pju578ste3v90xd5m2decpuzpql2295m3sknqcjzyys9ls0qlc85")?;

let database = NostrLMDB::open("./db/nostr-lmdb")?;

let client: Client = ClientBuilder::default()

.signer(keys.clone())

.database(database)

.build();

client.add_relay("wss://chorus.mikedilger.com:444").await?;

client.connect().await;

let since = Timestamp::from_secs(1736726400);

let until = Timestamp::from_secs(1737331200);

let filter = Filter::new().kind(Kind::TextNote).since(since).until(until); // Sync the text notes of the last week

// Negentropy options

let (tx, mut rx) = SyncProgress::channel();

let opts = SyncOptions::default().progress(tx);

// Keep track of the progress

tokio::spawn(async move {

while rx.changed().await.is_ok() {

let progress = *rx.borrow_and_update();

if progress.total > 0 {

println!("{:.2}%", progress.percentage() * 100.0);

}

}

});

// Sync

let output = client.sync(filter, &opts).await?;

// Sync output

println!("Local: {}", output.local.len());

println!("Remote: {}", output.remote.len());

println!("Sent: {}", output.sent.len());

println!("Received: {}", output.received.len());

println!("Failures:");

for (url, map) in output.send_failures.iter() {

println!("* '{url}':");

for (id, e) in map.iter() {

println!(" - {id}: {e}");

}

}

Ok(())

}

```

I'm adding support for transactional queries to the nostr-database traits 👀

This will allow to have **almost** the same performance as using nostrdb directly, even when used from the nostr-sdk.

In the book, for now only the "hello, rust-nostr" example is available. But if you are already familiar with the python bindings, the APIs are the same.

For now only keys parsing/generation/serialization, event de/serialization, event building and the client with some methods (add relays, connect and send event) are available. I'll add event fetching and subscriptions soon

Replying to Avatar Yuki Kishimoto

## rust-nostr v0.38 is out! 🦀

### Summary

Full NIP42 support for SDK and relay builder, negentropy support and read/write policy plugins for relay builder, NIP35 support, better logs and docs, performance improvements, bugs fix and more!

The Flutter bindings are finally fixed and usable (not for web yet), although rather incomplete compared to other languages.

Full changelog: https://rust-nostr.org/changelog

### Contributors

Thanks to all contributors for this relays!

* nostr:npub1xj5hzn62q2jg8xp9m3j6lw7r8z6g47plqyz2jmjr3g52y8tx4rls095s8g

* nostr:npub1useke4f9maul5nf67dj0m9sq6jcsmnjzzk4ycvldwl4qss35fvgqjdk5ks

* ethicnology

* nostr:npub1zuuajd7u3sx8xu92yav9jwxpr839cs0kc3q6t56vd5u9q033xmhsk6c2uc

* nostr:npub1v0lxxxxutpvrelsksy8cdhgfux9l6a42hsj2qzquu2zk7vc9qnkszrqj49

* nostr:npub1ahaz04ya9tehace3uy39hdhdryfvdkve9qdndkqp3tvehs6h8s5slq45hy

A big thank you also to those who contributed throughout 2024 (in addition to the above-listed):

* nostr:npub1k95p0e36xx62mwjltdlsrrjunnqx464wlf969f9u3stvrq5dah4qgds3z7

* nostr:npub1f5uuywemqwlejj2d7he6zjw8jz9wr0r5z6q8lhttxj333ph24cjsymjmug

* nostr:npub1u8lnhlw5usp3t9vmpz60ejpyt649z33hu82wc2hpv6m5xdqmuxhs46turz

* nostr:npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr

* nostr:npub138he9w0tumwpun4rnrmywlez06259938kz3nmjymvs8px7e9d0js8lrdr2

* nostr:npub1lu2qcwt23uq5pku99pxfe3uudpzdl4cfks24c2758cqqnfehujlqn6xlm6

* nostr:npub163jct20kzgjjr6z28u4vskax7d0gwq3zemrk6flgnw430vu55vtsdeqdc2

* nanikamado

* nostr:npub1zwnx29tj2lnem8wvjcx7avm8l4unswlz6zatk0vxzeu62uqagcash7fhrf

* nostr:npub1zfss807aer0j26mwp2la0ume0jqde3823rmu97ra6sgyyg956e0s6xw445

* nostr:npub1w80jzxf36fhwgyfp622m6s7tcl3cy5z7xva4cy75q9kwm92zm8tsclzqjv

* nostr:npub1zk6u7mxlflguqteghn8q7xtu47hyerruv6379c36l8lxzzr4x90q0gl6ef

* nostr:npub1mheh5x5uhplms73kl73hwtg4gf57qxq89fvkwc2ykj8y966l05cqh9qtf9

* nostr:npub17q5n2z8naw0xl6vu9lvt560lg33pdpe29k0k09umlfxm3vc4tqrq466f2y

* nostr:npub1acxjpdrlk2vw320dxcy3prl87g5kh4c73wp0knullrmp7c4mc7nq88gj3j

* nostr:npub1q0uulk2ga9dwkp8hsquzx38hc88uqggdntelgqrtkm29r3ass6fq8y9py9

Thank you very much also to all the donors! Special thanks to nostr:npub10pensatlcfwktnvjjw2dtem38n6rvw8g6fv73h84cuacxn4c28eqyfn34f for the LTS grant, to nostr:npub1ktt8phjnkfmfrsxrgqpztdjuxk3x6psf80xyray0l3c7pyrln49qhkyhz0 for subscribing and being a recurring donor and to nostr:npub16p8v7varqwjes5hak6q7mz6pygqm4pwc6gve4mrned3xs8tz42gq7kfhdw to be the top-donor of 2024.

### Links

https://rust-nostr.org

https://rust-nostr.org/donate

#rustnostr #nostr #rustlang #programming #rust #python #javascript #kotlin #swift #flutter

## rust-nostr v0.38 is out! 🦀

### Summary

Full NIP42 support for SDK and relay builder, negentropy support and read/write policy plugins for relay builder, NIP35 support, better logs and docs, performance improvements, bugs fix and more!

The Flutter bindings are finally fixed and usable (not for web yet), although rather incomplete compared to other languages.

Full changelog: https://rust-nostr.org/changelog

### Contributors

Thanks to all contributors for this relays!

* nostr:npub1xj5hzn62q2jg8xp9m3j6lw7r8z6g47plqyz2jmjr3g52y8tx4rls095s8g

* nostr:npub1useke4f9maul5nf67dj0m9sq6jcsmnjzzk4ycvldwl4qss35fvgqjdk5ks

* ethicnology

* nostr:npub1zuuajd7u3sx8xu92yav9jwxpr839cs0kc3q6t56vd5u9q033xmhsk6c2uc

* nostr:npub1v0lxxxxutpvrelsksy8cdhgfux9l6a42hsj2qzquu2zk7vc9qnkszrqj49

* nostr:npub1ahaz04ya9tehace3uy39hdhdryfvdkve9qdndkqp3tvehs6h8s5slq45hy

A big thank you also to those who contributed throughout 2024 (in addition to the above-listed):

* nostr:npub1k95p0e36xx62mwjltdlsrrjunnqx464wlf969f9u3stvrq5dah4qgds3z7

* nostr:npub1f5uuywemqwlejj2d7he6zjw8jz9wr0r5z6q8lhttxj333ph24cjsymjmug

* nostr:npub1u8lnhlw5usp3t9vmpz60ejpyt649z33hu82wc2hpv6m5xdqmuxhs46turz

* nostr:npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr

* nostr:npub138he9w0tumwpun4rnrmywlez06259938kz3nmjymvs8px7e9d0js8lrdr2

* nostr:npub1lu2qcwt23uq5pku99pxfe3uudpzdl4cfks24c2758cqqnfehujlqn6xlm6

* nostr:npub163jct20kzgjjr6z28u4vskax7d0gwq3zemrk6flgnw430vu55vtsdeqdc2

* nanikamado

* nostr:npub1zwnx29tj2lnem8wvjcx7avm8l4unswlz6zatk0vxzeu62uqagcash7fhrf

* nostr:npub1zfss807aer0j26mwp2la0ume0jqde3823rmu97ra6sgyyg956e0s6xw445

* nostr:npub1w80jzxf36fhwgyfp622m6s7tcl3cy5z7xva4cy75q9kwm92zm8tsclzqjv

* nostr:npub1zk6u7mxlflguqteghn8q7xtu47hyerruv6379c36l8lxzzr4x90q0gl6ef

* nostr:npub1mheh5x5uhplms73kl73hwtg4gf57qxq89fvkwc2ykj8y966l05cqh9qtf9

* nostr:npub17q5n2z8naw0xl6vu9lvt560lg33pdpe29k0k09umlfxm3vc4tqrq466f2y

* nostr:npub1acxjpdrlk2vw320dxcy3prl87g5kh4c73wp0knullrmp7c4mc7nq88gj3j

* nostr:npub1q0uulk2ga9dwkp8hsquzx38hc88uqggdntelgqrtkm29r3ass6fq8y9py9

Thank you very much also to all the donors! Special thanks to nostr:npub10pensatlcfwktnvjjw2dtem38n6rvw8g6fv73h84cuacxn4c28eqyfn34f for the LTS grant, to nostr:npub1ktt8phjnkfmfrsxrgqpztdjuxk3x6psf80xyray0l3c7pyrln49qhkyhz0 for subscribing and being a recurring donor and to nostr:npub16p8v7varqwjes5hak6q7mz6pygqm4pwc6gve4mrned3xs8tz42gq7kfhdw to be the top-donor of 2024.

### Links

https://rust-nostr.org

https://rust-nostr.org/donate

#rustnostr #nostr #rustlang #programming #rust #python #javascript #kotlin #swift #flutter

Wow, thank you very much 🧡

You have to enable it in the `Cargo.toml`:

```toml

nostr-sdk = { version = "0.37", features = ["nip59"] }

```

You can find all features here: https://github.com/rust-nostr/nostr/blob/master/crates%2Fnostr-sdk%2FREADME.md#crate-feature-flags