binaryen icon indicating copy to clipboard operation
binaryen copied to clipboard

Can I get some programming manual for binaryen C-API?

Open mamiao opened this issue 2 years ago • 3 comments

Can I get some programming manual for binaryen C-API? Thanks

mamiao avatar Oct 07 '23 09:10 mamiao

What kind of information would you be looking for in such a manual? What each function does individually is fairly well documented already in the header.

tlively avatar Oct 08 '23 06:10 tlively

hi for example, the type BinaryenTypeExternref, there is no instruction of that type in binary-c.cpp file. Also BinaryenTableGrow function I am a little bit confuse about when I need to use it, since there is no exmple for that.

Thanks

mamiao avatar Oct 08 '23 09:10 mamiao

BinaryenTypeExternref returns the Binaryen representation of the externref WebAssembly type. Similarly, BinaryenTableGrow returns the Binaryen representation of the table.grow WebAssembly instruction. Since Binaryen constructs map almost 1:1 to similarly named core WebAssembly constructs, I'm not sure how we can meaningfully make the documentation better without repeating a lot of the core spec.

tlively avatar Oct 08 '23 18:10 tlively