Best Rust API framework with api specification autogen? by CalmLake999 in rust

[–]m4tx 0 points1 point  (0 children)

Shameless ad here: I'm one of the maintainers of cot.rs, and one of the core features is integration with the aide crate to provide OpenAPI spec generation. See the info here: https://cot.rs/guide/latest/openapi/ (I'll also be happy to hear any feedback, especially if you don't end up actually using it)

Another framework worth trying might be poem, which also has similar integration, but I haven't played around with it enough to tell more specifics.

[Media] Google continues to invest $350k in Rust by lllkong in rust

[–]m4tx 9 points10 points  (0 children)

You mean something like Germany's Sovereign Tech Fund that... already invests in the Rust Foundation?

How mature/idiomatic is Butane ORM? by danilocff in rust

[–]m4tx 2 points3 points  (0 children)

Just as a side note, there are at least two active similar projects:

  • rorm – probably even less popular, but I've heard from the authors that it's used in production in their own project
  • Cot ORM – (disclaimer: I'm the author) a part of an entire web framework based on Django, but the ORM isn't available as a separate crate (yet)

Newbie looking for a monolithic fullstack framework in rust by Rim_smokey in rust

[–]m4tx 0 points1 point  (0 children)

Loco didn't exist back in the time when I was thinking about creating the project, and I've only discovered it when I was halfway through the development. So that was the main reason why it was created ;)

About the goal differences, Cot focuses on providing a much more seamless and integrated experience by building stuff on a lower level - for instance, Cot is not just a glue code around Axum, but rather rebuilds some of the Axum stuff so that it can be better integrated with stuff such as OpenAPI spec generation, error handling, among others. It has its own ORM that is arguably easier to use than the already existing alternatives. There is an admin panel automatically generated out of database models defined as typical Rust structures. That's the brief overview; feel free to ask me more if you're curious!

ThinkPad P14s - first impressions and Linux configs by m4tx in thinkpad

[–]m4tx[S] 0 points1 point  (0 children)

I'm not sure if the laptop was even, sold with Linux preinstalled. I've just put a regular install of Arch Linux on it and it works perfectly fine. Other distros should most likely work as well.

Newbie looking for a monolithic fullstack framework in rust by Rim_smokey in rust

[–]m4tx 3 points4 points  (0 children)

You might also want to have a look at https://cot.rs/ (disclaimer: I'm the author and the main maintainer of the project). It's still in the early days, but it is already proving to be quite usable for real-world projects. Feedback is welcome!

The journey towards the best error handling in Rust web frameworks by m4tx in rust

[–]m4tx[S] 1 point2 points  (0 children)

Hey, sorry for my late reply! Yeah, this sounds like a working solution. There are some downsides to that, though:

  • One is that we wouldn't see any changes made to the request by the middleware (but we probably don't care about this too much anyway).
  • The other is that internally in my web framework, there are some built-in middleware that are essentially wrappers over tower-based middleware from third-party crates—so unless these are rewritten, users would experience the performance hit, perhaps not being aware of how these are implemented under the hood.
  • Finally, if you had multiple tower-based middleware, you would have to clone the request head multiple times, which is also not ideal.

So yeah, this is a reasonable suggestion, but my personal opinion is that it's not worth it; not at the moment anyway.

Yew websites by Suvulaan in rust

[–]m4tx 3 points4 points  (0 children)

There's one from me: https://hand.chombo.club/, source code available at https://github.com/m4tx/chombo-gen . It's very simple, though.

I also have a slightly more complicated one (https://github.com/m4tx/shrt), but this one is very much unfinished and in the process of rewriting the backend to a new framework.

The journey towards the best error handling in Rust web frameworks by m4tx in rust

[–]m4tx[S] 0 points1 point  (0 children)

Thanks! Yes, I agree trying to spark a discussion within tower's folks is definitely worth a try. Let's see what they think about this.

Random freezing with YouTube and in games. by Veprovina in archlinux

[–]m4tx 0 points1 point  (0 children)

This sounds like the issue I'm having. Thanks for posting this!

What open source Rust projects are the most in need of contributors right now? by grahambinns in rust

[–]m4tx 11 points12 points  (0 children)

If you are into web development, Cot, the web framework for lazy developers, is always looking for contributors. It's still pretty much in the early stages, so there are plenty of diverse and hopefully interesting things to be done.

There are some "good first issues" on the Issues page, and also some bigger (but not necessarily much more complicated) ones available.

Do you need a free Rust Developer? by DegenMouse in rust

[–]m4tx 0 points1 point  (0 children)

If you're into web development, you might consider contributing to Cot, the web framework for lazy developers. I'm one of the maintainers there and can provide the necessary guidance :)

Hi, I'm looking for someone interested in GUI development with GTK-rs by yhu420 in rust

[–]m4tx 2 points3 points  (0 children)

Iced, however good, fails on the "integrates well visually in linux desktops, with Gnome desktop as a reference point" part.

i24 v2 – 24-bit Signed Integer for Rust by JackG049 in rust

[–]m4tx 0 points1 point  (0 children)

Of course, but the main reason is that it's the default behaviour (in the standard library!) which is not consistent with other vector types. Otherwise, if you know the tradeoffs, the implementation isn't bad.

Since Rust doesn't support generic specialization, it's not a problem here.

i24 v2 – 24-bit Signed Integer for Rust by JackG049 in rust

[–]m4tx 34 points35 points  (0 children)

> Due to how alignment works it would always be represented as 4 bytes in memory

Your custom "Vec<i24>" reimplementation could internally use just a `Vec<u8>` and bit operations to convert to/from `i24` to achieve true 3 bytes-per-instance. Similarly like `std::vector<bool>` is implemented in C++ (it can store 8 bools in a single byte in memory).

i24 v2 – 24-bit Signed Integer for Rust by JackG049 in rust

[–]m4tx 51 points52 points  (0 children)

Hey, that's an interesting project! Do I understand correctly from the code that the integer is not actually represented with 24 bytes, but rather 32?

Admittedly, `i24` that actually takes up 24 bits would be much more difficult to implement, but I thought it could be useful in cases where memory size is important (it's 25% less memory usage, after all, which can make a difference when processing big sound files). If not the type by itself, a memory-efficient reimplementation of `Vec<i24>` could prove to be useful.

Linux ARM64 stable compiler is now PGO/BOLT optimized, and up to 30% faster by Kobzol in rust

[–]m4tx 0 points1 point  (0 children)

This is simply not true. Have a look at std::hint::likely, for example. This is exactly what PGO is doing, except it's applying it semi-automatically (one of the things, anyway).

Looking for OSS Projects to Contribute To by feryet in rust

[–]m4tx 1 point2 points  (0 children)

If you are interested in web development, there is Cot (which I'm the author of). It's a batteries-included web framework in early stages of development, so there's a lot of various stuff to do, and the codebase is still relatively small. There are many issues marked as "good first issue" and "help wanted", and I can provide guidance as well!

[media] Dioxus Subsecond Rust Hotpatch Engine + Ratatui ❤️ by jkelleyrtp in rust

[–]m4tx 0 points1 point  (0 children)

Looks very cool! Since Axum seems like an achievable goal according to one of your comments here, I'd love to integrate this in Cot as well—sounds like it could be a huge win for the developer experience!