martindevans opened issue #5404:
Feature
currently running
wasmtime settingsdisplays a human readable output. I propose adding a switch--machine_readablewhich changes the output to something more convenient to parse (e.g. JSON).Benefit
If wasmtime is being used by other processes (e.g. our usecase has the Unity editor invoking wasmtime to precompile wasm) a machine readable output would be much more convenient to work with.
Implementation
Add this:
/// Switch output format to machine readable #[clap(long)] machine_readable: bool,into the
SettingsCommandstruct. ModifySettingsCommand.executeto use a different display system if true.I'm willing to open a PR for this, if it's a feature that would be accepted.
alexcrichton commented on issue #5404:
Seems reasonable to me to add! I might recommend a
--jsonargument to explicitly specify the format but otherwise the idea seems fine to add through a PR.
martindevans commented on issue #5404:
Thanks. I'll try to submit a PR for a
--jsonflag this weekend :+1:
martindevans commented on issue #5404:
Is
serdeavailable to use within this crate, or can it be added? I'm not sure what the process is for managing dependencies in wasmtime.If that's not feasible I can just emit the JSON by hand, it's not a very complicated dataset!
alexcrichton commented on issue #5404:
Yep we've got a lot of usage of serde already, so it can be added.
Last updated: Dec 06 2025 at 06:05 UTC