bytecodealliance / component-docs

Documentation around creating and using WebAssembly Components
https://component-model.bytecodealliance.org/
Other
53 stars 37 forks source link

Move "implementing a resource host" out of components book #144

Open itowlson opened 3 weeks ago

itowlson commented 3 weeks ago

As part of #140 I captured some information about implementing a host that exported resources to a guest. This isn't really the right venue for that, because this book is about writing and using components, not about implementing Wasmtime hosts, but I didn't want to lose the info. See thread at https://github.com/bytecodealliance/component-docs/pull/140#discussion_r1625631856.

When we can locate a better place for it, we should move it to that place. It's not quite clear if the Wasmtime book is suitable but that's probably the first port of call.

The affected section is "Implementing and exporting a resource implementation in a host" in src/language-support/rust.md.

kate-goldenring commented 3 weeks ago

Could the scope of the book be expanded to be about writing and using guest and host components? I don't fully see why host components cannot be in scope for the book.

rylev commented 3 weeks ago

I think the issue is that this requires picking favorites when it comes to a component compatible runtime. Implementing component support in a host is tied very closely with the runtime used, and so the information presented isn't really general knowledge about components but rather a tutorial on how to use that runtime.

That's why I think it's fine to mention it in this book, but we should link to runtime specific tutorials elsewhere.