Skip to content
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
7 changes: 6 additions & 1 deletion .github/workflows/wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
with:
targets: wasm32-unknown-unknown

- name: Workaround for spurious network errors in curl
run: |
if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then
echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV
fi

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

Expand All @@ -38,4 +44,3 @@ jobs:

# Kill the server
kill $SERVER_PID

4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkarr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ getrandom = { version = "0.2.15", default-features = false }
tracing = { version = "0.1.41", optional = true }

# feat: dht dependencies
mainline = { version = "5.2.1", optional = true }
mainline = { version = "5.3.1", optional = true }

# feat: relay dependencies
reqwest = { version = "0.12.12", default-features = false, features = ["rustls-tls"], optional = true }
Expand Down Expand Up @@ -80,7 +80,7 @@ rstest = "0.24.0"
pkarr-relay = { path = "../relay" }
clap = { version = "4.5.29", features = ["derive"] }
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
mainline = "5.2.1"
mainline = "5.3.1"
tokio-rustls = "0.26.1"
axum = "0.8.1"
axum-server = { version = "0.7.1", features = ["tls-rustls-no-provider"] }
Expand Down
3 changes: 2 additions & 1 deletion pkarr/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ impl Client {
/// then start authoring the new [SignedPacket] based on the most recent as in the following example:
///
///```rust
/// use mainline::Testnet;
/// use pkarr::{Client, SignedPacket, Keypair};
/// // For local testing
/// use pkarr::mainline::Testnet;
///
/// #[tokio::main]
/// async fn run() -> anyhow::Result<()> {
Expand Down
3 changes: 2 additions & 1 deletion pkarr/src/client/blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ impl ClientBlocking {
/// then start authoring the new [SignedPacket] based on the most recent as in the following example:
///
///```rust
/// use mainline::Testnet;
/// use pkarr::{Client, SignedPacket, Keypair};
/// // For local testing
/// use pkarr::mainline::Testnet;
///
/// fn run() -> anyhow::Result<()> {
/// let testnet = Testnet::new(3)?;
Expand Down
2 changes: 2 additions & 0 deletions pkarr/src/client/relays.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ impl RelaysClient {
.expect("infallible")
}

#[cfg(not(wasm_browser))]
/// Cancel an inflight publish request.
pub fn cancel_publish(&self, public_key: &PublicKey) {
self.inflight_publish.cancel_request(public_key);
Expand Down Expand Up @@ -213,6 +214,7 @@ impl InflightPublishRequests {
Ok(())
}

#[cfg(not(wasm_browser))]
pub fn cancel_request(&self, public_key: &PublicKey) {
let mut inflight = self
.requests
Expand Down
3 changes: 1 addition & 2 deletions pkarr/src/extra/endpoints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ impl std::fmt::Display for CouldNotResolveEndpoint {
mod tests {

use crate::dns::rdata::SVCB;
use crate::mainline::Testnet;
use crate::{Client, Keypair};
use crate::{PublicKey, SignedPacket};

Expand All @@ -134,8 +135,6 @@ mod tests {
use std::str::FromStr;
use std::time::Duration;

use mainline::Testnet;

fn generate_subtree(
client: Client,
depth: u8,
Expand Down
2 changes: 1 addition & 1 deletion pkarr/src/extra/reqwest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ mod reqwest_builder {

#[tokio::test]
async fn reqwest_pkarr_domain() {
use mainline::Testnet;
use crate::mainline::Testnet;
use std::net::TcpListener;
use std::sync::Arc;
use std::time::Duration;
Expand Down
2 changes: 2 additions & 0 deletions pkarr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ pub use keys::{Keypair, PublicKey};
pub use signed_packet::{SignedPacket, SignedPacketBuilder};

// Rexports
#[cfg(dht)]
pub use mainline;
#[cfg(feature = "signed_packet")]
pub use pubky_timestamp::Timestamp;
#[cfg(feature = "signed_packet")]
Expand Down
2 changes: 1 addition & 1 deletion relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ clap = { version = "4.5.28", features = ["derive"] }
dirs-next = "2.0.0"
httpdate = "1.0.3"
url = "2.5.4"
mainline = "5.1.0"
mainline = "5.3.1"
pkarr = { version = "3.3.1", default-features = false, features = ["dht", "lmdb-cache"] }

[package.metadata.docs.rs]
Expand Down
Loading