simvux opened PR #10912 from simvux:main to bytecodealliance:main:
#cranelift > Cranelift Examples Repository
cranelift-examples is an attempt at documenting the various (often higher-level) questions people tend to have when learning to use Cranelift as a compiler backend. The goal is to have examples that address very specific topics in a predictable format with lots of comments that not only explain what the Cranelift code does, but also explains the topic more broadly.
simvux requested abrown for a review on PR #10912.
simvux requested wasmtime-compiler-reviewers for a review on PR #10912.
cfallin submitted PR review:
Thanks for the PR and for putting together these examples! A suggested change to wording below but otherwise I'm happy to see this merged in.
cfallin created PR review comment:
Let's make this a little more explicit about the third-party maintenance -- perhaps something like "For various examples of how to use Cranelift to accomplish common compiler tasks, in addition to the above, @simvux maintains a [Cranelift Examples] repository." ?
simvux submitted PR review.
simvux created PR review comment:
Good point!
Although not sure about the wording. "in addition to above" could also imply that I maintain the JIT demo.
simvux edited PR review comment.
cfallin submitted PR review.
cfallin created PR review comment:
ah, sure, I had just meant to indicate that it's another set of examples, but no need for that phrase I suppose
cfallin edited PR review comment.
simvux submitted PR review.
simvux created PR review comment:
How about just
For various examples of how to use Cranelift to accomplish common compiler
tasks, see the [Cranelift Examples] repository maintained by @simvux.
cfallin submitted PR review.
cfallin created PR review comment:
Sounds good!
simvux updated PR #10912.
cfallin submitted PR review:
:+1:
cfallin has enabled auto merge for PR #10912.
pchickey commented on PR #10912:
Thanks @simvux for helping show more folks how to use cranelift. If your project grows to have more contributors and you'd like to contribute these examples to the bytecode alliance in, you could consider making a proposal in bytecodealliance/governance (like this one) to shift the project over here and make it more official. The most important bar to reach there, in my opinion, is the requirement for a
Sustainable Contributor Base, see that section of the proposal. You may also want to connect with the sig-docs folks on the Bytecode Alliance zulip.
cfallin merged PR #10912.
pchickey edited a comment on PR #10912:
Thanks @simvux for helping show more folks how to use cranelift. If your project grows to have more contributors and you'd like to contribute these examples to the bytecode alliance, you could consider making a proposal in bytecodealliance/governance (like this one) to shift the project over here and make it more official. The most important bar to reach there, in my opinion, is the requirement for a
Sustainable Contributor Base, see that section of the proposal. You may also want to connect with the sig-docs folks on the Bytecode Alliance zulip.
Last updated: Dec 06 2025 at 07:03 UTC