catamorphism opened PR #11848 from catamorphism:docs-plugins-example to bytecodealliance:main:
This PR extends the documentation by adding a walk-through, under the wasip2 section, of an application that embeds Wasmtime in order to use plugins.
catamorphism requested dicej for a review on PR #11848.
catamorphism requested wasmtime-core-reviewers for a review on PR #11848.
catamorphism requested wasmtime-default-reviewers for a review on PR #11848.
catamorphism commented on PR #11848:
In CI, the code for the application is built as part of the test_capi target and is only built under Linux. This is because it took me a while to get things right, wrt installing
wit-bindgenandjco, just for Linux; but if you think it's important to build the code on other platforms, I can try to do that.
catamorphism updated PR #11848.
alexcrichton submitted PR review:
Thanks for this! Running on just Linux I think is fine given the necessary steps in CI
alexcrichton created PR review comment:
This might be a stray file now that it's part of the main workspace?
alexcrichton created PR review comment:
Could this have
publish = falseas well? (might be required to get full CI passing anyway)
alexcrichton created PR review comment:
Could this link to the URL-to-be?
alexcrichton created PR review comment:
Idiomatically this can be replaced with
anyhow::bail!("plugins directory does not exist")
alexcrichton created PR review comment:
Since this is required you can drop the
Optionand clap will print a nice message if it's missing
alexcrichton created PR review comment:
For these two dependencies could the versions get replaced with
workspace = true?
alexcrichton created PR review comment:
s/wit-bindgen-cli/wit-bindgen-cli@0.46.0/ (to avoid future theoretical breakage)
alexcrichton created PR review comment:
With clap traits here, was the intention to embed this struct directly in the "app" down below?
alexcrichton created PR review comment:
Similar to wit-bindgen-cli, could this have a version specification to install the same version? (I'm not sure now
npm installworks myself)
alexcrichton requested alexcrichton for a review on PR #11848.
catamorphism submitted PR review.
catamorphism created PR review comment:
Not sure what you mean by "the 'app' down below"?
catamorphism updated PR #11848.
catamorphism submitted PR review.
catamorphism created PR review comment:
Removed in c491ecc
catamorphism submitted PR review.
catamorphism created PR review comment:
Added in c491ecc
catamorphism submitted PR review.
catamorphism created PR review comment:
Fixed in c491ecc
catamorphism submitted PR review.
catamorphism created PR review comment:
Fixed in c491ecc
catamorphism submitted PR review.
catamorphism created PR review comment:
Fixed in c491ecc
catamorphism submitted PR review.
catamorphism created PR review comment:
Fixed in c491ecc
catamorphism submitted PR review.
catamorphism created PR review comment:
Fixed in c491ecc
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Oh sorry, I mean
struct Argsbelow and how it duplicates the fields of thisBinaryOperationvs havingop: BinaryOperationinternally. Clap should be able to delegate parsers like that with#[command(flatten)]I believe, but otherwise if the current structure is intended then this#[derive]I think is otherwise unused?
catamorphism updated PR #11848.
catamorphism submitted PR review.
catamorphism created PR review comment:
Ah, got it. Yes, I was trying to do that but whatever I tried initially didn't work. I got it to work this time in e3b9a9e.
alexcrichton submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
I assume this was for testing to delete this, but mind re-adding it? (in the future putting
prtest:capiin a commit message should work)
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Oh, sorry, final comment -- mind adding this to the action yml which installs the sdk? Should be able to
echo WASI_SDK_PATH=... >> $GITHUB_ENV
catamorphism updated PR #11848.
catamorphism submitted PR review.
catamorphism created PR review comment:
Oops, yes. Fixed in 567fcf5
catamorphism submitted PR review.
catamorphism created PR review comment:
Changed in 567fcf5
alexcrichton has enabled auto merge for PR #11848.
catamorphism commented on PR #11848:
The "doc build" failure is odd because the calculator example doesn't build the plugins by default, and this build shouldn't pass in the feature flag that builds the plugins. I'm trying to repro locally.
alexcrichton commented on PR #11848:
Oh I think there's a need for another
--excludeon the CI config for thatcargo doccommand to exclude this new package. Or maybe alternative tag the targets withdoc = falsesocargo doc --workspaceskips it automatically... Either way's fine
catamorphism updated PR #11848.
catamorphism commented on PR #11848:
I guess it was getting built with all features enabled because of the
--check-cfgflag? Anyway, I added the--exclude.
alexcrichton merged PR #11848.
Last updated: Dec 06 2025 at 07:03 UTC