-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Why does ResourceLimiter
not provide a limit for global variables and functions?
#6668
Comments
ResourceLimiter
not provide a limit for global variables?ResourceLimiter
not provide a limit for global variables and functions?
I don't think there's a main principle behind this per se, but I can attempt to retcon it a bit by saying that one difference between memories/tables vs funcs/globals is that the former have runtime lengths associated with them where the latter have a static size which doesn't change. Not to say functions/globals couldn't be limited, however. In Wasmtime at least the number of functions/globals factors into the size of a |
Thank you a lot for providing me with the rationals behind the design @alexcrichton ! Given that Wasmtime has a multitude of users compared to I guess this issue can be closed. If people actually need this they can open another issue with the request. |
Ok, sounds reasonable! |
As can be seen in the docs (https://docs.rs/wasmtime/10.0.1/wasmtime/trait.ResourceLimiter.html) the
ResourceLimiter
provides limits forInstance
,Memory
andTable
instance counts but not forGlobal
andFunc
.This question came up in wasmi-labs/wasmi#737 and we were wondering about the rationals behind this design.
Clarifications would be very welcome. :)
The text was updated successfully, but these errors were encountered: