Skip to content
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

Merged
merged 11 commits into from
Sep 15, 2018
Merged

Make nphysics compatible with projects depending on wasm-bindgen #139

merged 11 commits into from
Sep 15, 2018

Conversation

janhohenheim
Copy link
Contributor

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 uses wasm-bindgen instead. This is a non-breaking change, as all dependencies on stdweb have been moved to the special standard feature.

@@ -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,
Copy link
Contributor Author

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,
Copy link
Contributor Author

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(
Copy link
Contributor Author

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.

janhohenheim added a commit to myelin-ai/myelin that referenced this pull request Sep 13, 2018
@sebcrozet
Copy link
Member

Thanks, I have not tried wasm-bindgen yet! I will test/merge this tomorrow morning.

@janhohenheim
Copy link
Contributor Author

janhohenheim commented Sep 14, 2018

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.

@sebcrozet sebcrozet merged commit 4deca95 into dimforge:master Sep 15, 2018
@sebcrozet
Copy link
Member

sebcrozet commented Sep 15, 2018

Everything seems good. Thanks!

janhohenheim added a commit to myelin-ai/myelin that referenced this pull request Sep 16, 2018
jeremystucki pushed a commit to myelin-ai/engine that referenced this pull request Feb 8, 2019
jeremystucki pushed a commit to myelin-ai/engine that referenced this pull request Feb 8, 2019
jeremystucki pushed a commit to myelin-ai/engine that referenced this pull request Feb 8, 2019
jeremystucki pushed a commit to myelin-ai/engine that referenced this pull request Feb 8, 2019
jeremystucki pushed a commit to myelin-ai/engine that referenced this pull request Feb 8, 2019
jeremystucki pushed a commit to myelin-ai/engine that referenced this pull request Feb 8, 2019
jeremystucki added a commit to myelin-ai/engine that referenced this pull request Feb 8, 2019
jeremystucki added a commit to myelin-ai/engine that referenced this pull request Feb 8, 2019
jeremystucki pushed a commit to myelin-ai/engine that referenced this pull request Feb 8, 2019
jeremystucki pushed a commit to myelin-ai/engine that referenced this pull request Feb 8, 2019
jeremystucki pushed a commit to myelin-ai/engine that referenced this pull request Feb 8, 2019
jeremystucki pushed a commit to myelin-ai/engine that referenced this pull request Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants