this post was submitted on 16 Aug 2026
20 points (100.0% liked)

Rust

8239 readers
31 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 3 years ago
MODERATORS
 

scholium::mark annotation replaces all kinds of TODOs with Rust-native way, allowing developers to categorize them with better precision, write better reasoning and make them easy to extract, report and maintain in the long run. Thanks to Rust literal string boundaries, it's possible to write long multiline reasons, for example allowing to attach even code snippets if needed.

Annotation is made to be attached to an exact place and it provides only documentation value without altering an item attached in any way. This means if the annotation when be attached to a function, module, crate (or a statement), it documents this particular item and nothing else.

#[scholium::mark(
    info,
    implementation::extend,
    doc::possible_extensions,
    reason = "Extend functionality to use any type implementing `+` operation"
)]
fn add(a: u32, b: u32) -> u32 {
    a + b
}
top 4 comments
sorted by: hot top controversial new old
[–] BB_C@programming.dev 5 points 1 week ago (1 children)

At least use slop in the README so we can complain.

[–] blazebra@programming.dev 2 points 6 days ago (1 children)
[–] BB_C@programming.dev 3 points 6 days ago

It was a backhanded complement based on that fact, my friend.

[–] blazebra@programming.dev 2 points 1 week ago

use cargo-scholium to extract and format annotations