Adding support to compile to WebAssembly#2
Conversation
|
Cool I didn't know web assembly was ready! Some comments:
I am glad you got the wasm working but overall I don't really like this change. If you can simplify it to just adding a new build target and adding wasm feature detection for the existing demo, then that would be okay with me! I made some quick changes in f63c56c to reflect some of the issues I mentioned above. If you're still interested in doing so you can rebase and try adding the wasm target again. Thanks! |
| return val(typed_memory_view(numElement, pointer->data.f64)); | ||
| // case CCV_64S: | ||
| // return val(typed_memory_view(numElement, pointer->data.i64)); | ||
| // case CCV_64F: |
There was a problem hiding this comment.
I don't think this case also needs to be commented out. There are no Uint64Array in js but there are Float64Array.
|
Btw I changed it so that it will look for a global CCV variable to call CCVLib with (checkout index.html). I haven't tried this but you should be able to add your wasmBinary there too before loading the script: |
|
hey got caught up elsewhere -- looks like you made the changes though? hopefully I'll get a chance to check it out this weekend 👍 |
I have made additions to your Makefile to compile to a .wasm file instead of .asm
Some other minor changes had to be made so that it will compile.