Skip to content

Commit

Permalink
chore: Version 1.39.2
Browse files Browse the repository at this point in the history
  • Loading branch information
DaughterOfMars committed Aug 12, 2024
1 parent ab8b24c commit afb40f7
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 251 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
Cargo.lock
.DS_Store
test-crates/jsonrpsee-test/target
.vscode
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ members = [
"mocked-crates/futures-timer",
]
exclude = [
"tokio",
"test-crates/jsonrpsee-test",
]
6 changes: 3 additions & 3 deletions msim-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
name = "msim-macros"
version = "0.1.0"
edition = "2021"
authors = ["Runji Wang <[email protected]>", "Mysten Labs <[email protected]>"]
authors = ["IOTA Stiftung"]
description = "Mysten sim's proc-macro."
homepage = "https://github.com/MystenLabs/mysten-simulator"
repository = "https://github.com/MystenLabs/mysten-simulator"
homepage = "https://www.iota.org/"
repository = "https://github.com/iotaledger/iota-sim"
license = "Apache-2.0"
categories = ["asynchronous"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
9 changes: 0 additions & 9 deletions msim-macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
//! Macros for use with Madsim

mod request;
mod service;

use proc_macro::TokenStream;
use proc_macro2::{Ident, Span};
use quote::{quote, quote_spanned, ToTokens};
use syn::DeriveInput;

#[proc_macro_derive(Request, attributes(rtype))]
pub fn message_derive_rtype(input: TokenStream) -> TokenStream {
let ast: DeriveInput = syn::parse(input).unwrap();

request::expand(&ast).into()
}

#[proc_macro_attribute]
pub fn service(args: TokenStream, input: TokenStream) -> TokenStream {
Expand Down
132 changes: 0 additions & 132 deletions msim-macros/src/request.rs

This file was deleted.

21 changes: 9 additions & 12 deletions msim-tokio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "tokio"
version = "1.36.0"
version = "1.39.2"
edition = "2021"
authors = ["Runji Wang <[email protected]>", "Mysten Labs <[email protected]>"]
authors = ["IOTA Stiftung"]
description = "The `tokio` simulator on msim."
homepage = "https://github.com/MystenLabs/mysten-simulator"
repository = "https://github.com/MystenLabs/mysten-simulator"
homepage = "https://www.iota.org/"
repository = "https://github.com/iotaledger/iota-sim"
categories = ["asynchronous", "network-programming", "simulation"]
keywords = ["io", "async", "non-blocking", "futures", "simulator"]
readme = "README.md"
Expand Down Expand Up @@ -47,21 +47,18 @@ test-util = ["real_tokio/test-util"]
tracing = ["real_tokio/tracing"]
bytes = ["real_tokio/bytes"]
libc = ["real_tokio/libc"]
memchr = ["real_tokio/memchr"]
mio = ["real_tokio/mio"]
num_cpus = ["real_tokio/num_cpus"]
signal-hook-registry = ["real_tokio/signal-hook-registry"]
socket2 = ["real_tokio/socket2"]
stats = ["real_tokio/stats"]
tokio-macros = ["real_tokio/tokio-macros"]

[target.'cfg(msim)'.dependencies]
msim = { version = "0.1.0", path = "../msim" }
msim.path = "../msim"

[dependencies]
tracing = "0.1"

real_tokio = { git = "https://github.com/mystenmark/tokio-madsim-fork.git", rev = "e47aafebf98e9c1734a8848a1876d5946c44bdd1", package = "real_tokio", features = ["full"] }
bytes = { version = "1.1" }
futures = { version = "0.3.0", features = ["async-await"] }
mio = { version = "0.8.1" }
real_tokio = { git = "ssh://git@github.com/iotaledger/tokio-madsim-fork.git", branch = "main", package = "real_tokio", features = ["full"] }
bytes = { version = "1.7" }
futures = { version = "0.3", features = ["async-await"] }
mio = { version = "1.0" }
3 changes: 3 additions & 0 deletions msim-tokio/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("cargo::rustc-check-cfg=cfg(msim)");
}
5 changes: 4 additions & 1 deletion msim-tokio/src/sim/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ impl Handle {
}
}

pub struct EnterGuard<'a>(ms_runtime::EnterGuard, std::marker::PhantomData<&'a Handle>);
pub struct EnterGuard<'a>(
#[expect(unused)] ms_runtime::EnterGuard,
std::marker::PhantomData<&'a Handle>,
);

#[derive(Clone, Debug, Hash, Eq, PartialEq)]
pub struct Id(u64);
Expand Down
40 changes: 17 additions & 23 deletions msim/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,53 @@
name = "msim"
version = "0.1.0"
edition = "2021"
authors = ["Runji Wang <[email protected]>", "Mysten Labs <[email protected]>"]
authors = ["IOTA Stiftung"]
description = "Deterministic Simulator for distributed systems."
readme = "../README.md"
homepage = "https://github.com/MystenLabs/mysten-simulator"
repository = "https://github.com/MystenLabs/mysten-simulator"
homepage = "https://www.iota.org/"
repository = "https://github.com/iotaledger/iota-sim"
license = "Apache-2.0"
keywords = ["distributed-systems", "async", "deterministic", "simulation"]
categories = ["asynchronous", "simulation"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["macros", "rpc"]
rpc = ["bincode"]
default = ["macros"]
macros = ["msim-macros", "tokio/macros"]

[dependencies]
bincode = { version = "1", optional = true }
bytes = "1"
bytes = "1.7"
futures = "0.3"
lazy_static = "1.4"
lazy_static = "1.5"
tracing = "0.1"
tracing-subscriber = "0.3"
msim-macros = { version = "0.1.0", path = "../msim-macros", optional = true }
msim-macros = { version = "0.1", path = "../msim-macros", optional = true }
rand = { version = "0.8", features = ["small_rng"] }
serde = { version = "1", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
pin-project-lite = "0.2"
tap = "1"
tap = "1.0"

[build-dependencies]
cc = { version = "1.0" }
cc = { version = "1.1" }

[target.'cfg(msim)'.dependencies]
ahash = "0.7"
ahash = "0.8"
downcast-rs = "1.2"
libc = "0.2"
naive-timer = "0.2"
tokio = { git = "https://github.com/mystenmark/tokio-madsim-fork.git", rev = "e47aafebf98e9c1734a8848a1876d5946c44bdd1", package = "real_tokio", features = ["full"] }
tokio-util = { git = "https://github.com/mystenmark/tokio-madsim-fork.git", rev = "e47aafebf98e9c1734a8848a1876d5946c44bdd1", features = ["full"] }
toml = "0.5"
socket2 = "0.4"
tokio = { git = "ssh://git@github.com/iotaledger/tokio-madsim-fork.git", branch = "main", package = "real_tokio", features = ["full"] }
tokio-util = { git = "ssh://git@github.com/iotaledger/tokio-madsim-fork.git", branch = "main", features = ["full"] }
toml = "0.8"
socket2 = "0.5"
erasable = "1.2"

# TODO: revert back to the crates-io version after https://github.com/smol-rs/async-task/pull/34 merges
async-task = { git = "https://github.com/mystenmark/async-task", rev = "4e45b26e11126b191701b9b2ce5e2346b8d7682f" }

[dev-dependencies]
criterion = "0.3"
criterion = "0.5"
structopt = "0.3"
tokio = { git = "https://github.com/mystenmark/tokio-madsim-fork.git", rev = "e47aafebf98e9c1734a8848a1876d5946c44bdd1", package = "real_tokio", features = ["full"] }

[[bench]]
name = "rpc"
harness = false
tokio = { git = "ssh://[email protected]/iotaledger/tokio-madsim-fork.git", branch = "main", package = "real_tokio", features = ["full"] }

[package.metadata.docs.rs]
# all-features = true
Expand Down
56 changes: 0 additions & 56 deletions msim/benches/rpc.rs

This file was deleted.

1 change: 1 addition & 0 deletions msim/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
fn main() {
println!("cargo::rustc-check-cfg=cfg(msim)");
#[cfg(target_os = "linux")]
{
println!("cargo:rerun-if-changed=src/sim/syscall.c");
Expand Down
4 changes: 0 additions & 4 deletions msim/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

#![cfg_attr(docsrs, feature(doc_cfg))]

#[cfg(all(feature = "rpc", feature = "macros"))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "rpc", feature = "macros"))))]
pub use msim_macros::{service, Request};

pub use tracing;

#[cfg(msim)]
Expand Down
Loading

0 comments on commit afb40f7

Please sign in to comment.