unrust / uni-gl

Unrust native/wasm compatibility layer for openGL API
Apache License 2.0
16 stars 7 forks source link

Replace invocations of broken js_raw macro with slower but working js macro #6

Closed ryankaplan closed 5 years ago

ryankaplan commented 5 years ago

I believe this addresses issue: https://github.com/unrust/uni-gl/issues/5

The problem causing the issue above is that stdweb replaced their implementation of __js_raw_asm with one that can't be called outside of stdweb. This PR replaces invocations of __js_raw_asm with invocations of js instead which is slower but still works.

I'm sending out this PR because a working slow version seems better than a broken fast one, but there may well be better ways to solve this. I'm new to the project, so feel free to reject this if that is the case.

Also while I built and ran the basic.rs example, not all changed lines of code have been tested. A thorough review would be appreciated!

edwin0cheng commented 5 years ago

Look good for me. Thanks