-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.