WebAssembly / binaryen

Optimizer and compiler/toolchain library for WebAssembly
Apache License 2.0
7.51k stars 745 forks source link

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

Open mamiao opened 1 year ago

mamiao commented 1 year ago

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

tlively commented 1 year ago

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.

mamiao commented 1 year ago

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

tlively commented 1 year ago

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.