alexcrichton requested wasmtime-core-reviewers for a review on PR #8917.
alexcrichton requested fitzgen for a review on PR #8917.
alexcrichton opened PR #8917 from alexcrichton:custom-page-sizes-cli-flag
to bytecodealliance:main
:
Enables
-W custom-page-sizes
from the CLI to run this proposal.
fitzgen submitted PR review:
We should maybe eventually have a
for_each_config_option
macro to define both the CLI flags and theConfig
methods or something...
alexcrichton commented on PR #8917:
Agreed yeah, that'd kind fall under https://github.com/bytecodealliance/wasmtime/issues/8784 I think
fitzgen commented on PR #8917:
Ah yes, I forgot about that issue. 100%.
fitzgen merged PR #8917.
Mossaka commented on PR #8917:
We should maybe eventually have a for_each_config_option macro to define both the CLI flags and the Config methods or something...
I was looking at how the CLI flags and
Config
are defined and it seems like the grouping rules are very different between the two. For CLI, flags are grouped under struct names such as "Optimize", "Codegen", "Debug", etc, while in the Config, fields are grouped to different struct names, such as "Tunables". The lack of the 1-1 mapping makes it hard to define CLI flags from the Config sturct.Perhaps, adding a macro like
[cli(Optimize)]
or others to Config fields helps to generate these fields in their corresponding CLI structs?In addition, the methods in the Config are not a 1-1 map to the fields as well... It might be a headache to write the macro that generates the methods according fields.
fitzgen commented on PR #8917:
I think even something that defines the public API of
Config
and keeps that in sync with the CLI flags, but doesn't define the implementation of thoseConfig
methods, would be helpful. And that should be possible regardless if the implementation depends on tunables or wasm features or whatever.
Last updated: Dec 23 2024 at 12:05 UTC