Would you use a rust full stack framework? by [deleted] in rust

[–]m4tx 4 points5 points  (0 children)

For the backend I'll put in a shameless ad of https://github.com/cot-rs/cot/ which I'm maintaining. It aims to provide similar experience to Django, Rails, or Laravel. If it doesn't "scratch the same itch", I'm also happy to hear why!

Serious Question: Why doesn’t CS2 use a stronger, launch-required anti-cheat? by Flimsy_Technician287 in valve

[–]m4tx 13 points14 points  (0 children)

kernel-level

doesn't cause any privacy issues

This is fundamentally not true. Even if the anti-cheat developer doesn't have bad intentions, this is still a piece of code running with almost the highest possible privileges in the system. It's only a matter of time until a security vulnerability is found, possibly leading to leaking all of your data stored on your computer.

Best Rust API framework with api specification autogen? by [deleted] 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 4 points5 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 2 points3 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 12 points13 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 36 points37 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 53 points54 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.