-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Make nphysics compatible with projects depending on wasm-bindgen #139
Conversation
@@ -140,7 +148,7 @@ pub mod math { | |||
use algebra::{Force3, Inertia3, Velocity3}; | |||
use na::{ | |||
Dynamic, Isometry3, Matrix3, Matrix6, MatrixMN, MatrixSlice6xX, MatrixSliceMut6xX, Point3, | |||
Translation3, U3, U6, UnitQuaternion, Vector3, Vector6, | |||
Translation3, UnitQuaternion, Vector3, Vector6, U3, U6, |
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.
These changes are due to my automatic rustfmt
@@ -217,7 +225,7 @@ pub mod math { | |||
use algebra::{Force2, Inertia2, Velocity2}; | |||
use na::{ | |||
Dynamic, Isometry2, Matrix1, Matrix3, MatrixMN, MatrixSlice3xX, MatrixSliceMut3xX, Point2, | |||
Translation2, U1, U2, U3, UnitComplex, Vector1, Vector2, Vector3, | |||
Translation2, UnitComplex, Vector1, Vector2, Vector3, U1, U2, U3, |
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.
These changes are due to my automatic rustfmt
target_arch = "asmjs" | ||
) | ||
)] | ||
#[cfg(all( |
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 simplified this code a bit while I working on the file.
Thanks, I have not tried wasm-bindgen yet! I will test/merge this tomorrow morning. |
I can recommend it. Being able to use Rusts type system with all JS calls and the entire DOM API is really nice and became my favourite way to create UIs in Rust. |
Everything seems good. Thanks! |
At the moment, projects depending on wasm-bindgen cannot use nphysics due to a transcient dependency on stdweb.
This PR adds a new feature,
use-wasm-bindgen
, which useswasm-bindgen
instead. This is a non-breaking change, as all dependencies onstdweb
have been moved to the specialstandard
feature.