My first crate - SAC13, calendar reform proposal

⚓ Rust    📅 2025-08-18    👤 surdeus    👁️ 6      

surdeus

Hello everyone,

I recently published my first crate sac13. It's the reference implementation for a calendar reform proposal "SAC13" (long story; sac13.net).

I'd love to get some feedback, on my Rust code (you can find it on Codeberg here: SAC13/sac13.rs - Codeberg.org), the project setup, code comments/documentation and code organization.

Here are some questions I'm particularly interested in:

  • How far should I go to make "invalid state unrepresentable" (for example my NonZeroU8 uses)?
    • Or is that too much and just hurts usability?
    • Or should I go even further, for example for numbers with specific ranges (for example, unrelated to the project, a custom datatype to represent just the numbers 1-6 for a die)?
      • Examples in the code, would be the types created with the scalar! macro.
  • Are the macro usages in raw_date.rs okay or too much?
  • Is the test organization okay? Currently I try to keep most tests as close as possible to the code that's tested, but I saw some projects where tests are all in a completely separate module (at root level)

I want to thank everybody that takes a look in advance for their time and effort. Thank you. Depending on the kind of feedback you are welcome to directly open issues on Codeberg or just leave a comment here.

You are of course also welcome to critique the calendar proposal itself, the website, or my English (not my first language), even though my main intention is getting feedback on my Rust code.

1 post - 1 participant

Read full topic

🏷️ Rust_feed