Hi, I'm attempting to use the "gc" feature in wasmtime, and I get the following error whenever I attempt to add a "struct" type into my module:
struct indexed types not supported without the gc feature (at offset 0x40)
I have the "gc" and "gc-drc" features enabled in Cargo.toml. My module is pretty minimal; if I remove the struct
type definition, the error does not happen.
(module $hello.saga
(type $String (;0;) (struct (field i32)))
(type $hello.type (;1;) (func (result i32)))
(export "hello" (func $hello))
(func $hello (;0;) (type $hello.type) (result i32)
i32.const 1
i32.const 2
i32.add
i32.const 3
i32.add
return
)
)
Any ideas what I might be doing wrong?
The cargo feature allows support for those to be compiled into wasmtime, but you also have to enable those features in the Config you create your Engine from.
Last updated: Dec 23 2024 at 12:05 UTC