tower
async fn(Request) -> Result<Response, Error> (by tower-rs)
bitvec
A crate for managing memory bit by bit (by ferrilab)
Our great sponsors
tower | bitvec | |
---|---|---|
14 | 17 | |
3,255 | 1,133 | |
2.5% | 1.1% | |
2.9 | 0.0 | |
9 days ago | 6 days ago | |
Rust | Rust | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.
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.
tower
Posts with mentions or reviews of tower.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-10-07.
-
Collection of trait implementations with associated types (GATs?)
This question is partially inspired by this PR which is kinda trying to do the same thing.
-
dd-trace-layer - A web application middleware for sending Datadog's trace
dd-trace-layer is a middleware for sending Datadog's trace. It's based on Tower and OpenTelemetry Rust.
-
GCP firestore and logging SDK in rust
I'm pretty sure that GCP's APIs (unlike AWS, which uses Smithy for very genuinely, very good reason) are defined using Protobuf and can be communicated with over gRPC, which means that you don't need to bind via cxx to GCP's C++ APIs. Take a look at this example using Tonic. If you're to use Tonic, you'll also be able to use Tower's middleware (main crate, http-specific) to implement retries, timeouts, tracing, and all the other things you need to be production-ready.
-
Which Rust web framework to choose in 2022 (with code examples)
#[derive(Clone)] struct MyMiddleware { inner: S, } impl Service> for MyMiddleware where S: Service, Response = Response> + Clone + Send + 'static, S::Future: Send + 'static, { type Response = S::Response; type Error = S::Error; type Future = BoxFuture<'static, Result>; fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { self.inner.poll_ready(cx) } fn call(&mut self, mut req: Request) -> Self::Future { println!("before"); // best practice is to clone the inner service like this // see https://github.com/tower-rs/tower/issues/547 for details let clone = self.inner.clone(); let mut inner = std::mem::replace(&mut self.inner, clone); Box::pin(async move { let res: Response = inner.call(req).await?; println!("after"); Ok(res) }) } } fn main() { let app = Router::new() .route("/", get(|| async { /* ... */ })) .layer(layer_fn(|inner| MyMiddleware { inner })); }
-
How to schedule and run cron jobs in Rust using apalis
For this tutorial, we're going to use apalis to run cron jobs in an async context. We will also look at how to decorate our jobs with tower middleware allowing us to unlock features like retries, prometheus, sentry etc
-
Warp or Rocket.rs or Actix Web?
So I have now had a look at Axum and think I will give it a try. In the readme in the repository it says something about tower or tower::Service and tonic, what exactly is that? I do not understand that yet.
-
tower-lsp 0.16.0 — Lightweight framework for building LSP servers
Better compatibility with tower ecosystem.
-
ratpack: a simpleton's HTTP framework
ratpack is idealized in the simplicity of the sinatra (ruby) framework in its goal, and attempts to be an alternative to other async HTTP frameworks such as tower, warp, axum, and tide.
-
When and how to use traits?
i would browse the standard library, tower, nom, or my own bitvec to see layout and trait/record separation. in particular, std::io and std::net may be of use: io::Read and io::Write are pervasive examples of implementing unixy file-descriptor-like behavior in the type system
-
I could use some help!
We're not there yet. I keep an eye on Tower which looks promising to build on top of. And I keep an eye on MoonZoon (full stack framework, unashamedly opinionated!).
bitvec
Posts with mentions or reviews of bitvec.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-05-14.
-
bitcode 0.4 release - binary serialization format
I was also under the false impression that bitwise encoding was slow. When I first implemented bitcode with bitvec I got performance 20x worse than bincode. After writing my own implementation I was able to get much better performance.
-
An optimized replacement of the infamous std::vector<🅱️ool>
interesting; i'll have to compare this to my rust counterpart. your numbers indicate some clever implementations i'd love to read
-
You need to stop idolizing programming languages.
Not to mention having a lackluster std which causes you to use nonstardard not so well documented crates and a 40K LoC library to do "bit-twiddling" (the lib, https://github.com/bitvecto-rs/bitvec the blog that says "twiddle bits" https://blog.adamchalmers.com/making-a-dns-client/ and for crying out loud the blogger also used the language the author mentioned and I quote "ergonomics AND speed AND correctness")
- bit-twiddling tricks. It's the perfect example of Rust's no-compromises "ergonomics AND speed AND correctness" ideals
-
An Armful of CHERIs: Memory Safety in the processor. Do we still need safe languages with CHERI?
https://github.com/bitvecto-rs/bitvec/issues/135 is a very funny read about how to perform inttoptr with provenance retention
-
bitvec 1.0.0 Released
Technically #135 gives me license to yank affected crates, but since the only exploit is "Miri crashes exactly one test out of the suite" it's not really worth it to be a stickler. Call it a truce
-
What are some creative/advanced uses of macro_rules?
My friend Nika wrote a macro that packs a sequence of 1, 0, … tokens into a correctly structured bit-buffer, adaptable over any register type or bit-ordering, at compile time. It's now basically this whole file
-
Where do I document a published crate?
if you are interested in a user manual, you can use mdbook as well. for an example, my bitvec project uses mdbook (book.toml) and a github action (.github/workflows/gh-pages.yml) to compile the guide and host it as a github pages website. it's slightly more complicated, and i'd like docs.rs to follow hexdoc.pm's example of hosting both api docs and prose, but until then this is a pretty reasonable solution.
-
Idiomatic Way to Validate Struct Field Values
the first one
-
When and how to use traits?
i would browse the standard library, tower, nom, or my own bitvec to see layout and trait/record separation. in particular, std::io and std::net may be of use: io::Read and io::Write are pervasive examples of implementing unixy file-descriptor-like behavior in the type system
What are some alternatives?
When comparing tower and bitvec you can also consider the following projects:
hyper - An HTTP library for Rust
nom - Rust parser combinator framework
tower-lsp - Language Server Protocol implementation written in Rust
rfcs - RFCs for changes to Rust
tower-http - HTTP specific Tower utilities.
time - The most used Rust library for date and time handling.
apalis - Simple, extensible multithreaded background job and message processing library for Rust
byteorder - Rust library for reading/writing numbers in big-endian and little-endian.
Tide - Fast and friendly HTTP server framework for async Rust
hardcaml - Hardcaml is an OCaml library for designing hardware.
h2 - HTTP 2.0 client & server implementation for Rust.
alacritty - A cross-platform, OpenGL terminal emulator.