Stream: general

Topic: Setting local variable limit


view this post on Zulip CryZe (Feb 05 2021 at 17:03):

2: Invalid input WebAssembly code at offset 6284134: locals exceed maximum

It seems like my WASM files currently get rejected because there are too many locals being used. Is there a way I can configure wasmtime to use a larger limit?

view this post on Zulip Alex Crichton (Feb 05 2021 at 17:13):

Ah unfortunately we don't have a way to tune those limits at the moment, but it wouldn't be too too hard to add

view this post on Zulip Alex Crichton (Feb 05 2021 at 17:13):

right now there's a bunch of hardcoded constants in wasmparser/src/limits.rs

view this post on Zulip Alex Crichton (Feb 05 2021 at 17:14):

but we could relatively easily turn those into a struct which configures the Validator which we then plumb all the way up to a wasmtime::Config

view this post on Zulip CryZe (Feb 05 2021 at 17:14):

I guess I'll look into writing that PR then. Thanks :D


Last updated: Nov 22 2024 at 16:03 UTC