alexcrichton opened PR #10144 from alexcrichton:doc-conditional-compilation
to bytecodealliance:main
:
I've been doing a fair amount of work recently that's touched on
#[cfg]
in many ways throughout Wasmtime. I've personally got opinions about how to structure everything as well, and these opinions are not always obvious to others or discerned from just reading snippets. To assist with this I figured it would be nice to have a style guideline for Wasmtime's conditionally compiled code explaining at least at a high level what's going on and some rough basic principles.I've attempted to give this a stab and have added a page to the contributing documentation about the style guidelines for conditional compilation. I'm sure I've forgotten something here but my hope is that we can evolve this over time.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested cfallin for a review on PR #10144.
alexcrichton requested wasmtime-default-reviewers for a review on PR #10144.
cfallin submitted PR review:
Thanks for writing this up!
cfallin created PR review comment:
s/repetetive/repetitive/
alexcrichton updated PR #10144.
alexcrichton has enabled auto merge for PR #10144.
alexcrichton updated PR #10144.
alexcrichton has enabled auto merge for PR #10144.
alexcrichton merged PR #10144.
Last updated: Feb 28 2025 at 01:30 UTC