Solution: Add an AssemblyScript guest example for Numax#76
Conversation
There was a problem hiding this comment.
Hi, thank you for taking a look at this , it's genuinely appreciated 🙏
A few things to address before this can be merged:
The file names are wrong.
The three files added are literally named h, n, and t, they need to live under a proper directory, something like examples/guest_assemblyscript/. You can look at examples/guest_c or examples/guest_cpp as reference for how a guest example is structured in this repo.
The build setup is missing.
The issue asks for an example that actually compiles to .wasm. Right now there's no package.json, no asconfig.json, and no asc invocation anywhere. The build instructions mention nx build but there's nothing to back that up. A working build.sh (and optionally build.bat) like the ones in the C/C++ examples would cover this.
One file contains bare git commands.
The file named h contains git add . && git commit -m "Added AssemblyScript example" , that looks like an accidental commit of shell history rather than a source file.
The guest code itself is a good start.
The run export, the nx imports, and the logging + key-value pattern are exactly what the issue is asking for that part is on the right track.
Once the structure is in place and the build path is working, this should be a clean merge. Feel free to ping if anything about the expected layout is unclear the C and C++ examples in examples/ are a good model to follow.
Solution
This PR addresses #50.