All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fix the problem where spawn in drop panics (#228).
- Add missing APIs for
tonic::transport::Server::builder
. - Add missing re-exports for
tonic::body
.
- tonic: Update
tonic
andtonic-build
to v0.12.0.
- Fix the problem that
Handle::spawn
spawns the task in a new node.
- Remove
Handle::spawn
andHandle::spawn_blocking
as the implementation is incorrect.
- Add
Runtime::handle()
.
- 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.
- Implement
Debug
forHandle
andAbortHandle
.
- When
MADSIM_ALLOW_SYSTEM_THREAD
is set, executor won't panic when no task is ready.
- Add
MADSIM_ALLOW_SYSTEM_THREAD
environment variable to allow creating system threads in simulation.
- Fix unaligned pointer access in getrandom.
- Remove
stats
feature to allow tokio >=1.33.
- Fix the problem that
getrandom
returns different values in multiple runs with the same seed.
sleep
andsleep_until
now sleep for at least 1ms to be consistent with tokio's behavior.
- Allow
tonic
andtonic-build
v0.11.
- Add
task::AbortHandle::is_finished
.
- Fix intercepting time on x86_64 macOS, Rust 1.75.0.
- Update
aws-sdk-s3
to v0.39.0.
- Update
aws-sdk-s3
to v0.35.0.
- madsim: Return an error instead of panicking when
lookup_host
receives an invalid address.
- tokio: Add
Runtime::enter
API.
- Add missing APIs for
Builder
in v0.10.0.
- Fix missing
futures_core
dependency.
- tonic: Update
tonic
andtonic-build
to v0.10.0.
- tonic: Add dummy methods
max_encoding_message_size
andmax_decoding_message_size
inclient::Grpc
and generated clients and servers.
- tonic-build: Update methods
send_gzip
->send_compressed
,accept_gzip
->accept_compressed
in generated clients and servers.
- tonic: Update
tonic
andtonic-build
to v0.9.2.
- tonic: Support setting timeout for each request.
- s3: Fix compile error.
- s3: Fix missing parts ordering.
- tokio: Add
tokio::task::futures::TaskLocalFuture
.
- s3: Update
aws-sdk-s3
to v0.28.
- madsim: Add
restart_on_panic_matching
to support auto restarting on panic with certain messages.
- madsim: Add
time::advance
.
- tonic: Fix panic on bi-directional streaming server closed.
- madsim: Add detailed metrics for tasks.
- madsim: Avoid spawning tasks for connection.
- madsim: Fix leak of task introduced in 0.2.19.
- tonic: Fix leak of RPC task in server.
- madsim: Print context information on panic.
- madsim: Add
AbortHandle
. - madsim: Add
RuntimeMetrics
. - tokio: Support dropping
Runtime
.
- madsim: Futures of a killed node are dropped after a while.
- tonic: Support request timeout.
- madsim: Replace
SmallRng
withXoshiro256PlusPlus
for reproducibility across platforms. - tonic: Return an error when the server stream is broken.
- madsim: Prevent deadlock when killing a node.
- s3: Make fields public for
*Output
structs.
- madsim: Fix
clock_gettime(CLOCK_BOOTTIME = 7)
on Linux. - s3: Don't return error when deleted object is not found.
- madsim: Add
buggify
. - madsim: Add
JoinHandle::{id, is_finished}
. - madsim: Add
signal::ctrl_c
andHandle::send_ctrl_c
. - madsim: Add
Handle::is_exit
. - Add S3 simulator.
- madsim: After the initial task completes, the other tasks of the node are dropped.
- madsim: Add
NetSim::add_dns_record
. - madsim: Add a global IPVS for load balancing.
- tonic/rdkafka: Resolve DNS on connection.
- madsim: Fix join cancelled tasks.
- madsim: No longer initialize the global logger on
#[main]
or#[test]
.
- madsim: Fix
Instant
interception on ARM64 macOS caused by change in Rust nightly.
- tokio: Add
task::Builder::new_current_thread
but panic inside. - tonic: Add
service
module andExtensions
. - tonic: Support interceptor.
- tonic: Fix passing metadata in request and response. Add
content-type
anddate
field. - tonic: Fix panic on unimplemented error.
- madsim: Fix panic on TLS access error.
- madsim: Fix internal structure change of nightly
std::time::{SystemTime, Interval}
.
- madsim: Expose
JoinHandle::cancel_on_drop
.
- tokio: Add fake
Runtime
.
- madsim: Change the default seed to the nanosecond of current time.
- madsim: Wait for a while after panicking before restart.
- madsim: Avoid closing socket of a restarted node.
- madsim: Add hook function for RPC.
- madsim: Deprecate
Network::(dis)connect(2)
functions. Rename them to(un)clog_*
.
- madsim: Forbid creating system thread in simulation.
- madsim: Drop futures on killing node.
- madsim: Make
Endpoint
clonable.
- madsim: Fix panic from minstant crate on Linux virtual machine.
- tonic: Fix panic when server sends a response but client has closed the stream.
- madsim: Fix
lookup_host
on 'localhost'.
- madsim: Add
task::Builder
API. - madsim: Support auto restarting a node on panic.
- madsim: Rename
TaskNodeHandle
toSpawner
.
- madsim: Deprecate
spawn_blocking
.
- madsim: Add basic
net::UdpSocket
.
- madsim: Refactor network simulator with a new connection primitive.
- madsim: Migrate logging facility to
tracing
. Replaceenv_logger
withtracing-subscriber
. - madsim: Migrate std lock to spin lock.
- tonic: Reduce dependencies in simulation build.
- madsim: Fix the address of
TcpStream
accepted fromTcpListener
. - madsim: Fix the socket address space. A TCP and a UDP sockets can have the same address in a node.
- tonic: Close the stream when the connection is broken.
- madsim-tonic: Add missing methods of
Endpoint
andServer
.
- madsim-tokio:
#[tokio::main]
no longer requires madsim crate.
- madsim: Remove
collections
module since we can use std's directly.
- madsim: Allow user to set the number of CPU cores and simulate
std::thread::available_parallelism
. - madsim: Add
MADSIM_TEST_JOBS
environment variable to set the number of jobs to run simultaneously. - madsim: Introduce runtime
Builder
. - madsim: Expose seed via
Handle::seed
.
- madsim: Fix the local address after bind
0.0.0.0
. - madsim-tonic: Client connecting to an invalid address should return error.
- madsim: Remove
Runtime::{enable_determinism_check, take_rand_log}
. Replaced bycheck_determinism
.
-
Make deterministic on
rand
andstd::{collections::{HashMap, HashSet}, time::{SystemTime, Instant}}
.Exception:
rand
is not deterministic on linux. usemadsim::rand
instead.
- 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.
- Migrate a new crate
madsim-tokio-postgres
for simulation. - madsim-tokio: Add
task_local
,task::LocalKey
,signal::ctrl_c
. - madsim-tonic: Support
Request::remote_addr
and returning error from server.
- madsim: Refactor TCP simulator and fix several bugs. (#18)
- madsim: Avoid some panics on panicking.
- madsim: Add TCP simulation.
- madsim-tokio: Add
task::consume_budget
andtask::Id
.
- madsim: Avoid duplicate connection and close unused connection on TCP.
- madsim-tokio: Fix
full
feature.
- madsim: Add serde API to
HashMap
. - madsim-norandom: A preview library for intercepting libc
getrandom
.
- Breaking: Change the way to enable simulation:
#[cfg(feature = "sim")]
->#[cfg(madsim)]
.
- Lock version on madsim dependencies to prevent API broken.
- Add a new crate
madsim-tokio
for tokio simulation. - madsim/sim: Add
time::interval
andtask::yield_now
. - madsim/sim: Complete methods for
Sleep
,Elapsed
,JoinError
andJoinHandle
. - madsim-tonic: Add
Server::layer
but don't implement it.
- Breaking: madsim: Switch
JoinHandle
to tokio style which won't cancel task on drop. - madsim-macros: Improve error message on panic in simulation.
- madsim: Fix TCP performance issue by setting NODELAY.
TODO
- A real world backend.
- Fix deadlock on M1 macOS: add epsilon on time increasing
- API to get the local socket address.
- Deterministic check on test.
- Remove default time limit (300s) on test.
- Improve error message on context missing.
- Fix double panic in the executor.
- Fix deterministic in
time::timeout
.
- Deterministic async runtime.
- Basic simulated network and file system.