You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe this is out of scope for this project, but would it be possible to make the ron format parseable by the Rust compiler? This would resemble how JSON is a 100% valid subset of JavaScript.
This might have interesting applications for code generation, especially in build.rs.
The text was updated successfully, but these errors were encountered:
That's an interesting question for sure. I am hoping to slowly make ron more Rusty (e.g. #438), but there are some design decisions that differ.
Rust code always needs to be verbose in all types, whereas ron is designed to also be compact when all types are known (e.g. by optionally omitting struct names). Therefore, I don't think that every valid ron document will always be valid Rust, but that perhaps in the future there could be a combination of pretty serialisation flags which outputs a Rust-compatible subset of ron.
How to deal with ron's vectors, since [ 42 ] is an array, not a Vec?
How to deal with ron's maps, since maps like { "a": 42 } do not have language support in Rust?
I think that the most likely avenue could be some small translation layer that takes in a best-effort-Rusty ron string and makes some final tweaks to it.
Maybe this is out of scope for this project, but would it be possible to make the ron format parseable by the Rust compiler? This would resemble how JSON is a 100% valid subset of JavaScript.
This might have interesting applications for code generation, especially in
build.rs
.The text was updated successfully, but these errors were encountered: