Stream: general

Topic: Gaining familiarity with writing components


view this post on Zulip Aatash P (Apr 23 2024 at 23:42):

Hey everyone!

I am trying to experiment a bit with the component model, and am pretty new to it. Right now I am trying to just make an adder- I was trying to write low level as a wasm component directly rather than targeting an adder from a different language) to get familiar with making standalone components, but was having a bit of trouble understanding the documentation, especially pertaining to making/ writing a component from scratch (linked here: https://component-model.bytecodealliance.org). I did read through it to try and get a better handle on syntax, types, etc.

From the looks of it, it seems I need to make a command component in addition to my adder component, as the command component would contain the run export which a runtime (in my case I am using wasmtime) can actually use to run the whole system once fully composed. I was wondering if anyone might have a more step-by-step guide, example, or other literature I might be able to read, in addition to what is on the component model website, so I can better understand how I can make this component, and perhaps the process overall. Thanks!

view this post on Zulip Frank Rehwinkel (Apr 24 2024 at 02:37):

I found the following useful. https://github.com/bytecodealliance/component-docs/tree/main/component-model/examples

Documentation around creating and using WebAssembly Components - bytecodealliance/component-docs

view this post on Zulip Lann Martin (Apr 24 2024 at 12:58):

You might also be interested in wepl which can invoke component exports directly among other useful exploratory features

A repl for WebAssembly Components. Contribute to rylev/wepl development by creating an account on GitHub.

Last updated: Nov 22 2024 at 17:03 UTC