Some wasm web assembly links and tools

Parse wasm assembly language in a C parser made with packcc generator

https://myogdf.blogspot.com/2021/04/wasm-assembly-language-parser-in-c-for.html

or

https://notabug.org/mooigraph/basic/src/master/packcc-wast

https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format

https://webassembly.github.io/spec/core/exec/index.html

Memory management and wasm has some difficult issues
https://github.com/WebAssembly/design/issues/1397

The cwerg compiler backend has a parser for wasm binary written in python at https://github.com/robertmuth/Cwerg

The GNU GCC and it tools for wasm are at https://github.com/pipcet/wasm

List of wasm tools https://github.com/mbasso/awesome-wasm

List of wasm tools https://github.com/vshymanskyy/awesome-wasm-tools



A toolset for working with wasm https://github.com/xtuc/webassemblyjs#readme

cheerp compiler for c to wasm https://github.com/leaningtech/cheerp-meta/wiki/Getting-started#install

langueges supporting wasm https://github.com/appcypher/awesome-wasm-langs

minimal language compiling to wasm using wabt https://github.com/hatashiro/kou

also small language https://github.com/hatashiro/kou

zig language can be interesting https://ziglang.org/documentation/master/#Zig-Build-System

Using llvm and wasm32 https://gist.github.com/yurydelendik/4eeff8248aeb14ce763e

minimal example https://github.com/yurydelendik/wasmception

http://rigaux.org/language-study/syntax-across-languages/

$INSTALLDIR/bin/clang -emit-llvm --target=wasm32 -Oz fib.c -c -o fib.bc
$INSTALLDIR/bin/llc -asm-verbose=false -o fib.s fib.bc

See output at fib.s.

Convert to WebAssebly s-expressions (needs binaryen s2wasm tool):

$BINARYENDIR/bin/s2wasm fib.s > fib.wast

See output at fib.wast.

bin/clang --target=wasm32-unknown-unknown-wasm fib.c -c -o fib.wasm produces valid wasm.

Added lld compilation. Compiled by bin/clang --target=wasm32-unknown-unknown-wasm fib.c -c -o fib.wasm file can be linked with bin/lld -flavor wasm fib.wasm -o fib.final.wasm -e fib

the small recc c-compiler can generate outout to run in emulator
written in javascript executing the c program as a kindof wasm, see
https://github.com/RobertElderSoftware/recc

for wasm programming these public domain c lib routines may be usable
https://sourceforge.net/projects/pdos/files/pdpclib/