Skip to content

feat: Add Rust-based generator for C++ unit-wrapper headers from unit…#2

Merged
VPRamon merged 3 commits intomainfrom
rust-script
Feb 23, 2026
Merged

feat: Add Rust-based generator for C++ unit-wrapper headers from unit…#2
VPRamon merged 3 commits intomainfrom
rust-script

Conversation

@VPRamon
Copy link
Member

@VPRamon VPRamon commented Feb 23, 2026

This pull request updates the build process for generating C++ unit-wrapper headers, switching from a Python script to a Rust-based generator, and makes several code cleanups in the header files. The most significant changes are the introduction of a new Rust crate for code generation, updates to CMake integration, and minor code style improvements in the C++ headers.

Build system and code generation updates:

  • The CMake build process now uses a Rust binary (gen_cpp_units) to generate C++ unit-wrapper headers from units.csv, replacing the previous Python-based approach. The Rust crate is defined in the new gen_cpp_units/Cargo.toml. [1] [2] [3] [4]

C++ header code cleanups:

  • In include/qtty/literals.hpp, several user-defined literal operator declarations are reformatted to single-line definitions for consistency and readability. [1] [2] [3]
  • The order of includes in include/qtty/literals.hpp is adjusted for logical grouping and completeness.
  • In include/qtty/units/length.hpp, the formatting of several UnitTraits specializations and type aliases is improved for consistency. [1] [2] [3]

@VPRamon VPRamon self-assigned this Feb 23, 2026
@VPRamon VPRamon merged commit 0dea35c into main Feb 23, 2026
3 checks passed
@VPRamon VPRamon deleted the rust-script branch February 23, 2026 17:38
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