Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

The first example, "Instance" isn't complete? #120

Open
colemickens opened this issue May 22, 2021 · 0 comments
Open

The first example, "Instance" isn't complete? #120

colemickens opened this issue May 22, 2021 · 0 comments

Comments

@colemickens
Copy link

Sorry I'm a brand new beginner to WASM so maybe I'm missing something, but the ... main first example of Wasmer seems to be incomplete?

It jumps from "creating an instance" to "running the example" and doesn't seem to actually show the code for invoking add_one?

The code seems to be there, as I'd expect, it's just not documented: https://github.com/wasmerio/wasmer/blob/master/examples/instance.rs

Upon reconsideration, it looks like maybe this is intentional:

I'm not sure this is a good idea. I get the intent to split out "instantiate", "call guest func", etc, but it's very odd that the very first example walks through basically every step except the actual core function call. Enough that I stopped to go look for the source code to see if I was missing something. This confusion was further backed up by the "call guest function" example not returning to the simple instance example to demonstrate the call, but instead introducing an entire new example.

Obviously this is subjective, so feel free to disregard/close/whatever, but hopefully the outside newbie perspective was worth sharing! Cheers, looking forward to learning more, thanks for your work on this.

gitbook-com bot pushed a commit that referenced this issue Nov 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant