Closed
Description
In UNIC, we put auto-generated data tables into files we are calling Rust-Value (RSV), extensioned .rsv
, which can contain basically any Rust expression (with all Rust requirements, like UTF-8 encoding), to be used inside the code using include!(<path-to-rsv>)
.
Examples:
- RSV table: https://github.com/behnam/rust-unic/blob/10696e882f2ebf027a162cfef987ac1053e94418/unic/ucd/age/src/tables/age_values.rsv
- Usage: https://github.com/behnam/rust-unic/blob/10696e882f2ebf027a162cfef987ac1053e94418/unic/ucd/age/src/age.rs#L79
What I want to note here is that RSV is more easier to use inside Rust code, being able to just include!()
d. That's not exactly possible with RON, as the syntax is slightly different.
BUT, with a compile-time RON parser, it is possible to use RON in cases similar to UNIC's.
Just some thoughts, as we were considering to simplify data dumping process by using a serde-based solution, but couldn't find any existing tool.