Right now when bindgen generates Rust structs, it assumes that all Roc field names are valid Rust struct field names. This will change when we have tuples, as they can have field names like 1, 2, etc.
We can theoretically prefix these on the Rust side with a letter, e.g. 1 becomes f1, but if we do that, we need to be careful of collisions; it's possible (although extremely unlikely in practice) in Roc to have a record with both a field named 1 and also a field named f1.
Right now when bindgen generates Rust structs, it assumes that all Roc field names are valid Rust struct field names. This will change when we have tuples, as they can have field names like
1
,2
, etc.We can theoretically prefix these on the Rust side with a letter, e.g.
1
becomesf1
, but if we do that, we need to be careful of collisions; it's possible (although extremely unlikely in practice) in Roc to have a record with both a field named1
and also a field namedf1
.