component-docs icon indicating copy to clipboard operation
component-docs copied to clipboard

Suggestion: Add a section describing how to use wasmtime Rust SDK to consume components.

Open Mossaka opened this issue 2 years ago • 1 comments

Currently the docs has a section for wasmtime and it only describes how to run a command component using wasmtime run. Another helpful section could be added to describe how to use wasmtime SDKs to run components programmatically. A good starting point would be the wasmtime rust SDK with component-model feature on.

Mossaka avatar Nov 16 '23 03:11 Mossaka

This would be super handy. @Mossaka @kate-goldenring do you think such an example should re-use the calculator from the tutorial?

Couple of weeks ago I built an sample that demonstrates how one could build an agnostic plugin-mechanism using the component model.

Basically, it is a super simple contract with guest implementations in Rust and JS (in my sample). The host application is a simple Rust CLI app, which iterates over .wasm files in a plugin directory and invokes the exported function.

WDYT?

ThorstenHans avatar Dec 15 '23 12:12 ThorstenHans

Hey @Mossaka it seems like in the current version of the component-model docs, this issue is pretty much solved :tada: thanks to all the maintainers that have been putting in work over what is now (almost) a year!

Is there anything else you wanted concretely built into the docs from this issue?

vados-cosmonic avatar Oct 31 '24 09:10 vados-cosmonic

The plugin and wac usage are pretty awesome, but I still hope to see an example of using wasmtime SDK to build a custom host that runs a component.

Mossaka avatar Oct 31 '24 21:10 Mossaka

I wrote a bit on Wasmtime host implementation which is in the Rust pages for now, but some people felt that, in the long term, content like that should move to the Wasmtime book.

(I don't have strong feelings one way or the other.)

itowlson avatar Oct 31 '24 21:10 itowlson

content like that should move to the Wasmtime book

That makes more sense, actually! Happy to close this issue now

Mossaka avatar Oct 31 '24 21:10 Mossaka