Zel-duh
Zel-duh2d ago

Wasm In Fresh

What are some great resources to get started with using WASM in Fresh?
13 Replies
Sun「無用」
Sun「無用」22h ago
Can't you put the .wasm file on the /static folder then load it on the frontend (better to be in an island) Or do mean to bundle fresh into wasm?
Zel-duh
Zel-duhOP22h ago
I was wondering if anyone had any examples of it working or resources for how to implement a .wasm file server side
Sun「無用」
Sun「無用」21h ago
wdym "implement a wasm file" you don't write wasm directly
Zel-duh
Zel-duhOP18h ago
Hopeful to use Deno' first-class support of .wasm modules 🙂 .wat --> .wasm of course
Sun「無用」
Sun「無用」18h ago
use the wat2wasm from the wasm toolkit https://github.com/WebAssembly/wabt
Zel-duh
Zel-duhOP18h ago
Yes, I have that 🙂
Sun「無用」
Sun「無用」18h ago
what's the complication then?
Zel-duh
Zel-duhOP18h ago
I had some complications with the Memory object, but I'm hopeful maybe there are some resources or example repos of it being done 🙂
Sun「無用」
Sun「無用」18h ago
You can either follow the deno integration or the node one (deno should be amble to import it) don't ask to ask, just ask.
Zel-duh
Zel-duhOP18h ago
Also couldn't get the first-class imports working, and wondering if it's not yet ready for Fresh
Sun「無用」
Sun「無用」18h ago
what's the memory problem you have?
Zel-duh
Zel-duhOP18h ago
It was a LinkError but I've put it aside for now, when I get back to it I'll come back here with a log 🙂
Sun「無用」
Sun「無用」18h ago
it's a deno feature, so if it didn't work properly and you found a bug, just make an issue on their gh LinkError mostly means some file wasn't found (aka it couldn't link it) are you trying to import something from js (or typescript, same thing) if yes, I'll probably need some kind of info of how you're structuring your project