diff --git a/README.md b/README.md index 29d49548..748ee703 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,19 @@ Testcontainers-rs is the official Rust language fork of [http://testcontainers.o ## Usage +### `testcontainers` is the core crate + +The crate provides an API for working with containers in a test environment. + 1. Depend on `testcontainers` -2. Import `use testcontainers::*`. +2. Implement `testcontainers::core::Image` for necessary docker-images +3. Run it with any available client `testcontainers::clients::*` + +### Ready-to-use images + +The easiest way to use `testcontainers` is to depend on ready-to-use images (aka modules). -Check [the integration tests](./testcontainers/tests) on how to use the library. +Modules are available as a community-maintained crate: [testcontainers-modules](https://github.com/testcontainers/testcontainers-rs-modules-community) ## License diff --git a/testcontainers/src/lib.rs b/testcontainers/src/lib.rs index b687fc99..35dd2c2a 100644 --- a/testcontainers/src/lib.rs +++ b/testcontainers/src/lib.rs @@ -27,7 +27,8 @@ //! //! # Ecosystem //! -//! The testcontainers ecosystem is split into multiple crates, however, the `testcontainers` crate itself is a meta-crate, re-exporting the others. Usually, depending on `testcontainers` should be sufficient for most users needs. +//! `testcontainers` is the core crate that provides an API for working with containers in a test environment. +//! However, it does not provide ready-to-use modules, you can implement your [`Image`]s using the library directly or use community supported [`testcontainers-modules`]. //! //! [tc_website]: https://testcontainers.org //! [`Docker`]: https://docker.com @@ -35,6 +36,7 @@ //! [`Client`]: trait.Docker.html#implementors //! [`Images`]: trait.Image.html#implementors //! [`Container`]: struct.Container.html +//! [`testcontainers-modules`]: https://crates.io/crates/testcontainers-modules pub use crate::core::{Container, Image, ImageArgs, RunnableImage}; #[cfg(feature = "experimental")]