Skip to content

feat: Rust - #723

Merged
gabe-l-hart merged 15 commits into
mainfrom
Rust
Aug 5, 2026
Merged

feat: Rust#723
gabe-l-hart merged 15 commits into
mainfrom
Rust

Conversation

@gabe-l-hart

Copy link
Copy Markdown
Member

Description

This PR adds a full rust implementation of alog. It most closely follows the c++ implementation, providing a fully macro-defined API that can be fully disabled with the cargo feature disable-logging.

Changes

  • Whole new src/rust implementation
  • Integration of rust into CI

Testing

This feature includes a robust set of unit tests as well as an example binary that allows for spot checking.

AI Usage

This was entirely written using Claude Code with significant architectural supervision.

Initial Prompt

This project implements a logging framework across a large number of programming languages, aiming to follow language conventions where possible. I want to extend this to rust! The core of the functionality should be very similar to the other languages. The most mature of the implementations are python and c++, so those are good references. Please plan out what a rust version would look like.

Steering Prompts

I'm looking over the fib.rs example to get a feel for what you've built. I see that some of the components, specifically the scoping components, are implemented without macro wrappers, so you end up with let _timer = alog::ScopedTimer::new(.... In c++, one of the core ideas was that everything could be disabled with the right #define definitions (-D ALOG_DISABLE_LOGGING). I also don't love forcing the user to create dummy unused variables (let _timer) but I'm not sure if this type of general-purpose "plop code here, including variable creation" macro actually exists in rust.

I also see that we have alog_channel which is the equivalent of ALOGthis in c++, however I don't see this extended to any of the other user-facing macros (alog_map, alog_fn, etc). I'd like to have this functionality supported across all user-facing macros.

Branch: Rust
AI-usage: full (Claude + Sonnet 5)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: full (Claude + Sonnet 5)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: full (Claude + Sonnet 5)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: full (Claude + Sonnet 5)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
This is still need for release workflow

Branch: Rust
AI-usage: full (Claude + Sonnet 5)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: full (Claude + Sonnet 5)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: full (Claude + Sonnet 5)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: full (Claude + Sonnet 5)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: full (Claude + Sonnet 5)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: full (Claude + Sonnet 5)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: full (Claude + Sonnet 5)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: none
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: none
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: none
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: Rust
AI-usage: none
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
@gabe-l-hart
gabe-l-hart merged commit 92fce21 into main Aug 5, 2026
19 checks passed
@gabe-l-hart
gabe-l-hart deleted the Rust branch August 5, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant