
Axum Testing With Tower Oneshot and In Memory Requests
Test an Axum router without opening a port: build a Request, call oneshot, read the body and assert on status and JSON. Includes the setup for shared state.
Everything you need to level up your coding skills.

Test an Axum router without opening a port: build a Request, call oneshot, read the body and assert on status and JSON. Includes the setup for shared state.

A MutexGuard held across an await can make a task non-Send or deadlock a worker. See the compiler error, the deadlock it allows and three fixes.

E0599 means no method with that name exists on that type, or the trait providing it is not in scope or not implemented. Find which of five causes applies.

E0502 appears when you hold a reference into a value and then change that value. See the typical Vec case, why push is the danger, and four ways to resolve it.

In no_std a panic handler is mandatory. Compare panic-halt, panic-abort, panic-probe and a custom handler, and how panic = abort and the core panic machinery fit together.

Declare each dependency version once in the workspace root and inherit it in members with workspace = true. Learn the syntax, adding features per member and what cannot be inherited.

Boot a minimal Rust kernel in QEMU: a no_std crate, the bootloader crate, a disk image, a panic handler and writing text to the serial port in a few dozen lines.

Wrap secrets so they never print, and wipe them from memory on drop. Use the secrecy and zeroize crates, understand what zeroing can and cannot guarantee and avoid accidental copies.

A plan for writing an operating system kernel in Rust: the order of milestones from booting to a shell, which crates help, what to read and the traps at each stage.

Instead of picking inputs, state a property and let proptest generate hundreds. See round trip and invariant properties, shrinking to a minimal failure and a bug it finds.

RTIC schedules interrupt driven tasks with compile time priorities; Embassy runs async tasks cooperatively. Compare the models, resource sharing, latency and when each fits.

Liveness says the process is stuck, readiness says it cannot take traffic yet. Implement both in Axum, decide what each checks and avoid the restart loops a bad probe causes.
We send one email when a new post is published. No spam.