Skip to content

Conversation

@bhartnett
Copy link

@bhartnett bhartnett commented Dec 11, 2025

For the zkEVM support in Nimbus we need to be able to compile the stateless execution function to bare metal. Even when setting the chronicles_enabled compile time flag to false the library still imports and uses code that depends on the os such as std/os and std/times which cause the compilation to fail when targeting bare metal (--os:any). Ideally the code should compile without having to remove all the logging throughout the codebase.

The approach taken here is to disable the dynamic_scope and log_output on bare metal which are the modules that depend on the os libraries. I didn't use a when loggingEnabled for this part because that would be a breaking change on all other platforms.

I've also added when loggingEnabled to a few places to disable the code when the logging is disabled.

if topic.name == t:
if topic.logLevel != LogLevel.NONE:
if severity >= topic.logLevel:
when loggingEnabled:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff is hard to read here. This is just putting the rest of the code in this macro behind the when loggingEnabled conditional.

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