This PR provides implementation of code generation from wgrib2's parameter code table files.
This PR adds "grib-codegen" crate which provides an attribute macro parameter_codes.
Using this macro, users can create enums with variants of parameter abbreviation codes from table files.
An associated function for remapping is also generated to address an issue that sometimes the same abbreviation code is assigned to multiple parameters.
There are still some issues with this macro that will be addressed in subsequent PRs.
Note that the generated code uses std::cell::LazyCell, which was stabilized in Rust 1.80.0 released 2 months ago on July 25, 2024.
This PR provides implementation of code generation from wgrib2's parameter code table files.
This PR adds "grib-codegen" crate which provides an attribute macro
parameter_codes
. Using this macro, users can create enums with variants of parameter abbreviation codes from table files.An associated function for remapping is also generated to address an issue that sometimes the same abbreviation code is assigned to multiple parameters.
There are still some issues with this macro that will be addressed in subsequent PRs.
Note that the generated code uses
std::cell::LazyCell
, which was stabilized in Rust 1.80.0 released 2 months ago on July 25, 2024.