Hello, I am trying to create a "JSON-like" general value for settings, and I want to include a list of settings as an option, like this:
variant param-value {
toggle(bool),
integer(s64),
float(float64),
text(string),
array(list<param-value>),
}
This, however, throws an error: type
param-value depends on itself
. On one hand, it makes sense (can't have a recursive record), but on the other hand, the "recursion" is inside a list
, and list will always use indirection, so this shouldn't be an issue.
I am using wit bindgen 0.15.0
, so let me know if this is fixed in an updated version.
The component model does not yet support recursive value types: https://github.com/WebAssembly/component-model/issues/56
Thanks. I ended up JSON-encoding the settings and sending a string
across the wit boundary.
Karel Hrkal (kajacx) has marked this topic as resolved.
Last updated: Nov 22 2024 at 16:03 UTC