this post was submitted on 01 May 2025
37 points (97.4% liked)

Rust

6872 readers
10 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
 

Hi there Rustians! A few months ago I posted about my hobby project. Just wanted to give an update.

Axium is a template for an API backend.

In the last few months I have added:

  • HTTP-cookie authentication (got it to work with a javascript site),
  • Password resetting,
  • User registration,
  • Example routes for interacting with S3 storage
  • Lots of input validation,
  • Caching,
  • Mailing (for the password reset and user registration).

I think that it is almost ready to be used as a backend for my website. Almost everything is marked off my wishlist, just need a few helper to help me check the security of the authentication and registration functions.

GitHub: https://github.com/Riktastic/Axium

you are viewing a single comment's thread
view the rest of the comments
[–] BB_C@programming.dev 14 points 3 days ago (5 children)

Very quickly skimmed Cargo.toml and main.rs.

  • What's with the title-case name?
  • The name proximity to axum is also not cool.
  • You should mention that this is built on top of axum in the project description.
  • How did you end up using both lazy_static and once_cell, when OnceLock has been stable since 1.70 and axum's MSRV is 1.75?
  • Why did you copy-paste min-sized-rust flags?
  • You can actually print like this:
println!("{proto}://{ip}:{port}");

instead of

println!("{0}://{1}:{2}", proto, ip, port);

and the positional indices are redundant anyway.

  • Since you're depending on tracing, you should actually use tracing::error instead of eprintln!("❌ ...").

Okay. I will stop here.

[–] BitsandBytes@lemmy.world 7 points 3 days ago (4 children)

Hi there, thank you for your feedback!

Not sure what you mean with title case name. Nevertheless, I chose a name with proximity to actually show that this project is implementing Axum. It took a long time before I could find a name that was unique (I know it might seem silly to just add a letter).

The README.md and GitHub project description mention Axum.

Didn't know about OnceLock. Some modules were created weeks apart from each other. During this time I might have forgotten that I used a similar library.

Didn't know about the min-sized-rust project. Found these suggested by a few users on Reddit.

Oh cool, I do not print that often. Looks a lot cleaner.

Those eprints, uhm. Might sound silly. Haven't thought about implementing it using tracing. Might have been a bit lazy. It worked fine in the datbase module, copied it afterwards over to the Redis/S3/mail modules.

Thank you for your feedback!

I'm not a full time programmer. Feedback helps me to improve myself :)

[–] BitsandBytes@lemmy.world 1 points 3 days ago

Ps, I already have fixed a few things.

load more comments (3 replies)
load more comments (3 replies)