Fix emscripten build + add emscripten build to the CI
This commit is contained in:
committed by
Sébastien Crozet
parent
37a90a5409
commit
fd778b607f
15
.github/workflows/rapier-ci-build.yml
vendored
15
.github/workflows/rapier-ci-build.yml
vendored
@@ -60,3 +60,18 @@ jobs:
|
|||||||
run: cd build/rapier2d && cargo build --verbose --features wasm-bindgen --target wasm32-unknown-unknown;
|
run: cd build/rapier2d && cargo build --verbose --features wasm-bindgen --target wasm32-unknown-unknown;
|
||||||
- name: build rapier3d
|
- name: build rapier3d
|
||||||
run: cd build/rapier3d && cargo build --verbose --features wasm-bindgen --target wasm32-unknown-unknown;
|
run: cd build/rapier3d && cargo build --verbose --features wasm-bindgen --target wasm32-unknown-unknown;
|
||||||
|
build-wasm-emscripten:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: -D warnings
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: rustup target add wasm32-unknown-emscripten
|
||||||
|
- name: build rapier2d
|
||||||
|
run: cd build/rapier2d && cargo build --verbose --target wasm32-unknown-emscripten;
|
||||||
|
- name: build rapier3d
|
||||||
|
run: cd build/rapier3d && cargo build --verbose --target wasm32-unknown-emscripten;
|
||||||
|
- name: build rapier2d --features simd-stable
|
||||||
|
run: cd build/rapier2d && cargo build --verbose --target wasm32-unknown-emscripten --features simd-stable;
|
||||||
|
- name: build rapier3d --features simd-stable
|
||||||
|
run: cd build/rapier3d && cargo build --verbose --target wasm32-unknown-emscripten --features simd-stable;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ pub(crate) struct VelocityConstraintTangentPart<N: SimdRealField> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<N: SimdRealField> VelocityConstraintTangentPart<N> {
|
impl<N: SimdRealField> VelocityConstraintTangentPart<N> {
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(any(not(target_arch = "wasm32"), feature = "simd-is-enabled"))]
|
||||||
fn zero() -> Self {
|
fn zero() -> Self {
|
||||||
Self {
|
Self {
|
||||||
gcross1: [na::zero(); DIM - 1],
|
gcross1: [na::zero(); DIM - 1],
|
||||||
@@ -130,7 +130,7 @@ pub(crate) struct VelocityConstraintNormalPart<N: SimdRealField> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<N: SimdRealField> VelocityConstraintNormalPart<N> {
|
impl<N: SimdRealField> VelocityConstraintNormalPart<N> {
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(any(not(target_arch = "wasm32"), feature = "simd-is-enabled"))]
|
||||||
fn zero() -> Self {
|
fn zero() -> Self {
|
||||||
Self {
|
Self {
|
||||||
gcross1: na::zero(),
|
gcross1: na::zero(),
|
||||||
@@ -193,7 +193,7 @@ pub(crate) struct VelocityConstraintElement<N: SimdRealField> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<N: SimdRealField> VelocityConstraintElement<N> {
|
impl<N: SimdRealField> VelocityConstraintElement<N> {
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(any(not(target_arch = "wasm32"), feature = "simd-is-enabled"))]
|
||||||
pub fn zero() -> Self {
|
pub fn zero() -> Self {
|
||||||
Self {
|
Self {
|
||||||
normal_part: VelocityConstraintNormalPart::zero(),
|
normal_part: VelocityConstraintNormalPart::zero(),
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ pub(crate) struct VelocityGroundConstraintTangentPart<N: SimdRealField> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<N: SimdRealField> VelocityGroundConstraintTangentPart<N> {
|
impl<N: SimdRealField> VelocityGroundConstraintTangentPart<N> {
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(any(not(target_arch = "wasm32"), feature = "simd-is-enabled"))]
|
||||||
fn zero() -> Self {
|
fn zero() -> Self {
|
||||||
Self {
|
Self {
|
||||||
gcross2: [na::zero(); DIM - 1],
|
gcross2: [na::zero(); DIM - 1],
|
||||||
@@ -104,7 +104,7 @@ pub(crate) struct VelocityGroundConstraintNormalPart<N: SimdRealField> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<N: SimdRealField> VelocityGroundConstraintNormalPart<N> {
|
impl<N: SimdRealField> VelocityGroundConstraintNormalPart<N> {
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(any(not(target_arch = "wasm32"), feature = "simd-is-enabled"))]
|
||||||
fn zero() -> Self {
|
fn zero() -> Self {
|
||||||
Self {
|
Self {
|
||||||
gcross2: na::zero(),
|
gcross2: na::zero(),
|
||||||
@@ -143,7 +143,7 @@ pub(crate) struct VelocityGroundConstraintElement<N: SimdRealField> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<N: SimdRealField> VelocityGroundConstraintElement<N> {
|
impl<N: SimdRealField> VelocityGroundConstraintElement<N> {
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(any(not(target_arch = "wasm32"), feature = "simd-is-enabled"))]
|
||||||
pub fn zero() -> Self {
|
pub fn zero() -> Self {
|
||||||
Self {
|
Self {
|
||||||
normal_part: VelocityGroundConstraintNormalPart::zero(),
|
normal_part: VelocityGroundConstraintNormalPart::zero(),
|
||||||
|
|||||||
Reference in New Issue
Block a user