wasmtime-go icon indicating copy to clipboard operation
wasmtime-go copied to clipboard

SetWasmTailCall

Open bobappleyard opened this issue 1 year ago • 2 comments

There is a configuration function in the wasmtime C API, in config.h: void wasmtime_config_wasm_tail_call_set(bool). This enables the tail call proposal, allowing modules containing return_call and return_call_indirect instructions to be executed.

I note that for many of the other functions in that header file, a method on *Config is provided.

Is there a particular reason why this function was left out, or am I OK to add a method for this configuration function to the struct?

bobappleyard avatar Aug 10 '24 18:08 bobappleyard

One big reason is that it's already enabled by default :facepalm:

bobappleyard avatar Aug 11 '24 20:08 bobappleyard

No reason to leave this out, only that it wasn't there when the bindings were first written. I think it would still make sense to add this as a method, even if it's on-by-default, so embedders can explicitly enable/disable if needed. If you'd like a PR would work well here!

alexcrichton avatar Aug 12 '24 14:08 alexcrichton