Stream: git-wasmtime

Topic: wasmtime / PR #8917 Add custom-pages-sizes to CLI flags


view this post on Zulip Wasmtime GitHub notifications bot (Jul 08 2024 at 19:15):

alexcrichton requested wasmtime-core-reviewers for a review on PR #8917.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 08 2024 at 19:15):

alexcrichton requested fitzgen for a review on PR #8917.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 08 2024 at 19:15):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 08 2024 at 19:30):

fitzgen submitted PR review:

We should maybe eventually have a for_each_config_option macro to define both the CLI flags and the Config methods or something...

view this post on Zulip Wasmtime GitHub notifications bot (Jul 08 2024 at 19:33):

alexcrichton commented on PR #8917:

Agreed yeah, that'd kind fall under https://github.com/bytecodealliance/wasmtime/issues/8784 I think

view this post on Zulip Wasmtime GitHub notifications bot (Jul 08 2024 at 21:02):

fitzgen commented on PR #8917:

Ah yes, I forgot about that issue. 100%.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 08 2024 at 21:14):

fitzgen merged PR #8917.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2024 at 14:21):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 19 2024 at 16:50):

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 those Config 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