testcontainers-rs
cargo-machete
testcontainers-rs | cargo-machete | |
---|---|---|
6 | 3 | |
591 | 550 | |
8.8% | - | |
7.7 | 7.3 | |
5 days ago | 21 days ago | |
Rust | Rust | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
testcontainers-rs
-
Rust Tooling: 8 tools that will increase your productivity
Testing with added infrastructure can be quite tricky. testcontainers aims to solve this by providing an open-source framework for providing local, lightweight containers for your application that can be immediately thrown away after use. It also has a Rust SDK!
-
Writing a REST API in Rust
Add tests! You can use testcontainers to spin up Docker containers for Postgres and other infrastructure which makes testing your database extremely easy. You can find more about this here.
-
Writing Better Integration Tests with RAII
You didn't mention how do you start Postgres for the tests. Is it assumed it runs in the background? A cool crate I use lately for this kind of thing is test_containers that can start docker containers from code, for example - Postgres
-
Tokio's Axum web framework - not new, but new to me
Do you manually spin up the containers or do you use testcontainers?
-
Using rust for REST-API microservices
For the repo testing, thatβs simple. https://github.com/testcontainers/testcontainers-rs will start a Docker image and you just use that when instantiating the repo.
-
httpmock - A Rust library and tool for mocking and prototyping HTTP endpoints.
Thanks for sharing! I'm still a beginner with Rust and still pretty new to testing in general - is there any benefit to using something like this over bringing up the service as a separate container using something like testcontainers? I suppose the biggest one is this is in-memory and doesn't require the party running tests to have Docker available locally. The tradeoff is the extra work to create all the mocks (i.e. my library has several dozen endpoints).
cargo-machete
-
Rust Tooling: 8 tools that will increase your productivity
cargo-machete is a Cargo plugin for cutting out unused dependencies from your project. To install it, you can use cargo install cargo-machete then use cargo machete in a Rust project directory.
-
VS Code: How to get these two features?
cargo machete can remove unused imports.
- Is there a tool to remove unused dependencies from a Cargo file?
What are some alternatives?
libreddit - Private front-end for Reddit
cargo-udeps - Find unused dependencies in Cargo.toml
RustScan - π€ The Modern Port Scanner π€
cargo-make - Rust task runner and build tool.
vaultwarden - Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs
rust - Empowering everyone to build reliable and efficient software.
sea-orm - π An async & dynamic ORM for Rust
cargo-release - Cargo subcommand `release`: everything about releasing a rust crate.
httpmock - HTTP mocking library for Rust.
cargo-deny - β Cargo plugin for linting your dependencies π¦
axum - Ergonomic and modular web framework built with Tokio, Tower, and Hyper
cargo-about - π Cargo plugin to generate list of all licenses for a crate π¦