binaryen icon indicating copy to clipboard operation
binaryen copied to clipboard

SIMD types and instructions aren't documented in the JS API

Open dead-claudia opened this issue 2 years ago • 4 comments

I'm reading https://github.com/WebAssembly/binaryen/wiki/binaryen.js-API and I noticed literally none of the SIMD types available (available in the latest version on npm) are documented. Could this be resolved so I'm not just making educated guesses based on the existing types and the instructions themselves?

I obviously couldn't do it myself - if I did, I likely wouldn't be filing this issue.

dead-claudia avatar Apr 13 '22 14:04 dead-claudia

Also impacted by https://github.com/WebAssembly/binaryen/issues/2677

dead-claudia avatar Apr 13 '22 14:04 dead-claudia

Yeah, now that the SIMD proposal is finished, it would be good to document this. For now, you can look at src/js/binaryen.js-post.js to see what is available.

FWIW (and this is no replacement for docs), the only SIMD type is v128 and all the instruction names in the API should be the same as the names in the standard text format.

tlively avatar Apr 14 '22 01:04 tlively

@tlively

FWIW (and this is no replacement for docs), the only SIMD type is v128 and all the instruction names in the API should be the same as the names in the standard text format.

I'm aware - hence the guesswork. I also found https://github.com/AssemblyScript/binaryen.js/ which seems to have, while still wildly far from perfect, better and more up to date documentation, so it might just be better to link to that instead. (I couldn't find any easy links there and just lucked into it through npm.)

dead-claudia avatar Apr 14 '22 13:04 dead-claudia

Good point, looks like we have links to the AssemblyScript/binaryen.js site on our README but just for downloading the builds, not the docs. I think a docs link would make sense too? Maybe from our docs page? cc @dcodeIO

kripken avatar Apr 15 '22 14:04 kripken