remko / waforth

Small but complete dynamic Forth Interpreter/Compiler for and in WebAssembly
https://mko.re/waforth
MIT License
497 stars 27 forks source link

Support calling JavaScript from Forth #13

Closed yunfan closed 2 years ago

yunfan commented 6 years ago

i think if waforth could interacting with js, that would be much more fun

remko commented 6 years ago

Do you mean an example in the documentation on how to call Forth from JS?

yunfan commented 6 years ago

sorry i mean the reverse forward, calling js from forth, like use js to invoke canvas api to draw a circle on the host enviroment

remko commented 5 years ago

You're right, that would be nice! And probably not that hard, just need to find some time to spend on it.

Zireael07 commented 4 years ago

Any news?

remko commented 2 years ago

@Zireael07 I have some concrete plans for it now, and it's high on my list.

remko commented 2 years ago

I did an initial attempt at an API to call JS from Forth. You can see a working example here. More interesting examples will probably come later.

yunfan commented 2 years ago

Thanks for finally completed this. i had checked this from the turtle news at reddit