tschneidereit opened PR #11569 from tschneidereit:cpp-docs to bytecodealliance:main:
This adds a chapter for C++ embedding. The chapter intro is rudimentary, but there are a bunch more examples now: I added C++ ports for everything that already had both a Rust and a C version available, matching the Rust version's behavior where applicable.
I also, in separate commits, added docs for some additional Rust and C examples, fixed small issues, and removed some outdated information from the README.
tschneidereit requested alexcrichton for a review on PR #11569.
tschneidereit requested wasmtime-core-reviewers for a review on PR #11569.
tschneidereit requested wasmtime-default-reviewers for a review on PR #11569.
tschneidereit updated PR #11569.
tschneidereit updated PR #11569.
fitzgen submitted PR review.
fitzgen created PR review comment:
Was this already unreachable? In general, deleting docs files is risky since it will create 404s for anything that previously linked to it.
fitzgen created PR review comment:
ditto
fitzgen created PR review comment:
This example shows how to serialize a compiled module to disk and later deserialize it to skip compilation on the critical path.or something?
fitzgen created PR review comment:
ditto
and also the "see also" bit should be a link probably
fitzgen created PR review comment:
This is going to break any existing links that people have to to these docs. Can we avoid the rename? A policy we could take:
examples-*-wasi.mdalways describes the latest wasi release, and we can addexamples-*-legacy-wasi.mdwith instructions for p1, and p2 when p3 comes out, etc.
fitzgen created PR review comment:
What is the motivation behind removing the cmake and conan stuff? I have no idea if it is worth listing those things, as I do very little C/C++ stuff, but it seems like something we should change with intention.
fitzgen created PR review comment:
All these
examples-*-threads.mdfiles should probably be calledexamples-*-threaded-embeddings.mdso that we can use the former for showing off Wasm threads (or even if we don't use exactly the former, the two won't be ambiguous with each other).
fitzgen created PR review comment:
Maybe put C above C++ since it is a bit more of a lingua franca?
alexcrichton updated PR #11569.
alexcrichton submitted PR review:
FWIW I pushed up a few small commits to help with some warnings/etc, mostly just enough to get CI passing
alexcrichton created PR review comment:
C++ stuff in theory shouldn't use exceptions? Would it be possible to remove these bits?
tschneidereit submitted PR review.
tschneidereit created PR review comment:
I like that as a policy, yes. Will change things accordingly
tschneidereit submitted PR review.
tschneidereit created PR review comment:
My hunch was that more people would want to use the C++ bindings, because they're much nicer than the C ones. But I don't feel strongly about this, and am entirely happy with moving this down.
tschneidereit updated PR #11569.
tschneidereit created PR review comment:
I explained this in a pretty well-hidden place: the commit message for the specific patch removing this: the Conan packages are heavily outdated, and I don't think we have a way to update them. Though maybe we should try to acquire such a way instead of just removing the links? Not sure how we'd go about that, nor whether it's worth the effort to set up automation for this and such.
(Removing the
CMakelink was an accident, thanks for catching it!)
tschneidereit submitted PR review.
tschneidereit commented on PR #11569:
FWIW I pushed up a few small commits to help with some warnings/etc, mostly just enough to get CI passing
Thank you for that! I tried too hard to make the behavior exactly match the Rust example's, with no real need to do so.
tschneidereit updated PR #11569.
tschneidereit submitted PR review.
tschneidereit created PR review comment:
It was already unreachable, yes. Given that it was also empty except for
# C, removing it seems prudent :)
tschneidereit submitted PR review.
tschneidereit created PR review comment:
Thinking about this more, I'm a bit less sure. We could also use mdbook's redirect support to avoid breaking links.
Alternatives could be to either have WASI have sub-chapters for p{1,2,3,N}, or organize them into sections on a single page: I think it'll be quite a while (until well after WASI 1.0) that people will stop wanting to have embeddings for some of these versions.
tschneidereit updated PR #11569.
alexcrichton submitted PR review.
alexcrichton merged PR #11569.
redradist commented on PR #11569:
@tschneidereit Why mention of C and C++ Conan packages was removed ?
redradist edited a comment on PR #11569:
@tschneidereit @alexcrichton Why mention of C and C++ Conan packages was removed ?
alexcrichton commented on PR #11569:
There was some discussion of that here, but it looks like they're outdated?
tschneidereit commented on PR #11569:
@redradist indeed, the packages are heavily outdated. My apologies for not pinging you about this and instead just removing them. I had meant to reach out and then unfortunately forgot :(
I think for us to have these links in our official documentation, we'd want to be able to ensure that they're always up-to-date. That probably would mean we'd have automation for pushing new versions from our CI setup. If that's something you'd be interested in helping with, that'd be fantastic!
Last updated: Dec 06 2025 at 07:03 UTC