From 3e2af99b139ece5b693d009ccb27bb8ec3933330 Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Mon, 16 Feb 2026 15:24:37 +0100 Subject: [PATCH 1/2] chore: migrate from msg-sim to linkem --- .github/workflows/ci.yml | 14 ++++---- CLAUDE.md | 6 ++-- Cargo.lock | 30 ++++++++-------- Cargo.toml | 4 +-- justfile | 2 +- {msg-sim => linkem}/Cargo.toml | 2 +- {msg-sim => linkem}/README.md | 10 +++--- .../examples/bdp_throughput.rs | 4 +-- .../examples/sim_multi_region.rs | 6 ++-- {msg-sim => linkem}/examples/tcp_tuning.rs | 4 +-- {msg-sim => linkem}/scripts/playground.sh | 0 .../test-netem-duplicate-limitation.sh | 0 {msg-sim => linkem}/src/dynch.rs | 8 ++--- {msg-sim => linkem}/src/ip.rs | 0 {msg-sim => linkem}/src/lib.rs | 0 {msg-sim => linkem}/src/namespace.rs | 0 {msg-sim => linkem}/src/network.rs | 36 +++++++++---------- {msg-sim => linkem}/src/tc/core.rs | 0 {msg-sim => linkem}/src/tc/drr.rs | 4 +-- {msg-sim => linkem}/src/tc/filter.rs | 8 ++--- {msg-sim => linkem}/src/tc/handle.rs | 6 ++-- {msg-sim => linkem}/src/tc/impairment.rs | 2 +- {msg-sim => linkem}/src/tc/mod.rs | 0 {msg-sim => linkem}/src/tc/netem.rs | 6 ++-- {msg-sim => linkem}/src/tc/nla.rs | 0 {msg-sim => linkem}/src/tc/requests.rs | 0 {msg-sim => linkem}/src/tc/tbf.rs | 6 ++-- {msg-sim => linkem}/src/wrappers.rs | 0 28 files changed, 79 insertions(+), 79 deletions(-) rename {msg-sim => linkem}/Cargo.toml (98%) rename {msg-sim => linkem}/README.md (92%) rename {msg-sim => linkem}/examples/bdp_throughput.rs (99%) rename {msg-sim => linkem}/examples/sim_multi_region.rs (98%) rename {msg-sim => linkem}/examples/tcp_tuning.rs (96%) rename {msg-sim => linkem}/scripts/playground.sh (100%) rename {msg-sim => linkem}/scripts/test-netem-duplicate-limitation.sh (100%) rename {msg-sim => linkem}/src/dynch.rs (98%) rename {msg-sim => linkem}/src/ip.rs (100%) rename {msg-sim => linkem}/src/lib.rs (100%) rename {msg-sim => linkem}/src/namespace.rs (100%) rename {msg-sim => linkem}/src/network.rs (98%) rename {msg-sim => linkem}/src/tc/core.rs (100%) rename {msg-sim => linkem}/src/tc/drr.rs (98%) rename {msg-sim => linkem}/src/tc/filter.rs (98%) rename {msg-sim => linkem}/src/tc/handle.rs (95%) rename {msg-sim => linkem}/src/tc/impairment.rs (99%) rename {msg-sim => linkem}/src/tc/mod.rs (100%) rename {msg-sim => linkem}/src/tc/netem.rs (97%) rename {msg-sim => linkem}/src/tc/nla.rs (100%) rename {msg-sim => linkem}/src/tc/requests.rs (100%) rename {msg-sim => linkem}/src/tc/tbf.rs (99%) rename {msg-sim => linkem}/src/wrappers.rs (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58c347c7..bd3a56fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,14 +33,14 @@ jobs: - name: Install cargo-nextest uses: taiki-e/install-action@nextest - - name: Run tests (all features, excluding msg-sim) - run: cargo nextest run --all --all-features --no-fail-fast --exclude msg-sim + - name: Run tests (all features, excluding linkem) + run: cargo nextest run --all --all-features --no-fail-fast --exclude linkem - - name: Run doc tests (excluding msg-sim) + - name: Run doc tests (excluding linkem) run: cargo test --doc --all --all-features - # msg-sim tests require root privileges to create network namespaces - cargo-tests-msg-sim: + # linkem tests require root privileges to create network namespaces + cargo-tests-linkem: runs-on: ubuntu-latest timeout-minutes: 20 steps: @@ -59,8 +59,8 @@ jobs: - name: Install cargo-nextest uses: taiki-e/install-action@nextest - - name: Run msg-sim tests (requires root for network namespaces) - run: sudo env "PATH=$PATH" "HOME=$HOME" cargo nextest run -p msg-sim --all-features --no-fail-fast --test-threads=1 + - name: Run linkem tests (requires root for network namespaces) + run: sudo env "PATH=$PATH" "HOME=$HOME" cargo nextest run -p linkem --all-features --no-fail-fast --test-threads=1 cargo-lint: runs-on: ubuntu-latest diff --git a/CLAUDE.md b/CLAUDE.md index 224c1393..c6fce9a4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -47,7 +47,7 @@ cargo flamegraph --bin example_name - **`msg-transport/`** - Transport layer (TCP, QUIC, IPC with pluggable trait design) - **`msg-wire/`** - Wire protocol (authentication, compression: gzip/lz4/snappy/zstd) - **`msg-common/`** - Shared utilities (channels, task management, time utils) -- **`msg-sim/`** - Network simulation on Linux, powered by rtnetlink. +- **`linkem/`** - Network emulation on Linux, powered by rtnetlink. ### Key Design Patterns - **Trait-based extensibility** - Transport, ConnectionHook traits for pluggability @@ -69,7 +69,7 @@ cargo flamegraph --bin example_name - **debug-maxperf** - Performance with debug symbols ### Platform-Specific Features -- **Linux**: JeMalloc integration for memory performance and `msg-sim` support +- **Linux**: JeMalloc integration for memory performance and `linkem` support - **MSRV**: Rust 1.86 ## Testing Architecture @@ -81,7 +81,7 @@ cargo flamegraph --bin example_name - **Benchmarks** - Criterion-based in `msg/benches/` ### Network Simulation Testing -- Use `msg-sim` crate for chaos testing under various network conditions +- Use `linkem` crate for chaos testing under various network conditions - Supports latency injection, bandwidth limiting, packet loss simulation ## Documentation Structure diff --git a/Cargo.lock b/Cargo.lock index 5af827a8..81fd3115 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -815,6 +815,21 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +[[package]] +name = "linkem" +version = "0.1.5" +dependencies = [ + "futures", + "msg-socket", + "msg-transport", + "nix 0.30.1", + "rtnetlink", + "thiserror 2.0.18", + "tokio", + "tracing", + "tracing-subscriber", +] + [[package]] name = "linux-raw-sys" version = "0.11.0" @@ -934,21 +949,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "msg-sim" -version = "0.1.5" -dependencies = [ - "futures", - "msg-socket", - "msg-transport", - "nix 0.30.1", - "rtnetlink", - "thiserror 2.0.18", - "tokio", - "tracing", - "tracing-subscriber", -] - [[package]] name = "msg-socket" version = "0.1.5" diff --git a/Cargo.toml b/Cargo.toml index 9284321e..9d70a49e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = [ "msg-wire", "msg-transport", "msg-common", - "msg-sim", + "linkem", ] resolver = "2" @@ -39,7 +39,7 @@ msg-wire = { path = "./msg-wire" } msg-socket = { path = "./msg-socket" } msg-transport = { path = "./msg-transport" } msg-common = { path = "./msg-common" } -# msg-sim = { path = "./msg-sim" } +# linkem = { path = "./linkem" } # async async-trait = "0.1" diff --git a/justfile b/justfile index 229035f7..8bc75596 100644 --- a/justfile +++ b/justfile @@ -16,4 +16,4 @@ fmt: # cargo nextest run --workspace --all-features --retries 3 test: - cargo nextest run --workspace --all-features --retries 3 -E 'not (package(msg-sim))' + cargo nextest run --workspace --all-features --retries 3 -E 'not (package(linkem))' diff --git a/msg-sim/Cargo.toml b/linkem/Cargo.toml similarity index 98% rename from msg-sim/Cargo.toml rename to linkem/Cargo.toml index 90ac6d0d..d7154312 100644 --- a/msg-sim/Cargo.toml +++ b/linkem/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "msg-sim" +name = "linkem" version.workspace = true edition.workspace = true rust-version.workspace = true diff --git a/msg-sim/README.md b/linkem/README.md similarity index 92% rename from msg-sim/README.md rename to linkem/README.md index 9e006f5b..394f4842 100644 --- a/msg-sim/README.md +++ b/linkem/README.md @@ -1,4 +1,4 @@ -# `msg-sim` +# `linkem` In-process network emulation for Linux, powered by `rtnetlink`. @@ -11,9 +11,9 @@ traffic control. Each peer runs in an isolated network namespace, connected through a central hub: ```text - Hub Namespace (msg-sim-hub) + Hub Namespace (linkem-hub) ┌─────────────────────────────────────────────────────────────┐ -│ Bridge (msg-sim-br0) │ +│ Bridge (linkem-br0) │ └─────────┬───────────────────┬───────────────────┬───────────┘ │ │ │ veth pair veth pair veth pair @@ -38,7 +38,7 @@ See [`src/network.rs`](src/network.rs) for detailed architecture documentation. ## Quick Example ```rust -use msg_sim::{network::{Network, Link}, tc::impairment::LinkImpairment, ip::Subnet}; +use linkem::{network::{Network, Link}, tc::impairment::LinkImpairment, ip::Subnet}; use std::net::Ipv4Addr; #[tokio::main] @@ -99,7 +99,7 @@ See [`LinkImpairment::duplicate`](src/tc/impairment.rs) for details. Tests require root privileges to create network namespaces: ```bash -sudo env "PATH=$PATH" "HOME=$HOME" cargo test -p msg-sim --all-features -- --test-threads=1 +sudo env "PATH=$PATH" "HOME=$HOME" cargo test -p linkem --all-features -- --test-threads=1 ``` The `--test-threads=1` flag is recommended to avoid conflicts between concurrent namespace operations. diff --git a/msg-sim/examples/bdp_throughput.rs b/linkem/examples/bdp_throughput.rs similarity index 99% rename from msg-sim/examples/bdp_throughput.rs rename to linkem/examples/bdp_throughput.rs index 8b996d48..e4b9a708 100644 --- a/msg-sim/examples/bdp_throughput.rs +++ b/linkem/examples/bdp_throughput.rs @@ -7,7 +7,7 @@ //! - Window scaling allows rwnd > 64KB (required for high-BDP links) //! //! ```bash -//! sudo HOME=$HOME $(which cargo) run --example bdp_throughput -p msg-sim +//! sudo HOME=$HOME $(which cargo) run --example bdp_throughput -p linkem //! ``` #[cfg(not(target_os = "linux"))] @@ -22,7 +22,7 @@ async fn main() -> Result<(), Box> { }; use futures::StreamExt; - use msg_sim::{ + use linkem::{ ip::Subnet, network::{Link, Network, PeerIdExt}, tc::impairment::LinkImpairment, diff --git a/msg-sim/examples/sim_multi_region.rs b/linkem/examples/sim_multi_region.rs similarity index 98% rename from msg-sim/examples/sim_multi_region.rs rename to linkem/examples/sim_multi_region.rs index 37e09bde..45b6e8fd 100644 --- a/msg-sim/examples/sim_multi_region.rs +++ b/linkem/examples/sim_multi_region.rs @@ -16,7 +16,7 @@ //! # Running //! //! ```bash -//! sudo HOME=$HOME RUST_LOG=info $(which cargo) run --example multi_region -p msg-sim +//! sudo HOME=$HOME RUST_LOG=info $(which cargo) run --example multi_region -p linkem //! ``` #[cfg(not(target_os = "linux"))] @@ -30,7 +30,7 @@ async fn main() -> Result<(), Box> { time::{Duration, Instant}, }; - use msg_sim::{ + use linkem::{ ip::Subnet, network::{Link, Network, PeerIdExt}, }; @@ -54,7 +54,7 @@ async fn main() -> Result<(), Box> { /// Network impairment profiles based on typical cloud latencies. mod profiles { - use msg_sim::tc::impairment::LinkImpairment; + use linkem::tc::impairment::LinkImpairment; // US-East-1 <-> US-East-2: Same region, very fast pub fn same_region() -> LinkImpairment { diff --git a/msg-sim/examples/tcp_tuning.rs b/linkem/examples/tcp_tuning.rs similarity index 96% rename from msg-sim/examples/tcp_tuning.rs rename to linkem/examples/tcp_tuning.rs index 97f9b641..5164f1d1 100644 --- a/msg-sim/examples/tcp_tuning.rs +++ b/linkem/examples/tcp_tuning.rs @@ -3,7 +3,7 @@ //! Shows that each network namespace has isolated TCP sysctl parameters. //! //! ```bash -//! sudo HOME=$HOME RUST_LOG=info $(which cargo) run --example tcp_tuning -p msg-sim +//! sudo HOME=$HOME RUST_LOG=info $(which cargo) run --example tcp_tuning -p linkem //! ``` #[cfg(not(target_os = "linux"))] @@ -14,7 +14,7 @@ fn main() {} async fn main() -> Result<(), Box> { use std::net::{IpAddr, Ipv4Addr}; - use msg_sim::{ip::Subnet, network::Network}; + use linkem::{ip::Subnet, network::Network}; use tracing_subscriber::EnvFilter; const TCP_RMEM: &str = "/proc/sys/net/ipv4/tcp_rmem"; diff --git a/msg-sim/scripts/playground.sh b/linkem/scripts/playground.sh similarity index 100% rename from msg-sim/scripts/playground.sh rename to linkem/scripts/playground.sh diff --git a/msg-sim/scripts/test-netem-duplicate-limitation.sh b/linkem/scripts/test-netem-duplicate-limitation.sh similarity index 100% rename from msg-sim/scripts/test-netem-duplicate-limitation.sh rename to linkem/scripts/test-netem-duplicate-limitation.sh diff --git a/msg-sim/src/dynch.rs b/linkem/src/dynch.rs similarity index 98% rename from msg-sim/src/dynch.rs rename to linkem/src/dynch.rs index 44752741..9bce85ee 100644 --- a/msg-sim/src/dynch.rs +++ b/linkem/src/dynch.rs @@ -69,7 +69,7 @@ pub trait Cast: Send + 'static { /// # Example /// /// ``` -/// use msg_sim::dynch::{Cast, AnyCast}; +/// use linkem::dynch::{Cast, AnyCast}; /// /// let original: i32 = 42; /// let erased = AnyCast::erase(original); @@ -179,7 +179,7 @@ impl DynRequestSender { /// # Example /// /// ``` - /// use msg_sim::dynch::DynCh; + /// use linkem::dynch::DynCh; /// /// #[derive(Default)] /// struct Ctx { @@ -249,7 +249,7 @@ impl DynRequestSender { /// Using the default [`AnyCast`] strategy (most common): /// /// ``` -/// use msg_sim::dynch::DynCh; +/// use linkem::dynch::DynCh; /// /// struct MyContext { /// data: Vec, @@ -277,7 +277,7 @@ impl DynCh { /// # Example /// /// ``` - /// use msg_sim::dynch::DynCh; + /// use linkem::dynch::DynCh; /// /// #[derive(Default)] /// struct Ctx { diff --git a/msg-sim/src/ip.rs b/linkem/src/ip.rs similarity index 100% rename from msg-sim/src/ip.rs rename to linkem/src/ip.rs diff --git a/msg-sim/src/lib.rs b/linkem/src/lib.rs similarity index 100% rename from msg-sim/src/lib.rs rename to linkem/src/lib.rs diff --git a/msg-sim/src/namespace.rs b/linkem/src/namespace.rs similarity index 100% rename from msg-sim/src/namespace.rs rename to linkem/src/namespace.rs diff --git a/msg-sim/src/network.rs b/linkem/src/network.rs similarity index 98% rename from msg-sim/src/network.rs rename to linkem/src/network.rs index 7c2163fb..92e7aa3d 100644 --- a/msg-sim/src/network.rs +++ b/linkem/src/network.rs @@ -10,10 +10,10 @@ //! //! ```text //! ┌─────────────────────────────────────────────────────────────────────────────┐ -//! │ Hub Namespace (msg-sim-hub) │ +//! │ Hub Namespace (linkem-hub) │ //! │ │ //! │ ┌─────────────────────────────────────────────────────────────────────┐ │ -//! │ │ Bridge (msg-sim-br0) │ │ +//! │ │ Bridge (linkem-br0) │ │ //! │ │ │ │ //! │ │ Acts as a virtual switch connecting all peer veth endpoints │ │ //! │ └─────────────────────────────────────────────────────────────────────┘ │ @@ -29,7 +29,7 @@ //! │ msg-veth1 │ │ msg-veth2 │ │ msg-veth3 │ //! │ │ │ │ │ │ //! │ Peer 1 Namespace │ │ Peer 2 Namespace │ │ Peer 3 Namespace │ -//! │ (msg-sim-1) │ │ (msg-sim-2) │ │ (msg-sim-3) │ +//! │ (linkem-1) │ │ (linkem-2) │ │ (linkem-3) │ //! │ │ │ │ │ │ //! │ IP: 10.0.0.1 │ │ IP: 10.0.0.2 │ │ IP: 10.0.0.3 │ //! │ │ │ │ │ │ @@ -105,16 +105,16 @@ pub fn next_peer_id() -> PeerId { pub type PeerId = usize; /// Prefix for all network namespace names created by this crate. -pub const MSG_SIM_NAMESPACE_PREFIX: &str = "msg-sim"; +pub const NAMESPACE_PREFIX: &str = "linkem"; /// Prefix for all virtual ethernet device names created by this crate. -pub const MSG_SIM_LINK_PREFIX: &str = "msg-veth"; +pub const LINK_PREFIX: &str = "msg-veth"; /// Extension trait for peer IDs providing namespace and device naming utilities. pub trait PeerIdExt: Display + Copy { /// Get the network namespace name for this peer. fn namespace_name(self) -> String { - format!("{MSG_SIM_NAMESPACE_PREFIX}-{self}") + format!("{NAMESPACE_PREFIX}-{self}") } /// Compute the IP address for this peer's veth device within the given subnet. @@ -122,7 +122,7 @@ pub trait PeerIdExt: Display + Copy { /// Get the name of the veth device inside the peer's namespace. fn veth_name(self) -> String { - format!("{MSG_SIM_LINK_PREFIX}{self}") + format!("{LINK_PREFIX}{self}") } /// Get the name of the veth device endpoint attached to the hub bridge. @@ -353,9 +353,9 @@ pub type Result = std::result::Result; /// # Example /// /// ```no_run -/// use msg_sim::network::{Network, Link, PeerOptions}; -/// use msg_sim::tc::impairment::LinkImpairment; -/// use msg_sim::ip::Subnet; +/// use linkem::network::{Network, Link, PeerOptions}; +/// use linkem::tc::impairment::LinkImpairment; +/// use linkem::ip::Subnet; /// use std::net::Ipv4Addr; /// /// #[tokio::main] @@ -421,13 +421,13 @@ pub struct Network { impl Network { /// Name of the bridge device in the hub namespace. - const BRIDGE_NAME: &str = "msg-sim-br0"; + const BRIDGE_NAME: &str = "linkem-br0"; /// Create a new simulated network with the given IP subnet. /// /// This creates: - /// 1. A hub network namespace (`msg-sim-hub`) - /// 2. A bridge device (`msg-sim-br0`) in the hub namespace + /// 1. A hub network namespace (`linkem-hub`) + /// 2. A bridge device (`linkem-br0`) in the hub namespace /// /// Peers can then be added with [`add_peer`](Self::add_peer). pub async fn new(subnet: Subnet) -> Result { @@ -475,7 +475,7 @@ impl Network { /// Get the name of the hub namespace. fn hub_namespace_name() -> String { - format!("{MSG_SIM_NAMESPACE_PREFIX}-hub") + format!("{NAMESPACE_PREFIX}-hub") } /// Add a new peer to the network. @@ -632,8 +632,8 @@ impl Network { /// # Example /// /// ```no_run - /// use msg_sim::ip::Subnet; - /// use msg_sim::network::{Network, PeerOptions}; + /// use linkem::ip::Subnet; + /// use linkem::network::{Network, PeerOptions}; /// use std::net::Ipv4Addr; /// use tokio::net::TcpListener; /// @@ -701,7 +701,7 @@ impl Network { /// # Example /// /// ```no_run - /// use msg_sim::{ + /// use linkem::{ /// ip::Subnet, /// network::{Link, Network, PeerOptions}, /// tc::impairment::LinkImpairment @@ -826,7 +826,7 @@ impl Network { } #[cfg(test)] -mod msg_sim_network { +mod linkem_network { use std::{ net::{Ipv4Addr, SocketAddr}, time::{Duration, Instant}, diff --git a/msg-sim/src/tc/core.rs b/linkem/src/tc/core.rs similarity index 100% rename from msg-sim/src/tc/core.rs rename to linkem/src/tc/core.rs diff --git a/msg-sim/src/tc/drr.rs b/linkem/src/tc/drr.rs similarity index 98% rename from msg-sim/src/tc/drr.rs rename to linkem/src/tc/drr.rs index 4253fd6b..90298187 100644 --- a/msg-sim/src/tc/drr.rs +++ b/linkem/src/tc/drr.rs @@ -84,8 +84,8 @@ impl QdiscDrrRequest { /// # Example /// /// ``` -/// use msg_sim::tc::handle::{ID_OFFSET, QdiscRequestInner}; -/// use msg_sim::tc::drr::DrrClassRequest; +/// use linkem::tc::handle::{ID_OFFSET, QdiscRequestInner}; +/// use linkem::tc::drr::DrrClassRequest; /// use rtnetlink::packet_route::tc::TcHandle; /// /// let if_index = 1; // Network interface index diff --git a/msg-sim/src/tc/filter.rs b/linkem/src/tc/filter.rs similarity index 98% rename from msg-sim/src/tc/filter.rs rename to linkem/src/tc/filter.rs index 38424cd7..8ecd846a 100644 --- a/msg-sim/src/tc/filter.rs +++ b/linkem/src/tc/filter.rs @@ -59,8 +59,8 @@ fn ipv6_mask(prefix_len: u8) -> Ipv6Addr { /// /// ``` /// use std::net::{IpAddr, Ipv4Addr}; -/// use msg_sim::tc::filter::FlowerFilterRequest; -/// use msg_sim::tc::handle::QdiscRequestInner; +/// use linkem::tc::filter::FlowerFilterRequest; +/// use linkem::tc::handle::QdiscRequestInner; /// use rtnetlink::packet_route::tc::TcHandle; /// /// let if_index = 1; // Network interface index @@ -273,8 +273,8 @@ impl TcU32Key { /// # Example /// /// ``` -/// use msg_sim::tc::filter::U32CatchallFilterRequest; -/// use msg_sim::tc::handle::QdiscRequestInner; +/// use linkem::tc::filter::U32CatchallFilterRequest; +/// use linkem::tc::handle::QdiscRequestInner; /// use rtnetlink::packet_route::tc::TcHandle; /// /// let if_index = 1; // Network interface index diff --git a/msg-sim/src/tc/handle.rs b/linkem/src/tc/handle.rs similarity index 95% rename from msg-sim/src/tc/handle.rs rename to linkem/src/tc/handle.rs index e1ee6d1b..ac13df58 100644 --- a/msg-sim/src/tc/handle.rs +++ b/linkem/src/tc/handle.rs @@ -56,7 +56,7 @@ impl QdiscRequestInner { /// # Example /// /// ``` -/// use msg_sim::tc::handle::drr_class_handle; +/// use linkem::tc::handle::drr_class_handle; /// assert_eq!(drr_class_handle(2), 0x0001_000C); // 1:12 /// ``` pub fn drr_class_handle(dest_peer_id: usize) -> u32 { @@ -74,7 +74,7 @@ pub fn drr_class_handle(dest_peer_id: usize) -> u32 { /// # Example /// /// ``` -/// use msg_sim::tc::handle::tbf_handle; +/// use linkem::tc::handle::tbf_handle; /// assert_eq!(tbf_handle(2), 0x000C_0000); // 12:0 /// ``` pub fn tbf_handle(dest_peer_id: usize) -> u32 { @@ -93,7 +93,7 @@ pub fn tbf_handle(dest_peer_id: usize) -> u32 { /// # Example /// /// ``` -/// use msg_sim::tc::handle::netem_handle; +/// use linkem::tc::handle::netem_handle; /// assert_eq!(netem_handle(2), 0x0016_0000); // 22:0 /// ``` pub fn netem_handle(dest_peer_id: usize) -> u32 { diff --git a/msg-sim/src/tc/impairment.rs b/linkem/src/tc/impairment.rs similarity index 99% rename from msg-sim/src/tc/impairment.rs rename to linkem/src/tc/impairment.rs index b78ce96d..30666a2d 100644 --- a/msg-sim/src/tc/impairment.rs +++ b/linkem/src/tc/impairment.rs @@ -13,7 +13,7 @@ use super::core::MTU_ETHERNET; /// # Example /// /// ``` -/// use msg_sim::tc::impairment::LinkImpairment; +/// use linkem::tc::impairment::LinkImpairment; /// /// // Using method chaining (recommended) /// let satellite_link = LinkImpairment::default() diff --git a/msg-sim/src/tc/mod.rs b/linkem/src/tc/mod.rs similarity index 100% rename from msg-sim/src/tc/mod.rs rename to linkem/src/tc/mod.rs diff --git a/msg-sim/src/tc/netem.rs b/linkem/src/tc/netem.rs similarity index 97% rename from msg-sim/src/tc/netem.rs rename to linkem/src/tc/netem.rs index e28ded1c..a757c3e4 100644 --- a/msg-sim/src/tc/netem.rs +++ b/linkem/src/tc/netem.rs @@ -115,9 +115,9 @@ impl From for NetemQopt { /// # Example /// /// ``` -/// use msg_sim::tc::impairment::LinkImpairment; -/// use msg_sim::tc::netem::QdiscNetemRequest; -/// use msg_sim::tc::handle::QdiscRequestInner; +/// use linkem::tc::impairment::LinkImpairment; +/// use linkem::tc::netem::QdiscNetemRequest; +/// use linkem::tc::handle::QdiscRequestInner; /// use rtnetlink::packet_route::tc::TcHandle; /// /// let if_index = 1; // Network interface index diff --git a/msg-sim/src/tc/nla.rs b/linkem/src/tc/nla.rs similarity index 100% rename from msg-sim/src/tc/nla.rs rename to linkem/src/tc/nla.rs diff --git a/msg-sim/src/tc/requests.rs b/linkem/src/tc/requests.rs similarity index 100% rename from msg-sim/src/tc/requests.rs rename to linkem/src/tc/requests.rs diff --git a/msg-sim/src/tc/tbf.rs b/linkem/src/tc/tbf.rs similarity index 99% rename from msg-sim/src/tc/tbf.rs rename to linkem/src/tc/tbf.rs index de2bceb3..182b250a 100644 --- a/msg-sim/src/tc/tbf.rs +++ b/linkem/src/tc/tbf.rs @@ -265,9 +265,9 @@ impl TbfQopt { /// # Example /// /// ``` -/// use msg_sim::tc::impairment::LinkImpairment; -/// use msg_sim::tc::handle::QdiscRequestInner; -/// use msg_sim::tc::tbf::QdiscTbfRequest; +/// use linkem::tc::impairment::LinkImpairment; +/// use linkem::tc::handle::QdiscRequestInner; +/// use linkem::tc::tbf::QdiscTbfRequest; /// use rtnetlink::packet_route::tc::TcHandle; /// /// let if_index = 1; // Network interface index diff --git a/msg-sim/src/wrappers.rs b/linkem/src/wrappers.rs similarity index 100% rename from msg-sim/src/wrappers.rs rename to linkem/src/wrappers.rs From f1124624f338d572fb1e549f681e97290beaa2fc Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Tue, 17 Feb 2026 08:26:30 +0100 Subject: [PATCH 2/2] chore: bump msrv --- README.md | 2 +- rust-toolchain.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f11a1423..8bf5db65 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ The 📖 [MSG-RS Book][book] contains detailed information on how to use the lib ## MSRV -The minimum supported Rust version is 1.88 (see [rust-toolchain.toml](./rust-toolchain.toml)). +The minimum supported Rust version is 1.89.0 (see [rust-toolchain.toml](./rust-toolchain.toml)). ## Contributions & Bug Reports diff --git a/rust-toolchain.toml b/rust-toolchain.toml index c9cac26f..7b9d4cf6 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.88.0" +channel = "1.89.0" components = ["rust-analyzer"]