Skip to content
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

Make TOML config keys kebab-case, and add docs #10132

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

ludfjig
Copy link
Contributor

@ludfjig ludfjig commented Jan 28, 2025

Updates the doc for flag introduced in #9811.

Feedback appreciated, happy to change things around. The reason I added some stuff on the --optimize, --debug things were to be able to reference those options in the TOML section.

@ludfjig ludfjig requested a review from a team as a code owner January 28, 2025 01:44
@ludfjig ludfjig requested review from alexcrichton and removed request for a team January 28, 2025 01:44
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

assuming the TOML file is called `config.toml`. Of course you can put as many
key-value pairs as you want in the TOML file.

> Note: When specifying names in TOML, you must replaces dashes with underscores. In the example above, `opt-level` becomes `opt_level`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this, could we actually use #[serde(rename_all = "...")] to blanket rename everything to kebab-case? That way it'd be the same on the CLI and in TOML?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea

@github-actions github-actions bot added the wasmtime:docs Issues related to Wasmtime's documentation label Jan 28, 2025
@ludfjig ludfjig requested a review from a team as a code owner January 28, 2025 04:46
@ludfjig ludfjig requested review from alexcrichton and removed request for a team January 28, 2025 04:46
@ludfjig ludfjig changed the title Update cli book docs for toml cli option Make TOML config keys kebab-case, and add docs Jan 28, 2025
@alexcrichton alexcrichton added this pull request to the merge queue Jan 28, 2025
Merged via the queue into bytecodealliance:main with commit 23fc0c1 Jan 28, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:docs Issues related to Wasmtime's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants