Registry / testing / testcontainers-modules

testcontainers-modules

JSON →
library0.15.0rscratesunverified

Community maintained modules for Testcontainers for Rust, providing pre-configured container images for integration testing.

# Cargo.toml [dependencies] testcontainers-modules = "0.15.0"
INSTALL
IMPORT
SIG · TESTCONTAINERS-MOD
T
testcontainers-modules
testingrustv0.15.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AsyncRunner
use testcontainers_modules::testcontainers::runners::AsyncRunner;

Starts a Redis container using the testcontainers-modules async runner.

use testcontainers_modules::testcontainers::runners::AsyncRunner; use testcontainers_modules::redis; #[tokio::main] async fn main() { let container = redis::Redis::default().start().await.unwrap(); println!("Redis running on port {}", container.get_host_port_ipv4(6379).await.unwrap()); }
Debug
Known issues
gotchaRequires an async runtime (e.g., Tokio) to use the async runner.
fix
Add tokio as a dependency and annotate main with #[tokio::main].
affects: >=0.15.0
Upgrade
Version history
0.15.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
testcontainers-modules — cargo add testcontainers-modules · libregistry