We should properly document how to implement new instructions and api's and work with the bindings.
Currently, my workflow has been:
- Find the instruction in
src/binaryen-c.h
- Find the instruction in
src/js/binaryen.js-post.js (If it doesn't exist in both, we need downstream changes to binaryen)
- Copy an existing instruction with similar requirements (parameter and return types)
- Implement the
c bindings
- Implement the
js bindings
- Implement the
ml OCaml binding.
- Implement the
mli OCaml interface
- Add smoke tests in
test/test.ml
Good example reference (SIMD implementation): #222
Feel free to ask for help in the grain discord in the binaryen-ml channel.
We should properly document how to implement new instructions and api's and work with the bindings.
Currently, my workflow has been:
src/binaryen-c.hsrc/js/binaryen.js-post.js(If it doesn't exist in both, we need downstream changes to binaryen)cbindingsjsbindingsmlOCaml binding.mliOCaml interfacetest/test.mlGood example reference (SIMD implementation): #222
Feel free to ask for help in the grain discord in the
binaryen-mlchannel.