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

Move "implementing a resource host" out of components book

Open itowlson opened this issue 1 year ago • 3 comments

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.

itowlson avatar Jun 11 '24 22:06 itowlson

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.

kate-goldenring avatar Jun 12 '24 19:06 kate-goldenring

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.

rylev avatar Jun 13 '24 09:06 rylev

To just to sum up the current state of things -- anyone who picks it up would likely have to:

  • Add a section to the wasmtime book for host components (I think this addition would be greatly welcomed, how to wire things together is a common question on Zulip)
  • Add a section to the component model book (this repo) that describes host components (with special care to note the contrast with guest components) and link to it.

vados-cosmonic avatar May 12 '25 15:05 vados-cosmonic