Skip to content

Optimize for embedded targets (optional ostream, string_view unit symbols)#20

Merged
marciomoura merged 1 commit into
mainfrom
feature/embedded-io-optimization
Apr 25, 2026
Merged

Optimize for embedded targets (optional ostream, string_view unit symbols)#20
marciomoura merged 1 commit into
mainfrom
feature/embedded-io-optimization

Conversation

@marciomoura
Copy link
Copy Markdown
Owner

This PR refactors the library to better support no-os embedded targets:\n\n1. Makes std::ostream optional via MOJITO_NO_IOSTREAM macro.\n2. Replaced std::string with constexpr std::string_view for unit symbols (zero allocation).\n3. Added missing unit symbols (Area, Volume, Charge).\n4. Wrapped ostream-dependent code in preprocessor guards.\n\nVerified with ctest.

@marciomoura marciomoura merged commit 695cfa4 into main Apr 25, 2026
5 checks passed
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