Officeyutong opened issue #5788:
I'm trying to call an exported function with signature
func (seq: list<s64>) -> s64, but I find that I can't constructwasmtime::component::Val::List(wasmtime::component::values::List())sincewasmtime::component::values::Listis not public.Feature
Benefit
If accepted, We can invoke functions which contains a param with type list
Implementation
Just add a
pubprefixAlternatives
May be no alternatives available?
pchickey commented on issue #5788:
At the moment, you can construct a list
Valby way ofwasmtime::component::types::List::new_valhttps://docs.rs/wasmtime/latest/wasmtime/component/types/struct.List.html#method.new_val - does that meet your needs?I think it would be ok to make the
valuesmod public, just on the grounds that if theValenum is public, the types in all of its variants should be as well (https://docs.rs/wasmtime/latest/wasmtime/component/enum.Val.html), but I don't know if there is something about the design of using thetypesmodule to constructValvs the direct use of the enum that I am missing. @alexcrichton what do you think?
pchickey edited a comment on issue #5788:
At the moment, you can construct a list
Valby way ofwasmtime::component::types::List::new_valhttps://docs.rs/wasmtime/latest/wasmtime/component/types/struct.List.html#method.new_val - does that meet your needs?I think it would be ok to make the
valuesmod public, just on the grounds that if theValenum is public, the types in all of its variants should be as well (https://docs.rs/wasmtime/latest/wasmtime/component/enum.Val.html), but I don't know if there is something about the design of using thetypesmodule to constructValvs the direct use of the enum that I am missing. @alexcrichton what do you think?If we choose not to make those types public we should note the preferred way to construct those variants in the docs for
Val.
alexcrichton commented on issue #5788:
The original intention was to reexport everything necessary form the
valuesmodule into the top-levelcomponentmodule, so this may be a forgotten reexport?
pchickey commented on issue #5788:
Ok! I'll add the forgotten reexports :)
pchickey closed issue #5788:
I'm trying to call an exported function with signature
func (seq: list<s64>) -> s64, but I find that I can't constructwasmtime::component::Val::List(wasmtime::component::values::List())sincewasmtime::component::values::Listis not public.Feature
Benefit
If accepted, We can invoke functions which contains a param with type list
Implementation
Just add a
pubprefixAlternatives
May be no alternatives available?
Last updated: Dec 13 2025 at 19:03 UTC