awaitlink/rvk

Convert `snake_case` to `mixedCase` at compile time instead of runtime

awaitlink opened this issue · 0 comments

The rvk_methods crate currently uses macros to "generate" functions for all methods. The issue is that in order to convert snake_case names into mixedCase names expected by the VK API, a static HashMap is initialized for each category at runtime.

This is not ideal, as it should be possible to generate everything at compile time by using proc macros and/or build.rs.

https://github.com/u32i64/rvk/blob/64aa7bac9e95f833f0c5ba30633cf2a29c22f14d/rvk_methods/src/lib.rs#L18-L60