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

deps: use web-time instead of instant #5347

Merged
merged 27 commits into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
61ee9cd
refactor: Use `web-time` instead of `instant`
dariusc93 Apr 29, 2024
b15ece5
chore: Update Cargo.toml and changelogs
dariusc93 Apr 29, 2024
0b36054
Merge branch 'master' into refactor/web-time-switch
dariusc93 Apr 30, 2024
e0be1d0
chore: Update changelog
dariusc93 Apr 30, 2024
0d8b343
Merge branch 'master' into refactor/web-time-switch
dariusc93 May 1, 2024
017635a
chore: Correct format
dariusc93 May 3, 2024
e50f8b2
chore: Update relay changelog and cargo.toml
dariusc93 May 3, 2024
a1c871b
Merge branch 'master' into refactor/web-time-switch
dariusc93 May 8, 2024
f55739e
Merge branch 'master' into refactor/web-time-switch
jxs May 10, 2024
6834c8e
Merge branch 'master' into refactor/web-time-switch
dariusc93 May 15, 2024
ddf9b8b
chore: Remove dep and add changelog entry
dariusc93 May 15, 2024
5f98cb2
chore: Use web-time in kbucket
dariusc93 May 15, 2024
580fae1
Merge branch 'master' into refactor/web-time-switch
jxs May 16, 2024
d836b4f
Merge branch 'master' into refactor/web-time-switch
dariusc93 May 20, 2024
cbad65a
Merge branch 'master' into refactor/web-time-switch
dariusc93 May 22, 2024
525245e
Merge branch 'master' of github.com:libp2p/rust-libp2p into refactor/…
jxs May 29, 2024
23e7f4c
Update libp2p/Cargo.toml
dariusc93 May 29, 2024
516ebd9
Merge branch 'master' into refactor/web-time-switch
jxs May 31, 2024
f00c478
Merge branch 'master' of github.com:libp2p/rust-libp2p into refactor/…
jxs Jun 7, 2024
83c0ef4
update Cargo.lock
jxs Jun 7, 2024
9894898
Merge branch 'refactor/web-time-switch' of github.com:dariusc93/rust-…
jxs Jun 7, 2024
eefd96d
Merge branch 'master' into refactor/web-time-switch
jxs Jun 7, 2024
117c533
Merge branch 'master' of github.com:libp2p/rust-libp2p into refactor/…
jxs Jun 7, 2024
feb8446
update Cargo.toml
jxs Jun 7, 2024
7b44d92
Merge branch 'refactor/web-time-switch' of github.com:dariusc93/rust-…
jxs Jun 7, 2024
5e546a0
update Cargo.toml
jxs Jun 8, 2024
ed0ce1a
Merge branch 'master' of github.com:libp2p/rust-libp2p into refactor/…
jxs Jun 8, 2024
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
45 changes: 21 additions & 24 deletions Cargo.lock

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

17 changes: 9 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,29 +75,29 @@ asynchronous-codec = { version = "0.7.0" }
futures-bounded = { version = "0.2.3" }
libp2p = { version = "0.54.0", path = "libp2p" }
libp2p-allow-block-list = { version = "0.3.0", path = "misc/allow-block-list" }
libp2p-autonat = { version = "0.12.0", path = "protocols/autonat" }
libp2p-autonat = { version = "0.12.1", path = "protocols/autonat" }
libp2p-connection-limits = { version = "0.3.1", path = "misc/connection-limits" }
libp2p-core = { version = "0.41.2", path = "core" }
libp2p-dcutr = { version = "0.11.0", path = "protocols/dcutr" }
libp2p-core = { version = "0.41.3", path = "core" }
libp2p-dcutr = { version = "0.11.1", path = "protocols/dcutr" }
libp2p-dns = { version = "0.41.1", path = "transports/dns" }
libp2p-floodsub = { version = "0.44.0", path = "protocols/floodsub" }
libp2p-gossipsub = { version = "0.46.1", path = "protocols/gossipsub" }
libp2p-gossipsub = { version = "0.46.2", path = "protocols/gossipsub" }
libp2p-identify = { version = "0.44.2", path = "protocols/identify" }
libp2p-identity = { version = "0.2.8" }
libp2p-kad = { version = "0.46.0", path = "protocols/kad" }
libp2p-mdns = { version = "0.45.1", path = "protocols/mdns" }
libp2p-memory-connection-limits = { version = "0.2.0", path = "misc/memory-connection-limits" }
libp2p-metrics = { version = "0.14.1", path = "misc/metrics" }
libp2p-metrics = { version = "0.14.2", path = "misc/metrics" }
libp2p-mplex = { version = "0.41.0", path = "muxers/mplex" }
libp2p-muxer-test-harness = { path = "muxers/test-harness" }
libp2p-noise = { version = "0.44.0", path = "transports/noise" }
libp2p-perf = { version = "0.3.0", path = "protocols/perf" }
libp2p-perf = { version = "0.3.1", path = "protocols/perf" }
libp2p-ping = { version = "0.44.1", path = "protocols/ping" }
libp2p-plaintext = { version = "0.41.0", path = "transports/plaintext" }
libp2p-pnet = { version = "0.24.0", path = "transports/pnet" }
libp2p-quic = { version = "0.10.2", path = "transports/quic" }
libp2p-relay = { version = "0.17.2", path = "protocols/relay" }
libp2p-rendezvous = { version = "0.14.0", path = "protocols/rendezvous" }
libp2p-relay = { version = "0.17.3", path = "protocols/relay" }
libp2p-rendezvous = { version = "0.14.1", path = "protocols/rendezvous" }
libp2p-request-response = { version = "0.26.2", path = "protocols/request-response" }
libp2p-server = { version = "0.12.7", path = "misc/server" }
libp2p-stream = { version = "0.1.0-alpha.1", path = "protocols/stream" }
Expand Down Expand Up @@ -126,6 +126,7 @@ unsigned-varint = { version = "0.8.0" }
tokio = { version = "1.37", default-features = false }
tracing = "0.1.37"
futures = "0.3.30"
web-time = "1.1.0"

[patch.crates-io]

Expand Down
4 changes: 4 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.41.3
- Use `web-time` instead of `instant`.
See [PR 5347](https://github.com/libp2p/rust-libp2p/pull/5347).

## 0.41.2

- Implement `std::fmt::Display` on `ListenerId`.
Expand Down
4 changes: 2 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-core"
edition = "2021"
rust-version = { workspace = true }
description = "Core traits and structs of libp2p"
version = "0.41.2"
version = "0.41.3"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -15,7 +15,7 @@ either = "1.11"
fnv = "1.0"
futures = { workspace = true, features = ["executor", "thread-pool"] }
futures-timer = "3"
instant = "0.1.12"
web-time = { workspace = true }
libp2p-identity = { workspace = true, features = ["peerid", "ed25519"] }
multiaddr = { workspace = true }
multihash = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion core/src/peer_record.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use crate::signed_envelope::SignedEnvelope;
use crate::{proto, signed_envelope, DecodeError, Multiaddr};
use instant::SystemTime;
use libp2p_identity::Keypair;
use libp2p_identity::PeerId;
use libp2p_identity::SigningError;
use quick_protobuf::{BytesReader, Writer};
use web_time::SystemTime;

const PAYLOAD_TYPE: &str = "/libp2p/routing-state-record";
const DOMAIN_SEP: &str = "libp2p-routing-state";
Expand Down
2 changes: 1 addition & 1 deletion interop-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ libp2p-webrtc-websys = { workspace = true }
wasm-bindgen = { version = "0.2" }
wasm-bindgen-futures = { version = "0.4" }
wasm-logger = { version = "0.2.0" }
instant = "0.1.12"
web-time = { workspace = true }
reqwest = { version = "0.12", features = ["json"] }
console_error_panic_hook = { version = "0.1.7" }
futures-timer = "3.0.3"
Expand Down
2 changes: 1 addition & 1 deletion interop-tests/src/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ pub(crate) mod wasm {

use crate::{BlpopRequest, Muxer, SecProtocol, Transport};

pub(crate) type Instant = instant::Instant;
pub(crate) type Instant = web_time::Instant;

pub(crate) fn init_logger() {
console_error_panic_hook::set_once();
Expand Down
4 changes: 2 additions & 2 deletions libp2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ tcp = ["dep:libp2p-tcp"]
tls = ["dep:libp2p-tls"]
tokio = [ "libp2p-swarm/tokio", "libp2p-mdns?/tokio", "libp2p-tcp?/tokio", "libp2p-dns?/tokio", "libp2p-quic?/tokio", "libp2p-upnp?/tokio"]
uds = ["dep:libp2p-uds"]
wasm-bindgen = [ "futures-timer/wasm-bindgen", "instant/wasm-bindgen", "getrandom/js", "libp2p-swarm/wasm-bindgen", "libp2p-gossipsub?/wasm-bindgen",]
wasm-bindgen = [ "futures-timer/wasm-bindgen", "getrandom/js", "libp2p-swarm/wasm-bindgen"]
dariusc93 marked this conversation as resolved.
Show resolved Hide resolved
websocket-websys = ["dep:libp2p-websocket-websys"]
websocket = ["dep:libp2p-websocket"]
webtransport-websys = ["dep:libp2p-webtransport-websys"]
Expand All @@ -95,7 +95,7 @@ either = "1.9.0"
futures = { workspace = true }
futures-timer = "3.0.2" # Explicit dependency to be used in `wasm-bindgen` feature
getrandom = "0.2.3" # Explicit dependency to be used in `wasm-bindgen` feature
instant = "0.1.12" # Explicit dependency to be used in `wasm-bindgen` feature
web-time = { workspace = true } # Explicit dependency to be used in `wasm-bindgen` feature
# TODO feature flag?
rw-stream-sink = { workspace = true }

Expand Down
Loading
Loading