madsim-tokio
The `tokio` simulator on madsim.
0.2.30
6.5M downloads/mo
#3937 most downloaded on crates.io
madsim-rs/madsim
What this package is like to depend on
Last release 2 years ago
no release in 18 months
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 14 of 14 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
20 releases · first in 2022
0 releases in the last 12 months
see the full history below
Release timeline
20 releases · May 2022 to Oct 2024Releases
latest 20-
0.2.3004 Oct 2024Release notes
Open source →Removed
- Remove
Handle::spawnandHandle::spawn_blockingas the implementation is incorrect.
- Remove
-
0.2.2909 Aug 2024Release notes
Open source →Added
- Implement
DebugforHandleandAbortHandle.
Fixed
- When
MADSIM_ALLOW_SYSTEM_THREADis set, executor won't panic when no task is ready.
- Implement
-
0.2.2806 Jun 2024 -
0.2.2705 Jun 2024 -
0.2.2627 May 2024Release notes
Open source →Added
- Add a fake
runtime::Handle. Note that this is a re-export ofmadsim::task::Handle. Tasks spawned with this handle are not correctly associated with the tokio runtime.
- Add a fake
-
0.2.2508 Apr 2024 -
0.2.2426 Oct 2023Release notes
Open source →- fix time on x86_64 macos
Signed-off-by: Runji Wang [email protected]
- add path to madsim deps
Signed-off-by: Runji Wang [email protected]
- update deps for madsim
Signed-off-by: Runji Wang [email protected]
Signed-off-by: Runji Wang [email protected]
-
0.2.2330 May 2023Release notes
Open source →Fixed
- madsim: Return an error instead of panicking when
lookup_hostreceives an invalid address.
- madsim: Return an error instead of panicking when
-
0.2.1907 Apr 2023Release notes
Open source →Added
- madsim: Print context information on panic.
- madsim: Add
AbortHandle. - madsim: Add
RuntimeMetrics. - tokio: Support dropping
Runtime.
Changed
- madsim: Futures of a killed node are dropped after a while.
-
0.2.1507 Feb 2023Release notes
Open source →Added
- madsim: Add
buggify. - madsim: Add
JoinHandle::{id, is_finished}. - madsim: Add
signal::ctrl_candHandle::send_ctrl_c. - madsim: Add
Handle::is_exit. - Add S3 simulator.
Changed
- madsim: After the initial task completes, the other tasks of the node are dropped.
- madsim: Add
-
0.2.1102 Dec 2022Release notes
Open source →Added
- tokio: Add
task::Builder::new_current_threadbut panic inside. - tonic: Add
servicemodule andExtensions. - tonic: Support interceptor.
Fixed
- tonic: Fix passing metadata in request and response. Add
content-typeanddatefield. - tonic: Fix panic on unimplemented error.
- tokio: Add
-
0.2.715 Sep 2022Release notes
Open source →Added
- tokio: Add fake
Runtime.
Changed
- madsim: Change the default seed to the nanosecond of current time.
- madsim: Wait for a while after panicking before restart.
Fixed
- madsim: Avoid closing socket of a restarted node.
- tokio: Add fake
-
0.2.224 Aug 2022Release notes
Open source →Added
- madsim: Add
task::BuilderAPI. - madsim: Support auto restarting a node on panic.
Changed
- madsim: Rename
TaskNodeHandletoSpawner.
Removed
- madsim: Deprecate
spawn_blocking.
- madsim: Add
-
0.2.010 Aug 2022Release notes
Open source →Added
- madsim-tonic: Add missing methods of
EndpointandServer.
Fixed
- madsim-tokio:
#[tokio::main]no longer requires madsim crate.
Removed
- madsim: Remove
collectionsmodule since we can use std's directly.
- madsim-tonic: Add missing methods of
-
0.2.0-alpha.706 Aug 2022 pre-releaseRelease notes
Open source →Added
- madsim: Allow user to set the number of CPU cores and simulate
std::thread::available_parallelism. - madsim: Add
MADSIM_TEST_JOBSenvironment variable to set the number of jobs to run simultaneously. - madsim: Introduce runtime
Builder. - madsim: Expose seed via
Handle::seed.
Fixed
- madsim: Fix the local address after bind
0.0.0.0. - madsim-tonic: Client connecting to an invalid address should return error.
Removed
- madsim: Remove
Runtime::{enable_determinism_check, take_rand_log}. Replaced bycheck_determinism.
- madsim: Allow user to set the number of CPU cores and simulate
-
0.2.0-alpha.601 Aug 2022 pre-releaseRelease notes
Open source →Added
-
Make deterministic on
randandstd::{collections::{HashMap, HashSet}, time::{SystemTime, Instant}}.Exception:
randis not deterministic on linux. usemadsim::randinstead.
Changed
- madsim-macros: Every simulation now runs on a new thread to ensure the determinism.
- madsim-tonic: Update tonic to v0.8. Additional system protoc is required.
-
-
0.2.0-alpha.526 Jul 2022 pre-releaseRelease notes
Open source →Added
- Migrate a new crate
madsim-tokio-postgresfor simulation. - madsim-tokio: Add
task_local,task::LocalKey,signal::ctrl_c. - madsim-tonic: Support
Request::remote_addrand returning error from server.
Fixed
- madsim: Refactor TCP simulator and fix several bugs. (#18)
- madsim: Avoid some panics on panicking.
- Migrate a new crate
-
0.2.0-alpha.418 Jul 2022 pre-releaseRelease notes
Open source →Added
- madsim: Add TCP simulation.
- madsim-tokio: Add
task::consume_budgetandtask::Id.
Fixed
- madsim: Avoid duplicate connection and close unused connection on TCP.
- madsim-tokio: Fix
fullfeature.
-
0.2.0-alpha.325 May 2022 pre-releaseRelease notes
Open source →Added
- madsim: Add serde API to
HashMap. - madsim-norandom: A preview library for intercepting libc
getrandom.
Changed
- Breaking: Change the way to enable simulation:
#[cfg(feature = "sim")]->#[cfg(madsim)].
Fixed
- Lock version on madsim dependencies to prevent API broken.
- madsim: Add serde API to
-
0.2.0-alpha.221 May 2022 pre-releaseRelease notes
Open source →Added
- Add a new crate
madsim-tokiofor tokio simulation. - madsim/sim: Add
time::intervalandtask::yield_now. - madsim/sim: Complete methods for
Sleep,Elapsed,JoinErrorandJoinHandle. - madsim-tonic: Add
Server::layerbut don't implement it.
Changed
- Breaking: madsim: Switch
JoinHandleto tokio style which won't cancel task on drop. - madsim-macros: Improve error message on panic in simulation.
Fixed
- madsim: Fix TCP performance issue by setting NODELAY.
- Add a new crate