From f8aee1abdd8116ea143af9e5e08b6835a00de146 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 03:29:05 +0000 Subject: [PATCH 1/2] chore: lint --- crates/unavi-world-server/README.md | 2 +- wasm/example-unavi-layout/src/bindings.rs | 692 +++++++----------- wasm/example-unavi-shapes/src/bindings.rs | 629 ++++++---------- wasm/example-unavi-ui/src/bindings.rs | 704 +++++++----------- wasm/example-unavi-vscreen/src/bindings.rs | 677 ++++++----------- wasm/example-wired-input/src/bindings.rs | 629 ++++++---------- wasm/example-wired-physics/src/bindings.rs | 629 ++++++---------- wasm/example-wired-player/src/bindings.rs | 629 ++++++---------- wasm/example-wired-scene/src/bindings.rs | 629 ++++++---------- wasm/test-wired-dwn/src/bindings.rs | 295 ++++---- wasm/test-wired-physics/src/bindings.rs | 446 +++++------- wasm/test-wired-scene/src/bindings.rs | 446 +++++------- wasm/unavi-layout/src/bindings.rs | 521 ++++++------- wasm/unavi-shapes/src/bindings.rs | 803 +++++++++------------ wasm/unavi-system/src/bindings.rs | 539 ++++++-------- wasm/unavi-ui/src/bindings.rs | 690 +++++++----------- wasm/unavi-vscreen/src/bindings.rs | 591 ++++++--------- 17 files changed, 3573 insertions(+), 5978 deletions(-) diff --git a/crates/unavi-world-server/README.md b/crates/unavi-world-server/README.md index 3c01d1ef4..cad5697ce 100644 --- a/crates/unavi-world-server/README.md +++ b/crates/unavi-world-server/README.md @@ -2,6 +2,6 @@ -Server for running multiplayer worlds of worlds over WebTransport. +Server for running multiplayer worlds over WebTransport. diff --git a/wasm/example-unavi-layout/src/bindings.rs b/wasm/example-unavi-layout/src/bindings.rs index b3d45bde2..0e8dce8fb 100644 --- a/wasm/example-unavi-layout/src/bindings.rs +++ b/wasm/example-unavi-layout/src/bindings.rs @@ -6,7 +6,8 @@ pub mod unavi { pub mod container { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Node = super::super::super::wired::scene::node::Node; @@ -18,10 +19,7 @@ pub mod unavi { Start, } impl ::core::fmt::Debug for Alignment { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Alignment::Center => f.debug_tuple("Alignment::Center").finish(), Alignment::End => f.debug_tuple("Alignment::End").finish(), @@ -100,11 +98,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Container::from_handle(ret as u32) } } @@ -146,9 +140,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -169,9 +161,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -181,9 +171,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/container")] @@ -256,9 +244,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/container")] @@ -426,7 +412,8 @@ pub mod unavi { pub mod grid { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Container = super::super::super::unavi::layout::container::Container; pub type Vec3 = super::super::super::wired::math::types::Vec3; @@ -486,24 +473,10 @@ pub mod unavi { #[link(wasm_import_module = "unavi:layout/grid")] extern "C" { #[link_name = "[constructor]grid"] - fn wit_import( - _: f32, - _: f32, - _: f32, - _: f32, - _: f32, - _: f32, - ) -> i32; + fn wit_import(_: f32, _: f32, _: f32, _: f32, _: f32, _: f32) -> i32; } #[cfg(not(target_arch = "wasm32"))] - fn wit_import( - _: f32, - _: f32, - _: f32, - _: f32, - _: f32, - _: f32, - ) -> i32 { + fn wit_import(_: f32, _: f32, _: f32, _: f32, _: f32, _: f32) -> i32 { unreachable!() } let ret = wit_import( @@ -547,9 +520,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/grid")] @@ -590,9 +561,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/grid")] @@ -634,9 +603,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/grid")] @@ -696,7 +663,8 @@ pub mod unavi { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; @@ -893,10 +861,7 @@ pub mod unavi { pub subdivisions: u8, } impl ::core::fmt::Debug for SphereIco { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereIco") .field("subdivisions", &self.subdivisions) .finish() @@ -909,10 +874,7 @@ pub mod unavi { pub stacks: u8, } impl ::core::fmt::Debug for SphereUv { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereUv") .field("sectors", &self.sectors) .field("stacks", &self.stacks) @@ -927,17 +889,10 @@ pub mod unavi { Uv(SphereUv), } impl ::core::fmt::Debug for SphereKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - SphereKind::Ico(e) => { - f.debug_tuple("SphereKind::Ico").field(e).finish() - } - SphereKind::Uv(e) => { - f.debug_tuple("SphereKind::Uv").field(e).finish() - } + SphereKind::Ico(e) => f.debug_tuple("SphereKind::Ico").field(e).finish(), + SphereKind::Uv(e) => f.debug_tuple("SphereKind::Uv").field(e).finish(), } } } @@ -1019,10 +974,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -1044,9 +996,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1061,10 +1011,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -1072,10 +1019,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -1086,11 +1030,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -1110,9 +1050,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1132,9 +1070,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1154,9 +1090,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1270,9 +1204,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1292,9 +1224,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1314,9 +1244,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1324,10 +1252,8 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(half_size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = half_size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = + half_size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -1349,9 +1275,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1366,10 +1290,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -1377,10 +1298,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_half_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -1391,11 +1309,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -1453,9 +1367,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1475,9 +1387,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1497,9 +1407,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1732,9 +1640,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1754,9 +1660,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1776,9 +1680,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1801,11 +1703,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Cuboid::from_handle(ret as u32) } } @@ -1816,9 +1714,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1886,9 +1782,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1908,9 +1802,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1930,9 +1822,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -2017,9 +1907,7 @@ pub mod unavi { unsafe { #[repr(align(1))] struct RetArea([::core::mem::MaybeUninit; 3]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 3], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 3]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -2066,11 +1954,16 @@ pub mod unavi { unsafe { let (result2_0, result2_1, result2_2) = match value { SphereKind::Ico(e) => { - let SphereIco { subdivisions: subdivisions0 } = e; + let SphereIco { + subdivisions: subdivisions0, + } = e; (0i32, _rt::as_i32(subdivisions0), 0i32) } SphereKind::Uv(e) => { - let SphereUv { sectors: sectors1, stacks: stacks1 } = e; + let SphereUv { + sectors: sectors1, + stacks: stacks1, + } = e; (1i32, _rt::as_i32(sectors1), _rt::as_i32(stacks1)) } }; @@ -2084,12 +1977,7 @@ pub mod unavi { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result2_0, - result2_1, - result2_2, - ); + wit_import((self).handle() as i32, result2_0, result2_1, result2_2); } } } @@ -2109,9 +1997,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -2131,9 +2017,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -2153,9 +2037,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -2231,9 +2113,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -2248,7 +2128,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -2258,10 +2139,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -2289,10 +2167,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -2309,10 +2184,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -2336,10 +2208,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -2361,10 +2230,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -2377,17 +2243,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -2397,17 +2256,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -2422,10 +2274,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -2438,7 +2287,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -2505,9 +2355,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -3123,7 +2971,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -3133,10 +2982,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -3187,7 +3033,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -3195,10 +3042,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -3213,10 +3057,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -3233,10 +3074,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -3253,10 +3091,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -3309,7 +3144,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -3334,7 +3173,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -3366,9 +3210,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -3380,7 +3237,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -3427,10 +3285,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -3444,20 +3299,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -3506,17 +3352,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -3551,7 +3390,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -3633,9 +3475,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3693,9 +3533,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3755,7 +3593,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; pub struct Skeleton { @@ -3781,10 +3620,7 @@ pub mod wired { pub right_foot: Node, } impl ::core::fmt::Debug for Skeleton { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Skeleton") .field("hips", &self.hips) .field("spine", &self.spine) @@ -3861,9 +3697,7 @@ pub mod wired { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -3873,9 +3707,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 80]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 80], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 80]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:player/api")] @@ -3927,45 +3759,55 @@ pub mod wired { head: super::super::super::wired::scene::node::Node::from_handle( l6 as u32, ), - left_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l7 as u32, - ), - left_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l8 as u32, - ), - left_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l9 as u32, - ), + left_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l7 as u32, + ), + left_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l8 as u32, + ), + left_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l9 as u32, + ), left_hand: super::super::super::wired::scene::node::Node::from_handle( l10 as u32, ), - right_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l11 as u32, - ), - right_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l12 as u32, - ), - right_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l13 as u32, - ), + right_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l11 as u32, + ), + right_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l12 as u32, + ), + right_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l13 as u32, + ), right_hand: super::super::super::wired::scene::node::Node::from_handle( l14 as u32, ), - left_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l15 as u32, - ), - left_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l16 as u32, - ), + left_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l15 as u32, + ), + left_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l16 as u32, + ), left_foot: super::super::super::wired::scene::node::Node::from_handle( l17 as u32, ), - right_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l18 as u32, - ), - right_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l19 as u32, - ), + right_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l18 as u32, + ), + right_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l19 as u32, + ), right_foot: super::super::super::wired::scene::node::Node::from_handle( l20 as u32, ), @@ -4033,7 +3875,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -4044,10 +3887,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -4157,9 +3997,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -4207,9 +4045,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -4239,7 +4075,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -4265,7 +4106,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -4367,9 +4209,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -4569,9 +4409,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -4619,9 +4457,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -4685,10 +4521,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -4697,7 +4530,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -4805,9 +4639,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4855,9 +4687,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4891,9 +4721,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4966,9 +4794,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5018,9 +4844,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5145,9 +4969,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5205,9 +5027,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5265,9 +5085,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5325,9 +5143,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5384,7 +5200,8 @@ pub mod wired { pub mod scene { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; #[derive(Debug)] @@ -5468,9 +5285,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -5518,9 +5333,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -5594,7 +5407,8 @@ pub mod wired { pub mod document { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Scene = super::super::super::wired::scene::scene::Scene; /// A save-able collection of resources with an active scene. @@ -5661,9 +5475,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5723,9 +5535,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5783,9 +5593,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5859,7 +5667,8 @@ pub mod wired { pub mod composition { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Document = super::super::super::wired::scene::document::Document; pub type Transform = super::super::super::wired::math::types::Transform; @@ -5944,17 +5753,12 @@ pub mod wired { Document(Document), } impl ::core::fmt::Debug for Asset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Asset::Composition(e) => { f.debug_tuple("Asset::Composition").field(e).finish() } - Asset::Document(e) => { - f.debug_tuple("Asset::Document").field(e).finish() - } + Asset::Document(e) => f.debug_tuple("Asset::Document").field(e).finish(), } } } @@ -5983,9 +5787,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6056,12 +5858,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -6071,9 +5868,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6121,9 +5916,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6157,9 +5950,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6232,9 +6023,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6284,9 +6073,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6430,9 +6217,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6504,7 +6289,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Composition = super::super::super::wired::scene::composition::Composition; #[allow(unused_unsafe, clippy::all)] /// The root composition that the script is attached to. @@ -6539,7 +6325,8 @@ pub mod exports { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[derive(Debug)] #[repr(transparent)] @@ -6556,9 +6343,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScriptRep = Some(val); - let ptr: *mut _ScriptRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScriptRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -6596,12 +6381,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -6663,7 +6449,8 @@ pub mod exports { #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_script_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Script::new(T::new()); (result0).take_handle() as i32 } @@ -6673,7 +6460,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScriptBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -6811,7 +6599,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/example-unavi-shapes/src/bindings.rs b/wasm/example-unavi-shapes/src/bindings.rs index 9e078ad8a..153d2e2f1 100644 --- a/wasm/example-unavi-shapes/src/bindings.rs +++ b/wasm/example-unavi-shapes/src/bindings.rs @@ -6,7 +6,8 @@ pub mod unavi { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; @@ -203,10 +204,7 @@ pub mod unavi { pub subdivisions: u8, } impl ::core::fmt::Debug for SphereIco { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereIco") .field("subdivisions", &self.subdivisions) .finish() @@ -219,10 +217,7 @@ pub mod unavi { pub stacks: u8, } impl ::core::fmt::Debug for SphereUv { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereUv") .field("sectors", &self.sectors) .field("stacks", &self.stacks) @@ -237,17 +232,10 @@ pub mod unavi { Uv(SphereUv), } impl ::core::fmt::Debug for SphereKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - SphereKind::Ico(e) => { - f.debug_tuple("SphereKind::Ico").field(e).finish() - } - SphereKind::Uv(e) => { - f.debug_tuple("SphereKind::Uv").field(e).finish() - } + SphereKind::Ico(e) => f.debug_tuple("SphereKind::Ico").field(e).finish(), + SphereKind::Uv(e) => f.debug_tuple("SphereKind::Uv").field(e).finish(), } } } @@ -329,10 +317,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -354,9 +339,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -371,10 +354,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -382,10 +362,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -396,11 +373,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -420,9 +393,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -442,9 +413,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -464,9 +433,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -580,9 +547,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -602,9 +567,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -624,9 +587,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -634,10 +595,8 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(half_size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = half_size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = + half_size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -659,9 +618,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -676,10 +633,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -687,10 +641,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_half_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -701,11 +652,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -763,9 +710,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -785,9 +730,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -807,9 +750,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1042,9 +983,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1064,9 +1003,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1086,9 +1023,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1111,11 +1046,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Cuboid::from_handle(ret as u32) } } @@ -1126,9 +1057,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1196,9 +1125,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1218,9 +1145,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1240,9 +1165,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1327,9 +1250,7 @@ pub mod unavi { unsafe { #[repr(align(1))] struct RetArea([::core::mem::MaybeUninit; 3]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 3], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 3]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1376,11 +1297,16 @@ pub mod unavi { unsafe { let (result2_0, result2_1, result2_2) = match value { SphereKind::Ico(e) => { - let SphereIco { subdivisions: subdivisions0 } = e; + let SphereIco { + subdivisions: subdivisions0, + } = e; (0i32, _rt::as_i32(subdivisions0), 0i32) } SphereKind::Uv(e) => { - let SphereUv { sectors: sectors1, stacks: stacks1 } = e; + let SphereUv { + sectors: sectors1, + stacks: stacks1, + } = e; (1i32, _rt::as_i32(sectors1), _rt::as_i32(stacks1)) } }; @@ -1394,12 +1320,7 @@ pub mod unavi { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result2_0, - result2_1, - result2_2, - ); + wit_import((self).handle() as i32, result2_0, result2_1, result2_2); } } } @@ -1419,9 +1340,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1441,9 +1360,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1463,9 +1380,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1541,9 +1456,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1558,7 +1471,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -1568,10 +1482,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -1599,10 +1510,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -1619,10 +1527,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -1646,10 +1551,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -1671,10 +1573,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -1687,17 +1586,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -1707,17 +1599,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -1732,10 +1617,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -1748,7 +1630,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -1815,9 +1698,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -2433,7 +2314,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -2443,10 +2325,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -2497,7 +2376,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -2505,10 +2385,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -2523,10 +2400,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -2543,10 +2417,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -2563,10 +2434,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -2619,7 +2487,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -2644,7 +2516,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -2676,9 +2553,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -2690,7 +2580,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -2737,10 +2628,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -2754,20 +2642,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -2816,17 +2695,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -2861,7 +2733,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -2943,9 +2818,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3003,9 +2876,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3065,7 +2936,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; pub struct Skeleton { @@ -3091,10 +2963,7 @@ pub mod wired { pub right_foot: Node, } impl ::core::fmt::Debug for Skeleton { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Skeleton") .field("hips", &self.hips) .field("spine", &self.spine) @@ -3171,9 +3040,7 @@ pub mod wired { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -3183,9 +3050,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 80]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 80], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 80]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:player/api")] @@ -3237,45 +3102,55 @@ pub mod wired { head: super::super::super::wired::scene::node::Node::from_handle( l6 as u32, ), - left_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l7 as u32, - ), - left_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l8 as u32, - ), - left_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l9 as u32, - ), + left_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l7 as u32, + ), + left_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l8 as u32, + ), + left_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l9 as u32, + ), left_hand: super::super::super::wired::scene::node::Node::from_handle( l10 as u32, ), - right_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l11 as u32, - ), - right_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l12 as u32, - ), - right_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l13 as u32, - ), + right_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l11 as u32, + ), + right_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l12 as u32, + ), + right_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l13 as u32, + ), right_hand: super::super::super::wired::scene::node::Node::from_handle( l14 as u32, ), - left_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l15 as u32, - ), - left_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l16 as u32, - ), + left_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l15 as u32, + ), + left_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l16 as u32, + ), left_foot: super::super::super::wired::scene::node::Node::from_handle( l17 as u32, ), - right_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l18 as u32, - ), - right_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l19 as u32, - ), + right_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l18 as u32, + ), + right_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l19 as u32, + ), right_foot: super::super::super::wired::scene::node::Node::from_handle( l20 as u32, ), @@ -3343,7 +3218,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -3354,10 +3230,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -3467,9 +3340,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3517,9 +3388,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3549,7 +3418,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -3575,7 +3449,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -3677,9 +3552,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3879,9 +3752,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3929,9 +3800,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3995,10 +3864,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -4007,7 +3873,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -4115,9 +3982,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4165,9 +4030,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4201,9 +4064,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4276,9 +4137,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4328,9 +4187,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4455,9 +4312,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4515,9 +4370,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4575,9 +4428,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4635,9 +4486,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4694,7 +4543,8 @@ pub mod wired { pub mod scene { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; #[derive(Debug)] @@ -4778,9 +4628,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -4828,9 +4676,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -4904,7 +4750,8 @@ pub mod wired { pub mod document { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Scene = super::super::super::wired::scene::scene::Scene; /// A save-able collection of resources with an active scene. @@ -4971,9 +4818,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5033,9 +4878,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5093,9 +4936,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5169,7 +5010,8 @@ pub mod wired { pub mod composition { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Document = super::super::super::wired::scene::document::Document; pub type Transform = super::super::super::wired::math::types::Transform; @@ -5254,17 +5096,12 @@ pub mod wired { Document(Document), } impl ::core::fmt::Debug for Asset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Asset::Composition(e) => { f.debug_tuple("Asset::Composition").field(e).finish() } - Asset::Document(e) => { - f.debug_tuple("Asset::Document").field(e).finish() - } + Asset::Document(e) => f.debug_tuple("Asset::Document").field(e).finish(), } } } @@ -5293,9 +5130,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5366,12 +5201,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -5381,9 +5211,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5431,9 +5259,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5467,9 +5293,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5542,9 +5366,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5594,9 +5416,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5740,9 +5560,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5814,7 +5632,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Composition = super::super::super::wired::scene::composition::Composition; #[allow(unused_unsafe, clippy::all)] /// The root composition that the script is attached to. @@ -5849,7 +5668,8 @@ pub mod exports { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[derive(Debug)] #[repr(transparent)] @@ -5866,9 +5686,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScriptRep = Some(val); - let ptr: *mut _ScriptRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScriptRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -5906,12 +5724,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -5973,7 +5792,8 @@ pub mod exports { #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_script_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Script::new(T::new()); (result0).take_handle() as i32 } @@ -5983,7 +5803,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScriptBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -6121,7 +5942,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/example-unavi-ui/src/bindings.rs b/wasm/example-unavi-ui/src/bindings.rs index 461a17663..18d6db761 100644 --- a/wasm/example-unavi-ui/src/bindings.rs +++ b/wasm/example-unavi-ui/src/bindings.rs @@ -6,7 +6,8 @@ pub mod unavi { pub mod container { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Node = super::super::super::wired::scene::node::Node; @@ -18,10 +19,7 @@ pub mod unavi { Start, } impl ::core::fmt::Debug for Alignment { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Alignment::Center => f.debug_tuple("Alignment::Center").finish(), Alignment::End => f.debug_tuple("Alignment::End").finish(), @@ -100,11 +98,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Container::from_handle(ret as u32) } } @@ -146,9 +140,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -169,9 +161,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -181,9 +171,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/container")] @@ -256,9 +244,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/container")] @@ -429,7 +415,8 @@ pub mod unavi { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; @@ -626,10 +613,7 @@ pub mod unavi { pub subdivisions: u8, } impl ::core::fmt::Debug for SphereIco { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereIco") .field("subdivisions", &self.subdivisions) .finish() @@ -642,10 +626,7 @@ pub mod unavi { pub stacks: u8, } impl ::core::fmt::Debug for SphereUv { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereUv") .field("sectors", &self.sectors) .field("stacks", &self.stacks) @@ -660,17 +641,10 @@ pub mod unavi { Uv(SphereUv), } impl ::core::fmt::Debug for SphereKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - SphereKind::Ico(e) => { - f.debug_tuple("SphereKind::Ico").field(e).finish() - } - SphereKind::Uv(e) => { - f.debug_tuple("SphereKind::Uv").field(e).finish() - } + SphereKind::Ico(e) => f.debug_tuple("SphereKind::Ico").field(e).finish(), + SphereKind::Uv(e) => f.debug_tuple("SphereKind::Uv").field(e).finish(), } } } @@ -752,10 +726,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -777,9 +748,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -794,10 +763,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -805,10 +771,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -819,11 +782,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -843,9 +802,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -865,9 +822,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -887,9 +842,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1003,9 +956,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1025,9 +976,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1047,9 +996,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1057,10 +1004,8 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(half_size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = half_size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = + half_size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -1082,9 +1027,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1099,10 +1042,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -1110,10 +1050,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_half_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -1124,11 +1061,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -1186,9 +1119,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1208,9 +1139,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1230,9 +1159,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1465,9 +1392,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1487,9 +1412,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1509,9 +1432,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1534,11 +1455,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Cuboid::from_handle(ret as u32) } } @@ -1549,9 +1466,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1619,9 +1534,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1641,9 +1554,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1663,9 +1574,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1750,9 +1659,7 @@ pub mod unavi { unsafe { #[repr(align(1))] struct RetArea([::core::mem::MaybeUninit; 3]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 3], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 3]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1799,11 +1706,16 @@ pub mod unavi { unsafe { let (result2_0, result2_1, result2_2) = match value { SphereKind::Ico(e) => { - let SphereIco { subdivisions: subdivisions0 } = e; + let SphereIco { + subdivisions: subdivisions0, + } = e; (0i32, _rt::as_i32(subdivisions0), 0i32) } SphereKind::Uv(e) => { - let SphereUv { sectors: sectors1, stacks: stacks1 } = e; + let SphereUv { + sectors: sectors1, + stacks: stacks1, + } = e; (1i32, _rt::as_i32(sectors1), _rt::as_i32(stacks1)) } }; @@ -1817,12 +1729,7 @@ pub mod unavi { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result2_0, - result2_1, - result2_2, - ); + wit_import((self).handle() as i32, result2_0, result2_1, result2_2); } } } @@ -1842,9 +1749,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1864,9 +1769,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1886,9 +1789,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1964,9 +1865,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1978,7 +1877,8 @@ pub mod unavi { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[allow(unused_unsafe, clippy::all)] pub fn update_ui(delta: f32) { @@ -2001,7 +1901,8 @@ pub mod unavi { pub mod button { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Container = super::super::super::unavi::layout::container::Container; /// 3D interactable button. @@ -2128,7 +2029,8 @@ pub mod unavi { pub mod text { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Alignment = super::super::super::unavi::layout::container::Alignment; pub type Container = super::super::super::unavi::layout::container::Container; @@ -2178,14 +2080,9 @@ pub mod unavi { Word, } impl ::core::fmt::Debug for WordWrap { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - WordWrap::Character => { - f.debug_tuple("WordWrap::Character").finish() - } + WordWrap::Character => f.debug_tuple("WordWrap::Character").finish(), WordWrap::Word => f.debug_tuple("WordWrap::Word").finish(), } } @@ -2308,12 +2205,7 @@ pub mod unavi { fn wit_import(_: i32, _: i32, _: *mut u8, _: usize) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -2323,9 +2215,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:ui/text")] @@ -2382,9 +2272,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::unavi::layout::container::Alignment::_lift( - ret as u8, - ) + super::super::super::unavi::layout::container::Alignment::_lift(ret as u8) } } } @@ -2403,9 +2291,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::unavi::layout::container::Alignment::_lift( - ret as u8, - ) + super::super::super::unavi::layout::container::Alignment::_lift(ret as u8) } } } @@ -2525,9 +2411,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:ui/text")] @@ -2594,9 +2478,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -2729,7 +2611,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -2739,10 +2622,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -2770,10 +2650,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -2790,10 +2667,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -2817,10 +2691,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -2842,10 +2713,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -2858,17 +2726,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -2878,17 +2739,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -2903,10 +2757,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -2919,7 +2770,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -2986,9 +2838,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -3604,7 +3454,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -3614,10 +3465,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -3668,7 +3516,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -3676,10 +3525,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -3694,10 +3540,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -3714,10 +3557,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -3734,10 +3574,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -3790,7 +3627,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -3815,7 +3656,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -3847,9 +3693,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -3861,7 +3720,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -3908,10 +3768,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -3925,20 +3782,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -3987,17 +3835,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -4032,7 +3873,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -4114,9 +3958,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -4174,9 +4016,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -4236,7 +4076,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; pub struct Skeleton { @@ -4262,10 +4103,7 @@ pub mod wired { pub right_foot: Node, } impl ::core::fmt::Debug for Skeleton { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Skeleton") .field("hips", &self.hips) .field("spine", &self.spine) @@ -4342,9 +4180,7 @@ pub mod wired { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -4354,9 +4190,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 80]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 80], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 80]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:player/api")] @@ -4408,45 +4242,55 @@ pub mod wired { head: super::super::super::wired::scene::node::Node::from_handle( l6 as u32, ), - left_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l7 as u32, - ), - left_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l8 as u32, - ), - left_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l9 as u32, - ), + left_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l7 as u32, + ), + left_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l8 as u32, + ), + left_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l9 as u32, + ), left_hand: super::super::super::wired::scene::node::Node::from_handle( l10 as u32, ), - right_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l11 as u32, - ), - right_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l12 as u32, - ), - right_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l13 as u32, - ), + right_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l11 as u32, + ), + right_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l12 as u32, + ), + right_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l13 as u32, + ), right_hand: super::super::super::wired::scene::node::Node::from_handle( l14 as u32, ), - left_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l15 as u32, - ), - left_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l16 as u32, - ), + left_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l15 as u32, + ), + left_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l16 as u32, + ), left_foot: super::super::super::wired::scene::node::Node::from_handle( l17 as u32, ), - right_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l18 as u32, - ), - right_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l19 as u32, - ), + right_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l18 as u32, + ), + right_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l19 as u32, + ), right_foot: super::super::super::wired::scene::node::Node::from_handle( l20 as u32, ), @@ -4514,7 +4358,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -4525,10 +4370,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -4638,9 +4480,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -4688,9 +4528,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -4720,7 +4558,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -4746,7 +4589,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -4848,9 +4692,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -5050,9 +4892,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -5100,9 +4940,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -5166,10 +5004,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -5178,7 +5013,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -5286,9 +5122,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5336,9 +5170,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5372,9 +5204,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5447,9 +5277,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5499,9 +5327,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5626,9 +5452,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5686,9 +5510,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5746,9 +5568,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5806,9 +5626,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5865,7 +5683,8 @@ pub mod wired { pub mod scene { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; #[derive(Debug)] @@ -5949,9 +5768,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -5999,9 +5816,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -6075,7 +5890,8 @@ pub mod wired { pub mod document { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Scene = super::super::super::wired::scene::scene::Scene; /// A save-able collection of resources with an active scene. @@ -6142,9 +5958,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -6204,9 +6018,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -6264,9 +6076,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -6340,7 +6150,8 @@ pub mod wired { pub mod composition { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Document = super::super::super::wired::scene::document::Document; pub type Transform = super::super::super::wired::math::types::Transform; @@ -6425,17 +6236,12 @@ pub mod wired { Document(Document), } impl ::core::fmt::Debug for Asset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Asset::Composition(e) => { f.debug_tuple("Asset::Composition").field(e).finish() } - Asset::Document(e) => { - f.debug_tuple("Asset::Document").field(e).finish() - } + Asset::Document(e) => f.debug_tuple("Asset::Document").field(e).finish(), } } } @@ -6464,9 +6270,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6537,12 +6341,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -6552,9 +6351,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6602,9 +6399,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6638,9 +6433,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6713,9 +6506,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6765,9 +6556,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6911,9 +6700,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6985,7 +6772,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Composition = super::super::super::wired::scene::composition::Composition; #[allow(unused_unsafe, clippy::all)] /// The root composition that the script is attached to. @@ -7020,7 +6808,8 @@ pub mod exports { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[derive(Debug)] #[repr(transparent)] @@ -7037,9 +6826,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScriptRep = Some(val); - let ptr: *mut _ScriptRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScriptRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -7077,12 +6864,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -7144,7 +6932,8 @@ pub mod exports { #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_script_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Script::new(T::new()); (result0).take_handle() as i32 } @@ -7154,7 +6943,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScriptBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -7292,7 +7082,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/example-unavi-vscreen/src/bindings.rs b/wasm/example-unavi-vscreen/src/bindings.rs index ec632c2be..ea38c37c3 100644 --- a/wasm/example-unavi-vscreen/src/bindings.rs +++ b/wasm/example-unavi-vscreen/src/bindings.rs @@ -6,7 +6,8 @@ pub mod unavi { pub mod container { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Node = super::super::super::wired::scene::node::Node; @@ -18,10 +19,7 @@ pub mod unavi { Start, } impl ::core::fmt::Debug for Alignment { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Alignment::Center => f.debug_tuple("Alignment::Center").finish(), Alignment::End => f.debug_tuple("Alignment::End").finish(), @@ -100,11 +98,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Container::from_handle(ret as u32) } } @@ -146,9 +140,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -169,9 +161,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -181,9 +171,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/container")] @@ -256,9 +244,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/container")] @@ -429,7 +415,8 @@ pub mod unavi { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; @@ -626,10 +613,7 @@ pub mod unavi { pub subdivisions: u8, } impl ::core::fmt::Debug for SphereIco { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereIco") .field("subdivisions", &self.subdivisions) .finish() @@ -642,10 +626,7 @@ pub mod unavi { pub stacks: u8, } impl ::core::fmt::Debug for SphereUv { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereUv") .field("sectors", &self.sectors) .field("stacks", &self.stacks) @@ -660,17 +641,10 @@ pub mod unavi { Uv(SphereUv), } impl ::core::fmt::Debug for SphereKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - SphereKind::Ico(e) => { - f.debug_tuple("SphereKind::Ico").field(e).finish() - } - SphereKind::Uv(e) => { - f.debug_tuple("SphereKind::Uv").field(e).finish() - } + SphereKind::Ico(e) => f.debug_tuple("SphereKind::Ico").field(e).finish(), + SphereKind::Uv(e) => f.debug_tuple("SphereKind::Uv").field(e).finish(), } } } @@ -752,10 +726,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -777,9 +748,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -794,10 +763,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -805,10 +771,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -819,11 +782,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -843,9 +802,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -865,9 +822,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -887,9 +842,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1003,9 +956,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1025,9 +976,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1047,9 +996,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1057,10 +1004,8 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(half_size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = half_size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = + half_size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -1082,9 +1027,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1099,10 +1042,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -1110,10 +1050,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_half_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -1124,11 +1061,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -1186,9 +1119,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1208,9 +1139,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1230,9 +1159,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1465,9 +1392,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1487,9 +1412,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1509,9 +1432,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1534,11 +1455,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Cuboid::from_handle(ret as u32) } } @@ -1549,9 +1466,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1619,9 +1534,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1641,9 +1554,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1663,9 +1574,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1750,9 +1659,7 @@ pub mod unavi { unsafe { #[repr(align(1))] struct RetArea([::core::mem::MaybeUninit; 3]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 3], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 3]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1799,11 +1706,16 @@ pub mod unavi { unsafe { let (result2_0, result2_1, result2_2) = match value { SphereKind::Ico(e) => { - let SphereIco { subdivisions: subdivisions0 } = e; + let SphereIco { + subdivisions: subdivisions0, + } = e; (0i32, _rt::as_i32(subdivisions0), 0i32) } SphereKind::Uv(e) => { - let SphereUv { sectors: sectors1, stacks: stacks1 } = e; + let SphereUv { + sectors: sectors1, + stacks: stacks1, + } = e; (1i32, _rt::as_i32(sectors1), _rt::as_i32(stacks1)) } }; @@ -1817,12 +1729,7 @@ pub mod unavi { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result2_0, - result2_1, - result2_2, - ); + wit_import((self).handle() as i32, result2_0, result2_1, result2_2); } } } @@ -1842,9 +1749,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1864,9 +1769,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1886,9 +1789,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1964,9 +1865,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1978,7 +1877,8 @@ pub mod unavi { pub mod screen { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Container = super::super::super::unavi::layout::container::Container; pub type Vec2 = super::super::super::wired::math::types::Vec2; @@ -1988,10 +1888,7 @@ pub mod unavi { Rectangle(Vec2), } impl ::core::fmt::Debug for ScreenShape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { ScreenShape::Circle(e) => { f.debug_tuple("ScreenShape::Circle").field(e).finish() @@ -2048,10 +1945,8 @@ pub mod unavi { let (result1_0, result1_1, result1_2) = match shape { ScreenShape::Circle(e) => (0i32, _rt::as_f32(e), 0.0f32), ScreenShape::Rectangle(e) => { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = e; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = + e; (1i32, _rt::as_f32(x0), _rt::as_f32(y0)) } }; @@ -2220,9 +2115,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:vscreen/screen")] @@ -2319,7 +2212,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -2329,10 +2223,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -2360,10 +2251,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -2380,10 +2268,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -2407,10 +2292,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -2432,10 +2314,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -2448,17 +2327,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -2468,17 +2340,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -2493,10 +2358,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -2509,7 +2371,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -2576,9 +2439,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -3194,7 +3055,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -3204,10 +3066,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -3258,7 +3117,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -3266,10 +3126,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -3284,10 +3141,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -3304,10 +3158,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -3324,10 +3175,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -3380,7 +3228,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -3405,7 +3257,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -3437,9 +3294,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -3451,7 +3321,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -3498,10 +3369,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -3515,20 +3383,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -3577,17 +3436,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -3622,7 +3474,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -3704,9 +3559,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3764,9 +3617,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3826,7 +3677,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; pub struct Skeleton { @@ -3852,10 +3704,7 @@ pub mod wired { pub right_foot: Node, } impl ::core::fmt::Debug for Skeleton { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Skeleton") .field("hips", &self.hips) .field("spine", &self.spine) @@ -3932,9 +3781,7 @@ pub mod wired { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -3944,9 +3791,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 80]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 80], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 80]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:player/api")] @@ -3998,45 +3843,55 @@ pub mod wired { head: super::super::super::wired::scene::node::Node::from_handle( l6 as u32, ), - left_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l7 as u32, - ), - left_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l8 as u32, - ), - left_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l9 as u32, - ), + left_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l7 as u32, + ), + left_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l8 as u32, + ), + left_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l9 as u32, + ), left_hand: super::super::super::wired::scene::node::Node::from_handle( l10 as u32, ), - right_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l11 as u32, - ), - right_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l12 as u32, - ), - right_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l13 as u32, - ), + right_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l11 as u32, + ), + right_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l12 as u32, + ), + right_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l13 as u32, + ), right_hand: super::super::super::wired::scene::node::Node::from_handle( l14 as u32, ), - left_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l15 as u32, - ), - left_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l16 as u32, - ), + left_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l15 as u32, + ), + left_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l16 as u32, + ), left_foot: super::super::super::wired::scene::node::Node::from_handle( l17 as u32, ), - right_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l18 as u32, - ), - right_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l19 as u32, - ), + right_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l18 as u32, + ), + right_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l19 as u32, + ), right_foot: super::super::super::wired::scene::node::Node::from_handle( l20 as u32, ), @@ -4104,7 +3959,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -4115,10 +3971,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -4228,9 +4081,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -4278,9 +4129,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -4310,7 +4159,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -4336,7 +4190,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -4438,9 +4293,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -4640,9 +4493,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -4690,9 +4541,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -4756,10 +4605,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -4768,7 +4614,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -4876,9 +4723,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4926,9 +4771,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4962,9 +4805,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5037,9 +4878,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5089,9 +4928,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5216,9 +5053,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5276,9 +5111,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5336,9 +5169,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5396,9 +5227,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -5455,7 +5284,8 @@ pub mod wired { pub mod scene { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; #[derive(Debug)] @@ -5539,9 +5369,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -5589,9 +5417,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -5665,7 +5491,8 @@ pub mod wired { pub mod document { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Scene = super::super::super::wired::scene::scene::Scene; /// A save-able collection of resources with an active scene. @@ -5732,9 +5559,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5794,9 +5619,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5854,9 +5677,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5930,7 +5751,8 @@ pub mod wired { pub mod composition { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Document = super::super::super::wired::scene::document::Document; pub type Transform = super::super::super::wired::math::types::Transform; @@ -6015,17 +5837,12 @@ pub mod wired { Document(Document), } impl ::core::fmt::Debug for Asset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Asset::Composition(e) => { f.debug_tuple("Asset::Composition").field(e).finish() } - Asset::Document(e) => { - f.debug_tuple("Asset::Document").field(e).finish() - } + Asset::Document(e) => f.debug_tuple("Asset::Document").field(e).finish(), } } } @@ -6054,9 +5871,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6127,12 +5942,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -6142,9 +5952,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6192,9 +6000,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6228,9 +6034,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6303,9 +6107,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6355,9 +6157,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6501,9 +6301,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -6575,7 +6373,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Composition = super::super::super::wired::scene::composition::Composition; #[allow(unused_unsafe, clippy::all)] /// The root composition that the script is attached to. @@ -6610,7 +6409,8 @@ pub mod exports { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[derive(Debug)] #[repr(transparent)] @@ -6627,9 +6427,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScriptRep = Some(val); - let ptr: *mut _ScriptRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScriptRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -6667,12 +6465,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -6734,7 +6533,8 @@ pub mod exports { #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_script_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Script::new(T::new()); (result0).take_handle() as i32 } @@ -6744,7 +6544,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScriptBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -6882,7 +6683,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/example-wired-input/src/bindings.rs b/wasm/example-wired-input/src/bindings.rs index 941dd4e2e..e8c304905 100644 --- a/wasm/example-wired-input/src/bindings.rs +++ b/wasm/example-wired-input/src/bindings.rs @@ -6,7 +6,8 @@ pub mod unavi { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; @@ -203,10 +204,7 @@ pub mod unavi { pub subdivisions: u8, } impl ::core::fmt::Debug for SphereIco { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereIco") .field("subdivisions", &self.subdivisions) .finish() @@ -219,10 +217,7 @@ pub mod unavi { pub stacks: u8, } impl ::core::fmt::Debug for SphereUv { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereUv") .field("sectors", &self.sectors) .field("stacks", &self.stacks) @@ -237,17 +232,10 @@ pub mod unavi { Uv(SphereUv), } impl ::core::fmt::Debug for SphereKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - SphereKind::Ico(e) => { - f.debug_tuple("SphereKind::Ico").field(e).finish() - } - SphereKind::Uv(e) => { - f.debug_tuple("SphereKind::Uv").field(e).finish() - } + SphereKind::Ico(e) => f.debug_tuple("SphereKind::Ico").field(e).finish(), + SphereKind::Uv(e) => f.debug_tuple("SphereKind::Uv").field(e).finish(), } } } @@ -329,10 +317,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -354,9 +339,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -371,10 +354,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -382,10 +362,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -396,11 +373,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -420,9 +393,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -442,9 +413,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -464,9 +433,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -580,9 +547,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -602,9 +567,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -624,9 +587,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -634,10 +595,8 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(half_size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = half_size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = + half_size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -659,9 +618,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -676,10 +633,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -687,10 +641,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_half_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -701,11 +652,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -763,9 +710,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -785,9 +730,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -807,9 +750,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1042,9 +983,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1064,9 +1003,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1086,9 +1023,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1111,11 +1046,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Cuboid::from_handle(ret as u32) } } @@ -1126,9 +1057,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1196,9 +1125,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1218,9 +1145,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1240,9 +1165,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1327,9 +1250,7 @@ pub mod unavi { unsafe { #[repr(align(1))] struct RetArea([::core::mem::MaybeUninit; 3]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 3], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 3]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1376,11 +1297,16 @@ pub mod unavi { unsafe { let (result2_0, result2_1, result2_2) = match value { SphereKind::Ico(e) => { - let SphereIco { subdivisions: subdivisions0 } = e; + let SphereIco { + subdivisions: subdivisions0, + } = e; (0i32, _rt::as_i32(subdivisions0), 0i32) } SphereKind::Uv(e) => { - let SphereUv { sectors: sectors1, stacks: stacks1 } = e; + let SphereUv { + sectors: sectors1, + stacks: stacks1, + } = e; (1i32, _rt::as_i32(sectors1), _rt::as_i32(stacks1)) } }; @@ -1394,12 +1320,7 @@ pub mod unavi { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result2_0, - result2_1, - result2_2, - ); + wit_import((self).handle() as i32, result2_0, result2_1, result2_2); } } } @@ -1419,9 +1340,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1441,9 +1360,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1463,9 +1380,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1541,9 +1456,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1558,7 +1471,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -1568,10 +1482,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -1599,10 +1510,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -1619,10 +1527,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -1646,10 +1551,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -1671,10 +1573,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -1687,17 +1586,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -1707,17 +1599,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -1732,10 +1617,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -1748,7 +1630,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -1815,9 +1698,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -2433,7 +2314,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -2443,10 +2325,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -2497,7 +2376,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -2505,10 +2385,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -2523,10 +2400,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -2543,10 +2417,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -2563,10 +2434,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -2619,7 +2487,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -2644,7 +2516,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -2676,9 +2553,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -2690,7 +2580,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -2737,10 +2628,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -2754,20 +2642,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -2816,17 +2695,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -2861,7 +2733,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -2943,9 +2818,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3003,9 +2876,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3065,7 +2936,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; pub struct Skeleton { @@ -3091,10 +2963,7 @@ pub mod wired { pub right_foot: Node, } impl ::core::fmt::Debug for Skeleton { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Skeleton") .field("hips", &self.hips) .field("spine", &self.spine) @@ -3171,9 +3040,7 @@ pub mod wired { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -3183,9 +3050,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 80]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 80], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 80]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:player/api")] @@ -3237,45 +3102,55 @@ pub mod wired { head: super::super::super::wired::scene::node::Node::from_handle( l6 as u32, ), - left_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l7 as u32, - ), - left_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l8 as u32, - ), - left_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l9 as u32, - ), + left_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l7 as u32, + ), + left_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l8 as u32, + ), + left_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l9 as u32, + ), left_hand: super::super::super::wired::scene::node::Node::from_handle( l10 as u32, ), - right_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l11 as u32, - ), - right_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l12 as u32, - ), - right_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l13 as u32, - ), + right_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l11 as u32, + ), + right_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l12 as u32, + ), + right_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l13 as u32, + ), right_hand: super::super::super::wired::scene::node::Node::from_handle( l14 as u32, ), - left_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l15 as u32, - ), - left_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l16 as u32, - ), + left_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l15 as u32, + ), + left_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l16 as u32, + ), left_foot: super::super::super::wired::scene::node::Node::from_handle( l17 as u32, ), - right_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l18 as u32, - ), - right_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l19 as u32, - ), + right_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l18 as u32, + ), + right_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l19 as u32, + ), right_foot: super::super::super::wired::scene::node::Node::from_handle( l20 as u32, ), @@ -3343,7 +3218,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -3354,10 +3230,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -3467,9 +3340,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3517,9 +3388,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3549,7 +3418,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -3575,7 +3449,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -3677,9 +3552,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3879,9 +3752,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3929,9 +3800,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3995,10 +3864,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -4007,7 +3873,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -4115,9 +3982,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4165,9 +4030,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4201,9 +4064,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4276,9 +4137,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4328,9 +4187,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4455,9 +4312,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4515,9 +4370,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4575,9 +4428,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4635,9 +4486,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4694,7 +4543,8 @@ pub mod wired { pub mod scene { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; #[derive(Debug)] @@ -4778,9 +4628,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -4828,9 +4676,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -4904,7 +4750,8 @@ pub mod wired { pub mod document { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Scene = super::super::super::wired::scene::scene::Scene; /// A save-able collection of resources with an active scene. @@ -4971,9 +4818,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5033,9 +4878,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5093,9 +4936,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5169,7 +5010,8 @@ pub mod wired { pub mod composition { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Document = super::super::super::wired::scene::document::Document; pub type Transform = super::super::super::wired::math::types::Transform; @@ -5254,17 +5096,12 @@ pub mod wired { Document(Document), } impl ::core::fmt::Debug for Asset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Asset::Composition(e) => { f.debug_tuple("Asset::Composition").field(e).finish() } - Asset::Document(e) => { - f.debug_tuple("Asset::Document").field(e).finish() - } + Asset::Document(e) => f.debug_tuple("Asset::Document").field(e).finish(), } } } @@ -5293,9 +5130,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5366,12 +5201,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -5381,9 +5211,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5431,9 +5259,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5467,9 +5293,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5542,9 +5366,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5594,9 +5416,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5740,9 +5560,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5814,7 +5632,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Composition = super::super::super::wired::scene::composition::Composition; #[allow(unused_unsafe, clippy::all)] /// The root composition that the script is attached to. @@ -5849,7 +5668,8 @@ pub mod exports { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[derive(Debug)] #[repr(transparent)] @@ -5866,9 +5686,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScriptRep = Some(val); - let ptr: *mut _ScriptRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScriptRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -5906,12 +5724,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -5973,7 +5792,8 @@ pub mod exports { #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_script_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Script::new(T::new()); (result0).take_handle() as i32 } @@ -5983,7 +5803,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScriptBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -6121,7 +5942,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/example-wired-physics/src/bindings.rs b/wasm/example-wired-physics/src/bindings.rs index ad06ec2ea..335e5cab3 100644 --- a/wasm/example-wired-physics/src/bindings.rs +++ b/wasm/example-wired-physics/src/bindings.rs @@ -6,7 +6,8 @@ pub mod unavi { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; @@ -203,10 +204,7 @@ pub mod unavi { pub subdivisions: u8, } impl ::core::fmt::Debug for SphereIco { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereIco") .field("subdivisions", &self.subdivisions) .finish() @@ -219,10 +217,7 @@ pub mod unavi { pub stacks: u8, } impl ::core::fmt::Debug for SphereUv { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereUv") .field("sectors", &self.sectors) .field("stacks", &self.stacks) @@ -237,17 +232,10 @@ pub mod unavi { Uv(SphereUv), } impl ::core::fmt::Debug for SphereKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - SphereKind::Ico(e) => { - f.debug_tuple("SphereKind::Ico").field(e).finish() - } - SphereKind::Uv(e) => { - f.debug_tuple("SphereKind::Uv").field(e).finish() - } + SphereKind::Ico(e) => f.debug_tuple("SphereKind::Ico").field(e).finish(), + SphereKind::Uv(e) => f.debug_tuple("SphereKind::Uv").field(e).finish(), } } } @@ -329,10 +317,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -354,9 +339,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -371,10 +354,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -382,10 +362,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -396,11 +373,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -420,9 +393,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -442,9 +413,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -464,9 +433,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -580,9 +547,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -602,9 +567,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -624,9 +587,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -634,10 +595,8 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(half_size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = half_size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = + half_size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -659,9 +618,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -676,10 +633,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -687,10 +641,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_half_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -701,11 +652,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -763,9 +710,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -785,9 +730,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -807,9 +750,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1042,9 +983,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1064,9 +1003,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1086,9 +1023,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1111,11 +1046,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Cuboid::from_handle(ret as u32) } } @@ -1126,9 +1057,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1196,9 +1125,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1218,9 +1145,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1240,9 +1165,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1327,9 +1250,7 @@ pub mod unavi { unsafe { #[repr(align(1))] struct RetArea([::core::mem::MaybeUninit; 3]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 3], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 3]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1376,11 +1297,16 @@ pub mod unavi { unsafe { let (result2_0, result2_1, result2_2) = match value { SphereKind::Ico(e) => { - let SphereIco { subdivisions: subdivisions0 } = e; + let SphereIco { + subdivisions: subdivisions0, + } = e; (0i32, _rt::as_i32(subdivisions0), 0i32) } SphereKind::Uv(e) => { - let SphereUv { sectors: sectors1, stacks: stacks1 } = e; + let SphereUv { + sectors: sectors1, + stacks: stacks1, + } = e; (1i32, _rt::as_i32(sectors1), _rt::as_i32(stacks1)) } }; @@ -1394,12 +1320,7 @@ pub mod unavi { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result2_0, - result2_1, - result2_2, - ); + wit_import((self).handle() as i32, result2_0, result2_1, result2_2); } } } @@ -1419,9 +1340,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1441,9 +1360,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1463,9 +1380,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1541,9 +1456,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1558,7 +1471,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -1568,10 +1482,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -1599,10 +1510,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -1619,10 +1527,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -1646,10 +1551,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -1671,10 +1573,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -1687,17 +1586,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -1707,17 +1599,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -1732,10 +1617,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -1748,7 +1630,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -1815,9 +1698,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -2433,7 +2314,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -2443,10 +2325,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -2497,7 +2376,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -2505,10 +2385,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -2523,10 +2400,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -2543,10 +2417,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -2563,10 +2434,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -2619,7 +2487,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -2644,7 +2516,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -2676,9 +2553,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -2690,7 +2580,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -2737,10 +2628,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -2754,20 +2642,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -2816,17 +2695,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -2861,7 +2733,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -2943,9 +2818,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3003,9 +2876,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3065,7 +2936,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; pub struct Skeleton { @@ -3091,10 +2963,7 @@ pub mod wired { pub right_foot: Node, } impl ::core::fmt::Debug for Skeleton { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Skeleton") .field("hips", &self.hips) .field("spine", &self.spine) @@ -3171,9 +3040,7 @@ pub mod wired { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -3183,9 +3050,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 80]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 80], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 80]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:player/api")] @@ -3237,45 +3102,55 @@ pub mod wired { head: super::super::super::wired::scene::node::Node::from_handle( l6 as u32, ), - left_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l7 as u32, - ), - left_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l8 as u32, - ), - left_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l9 as u32, - ), + left_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l7 as u32, + ), + left_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l8 as u32, + ), + left_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l9 as u32, + ), left_hand: super::super::super::wired::scene::node::Node::from_handle( l10 as u32, ), - right_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l11 as u32, - ), - right_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l12 as u32, - ), - right_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l13 as u32, - ), + right_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l11 as u32, + ), + right_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l12 as u32, + ), + right_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l13 as u32, + ), right_hand: super::super::super::wired::scene::node::Node::from_handle( l14 as u32, ), - left_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l15 as u32, - ), - left_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l16 as u32, - ), + left_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l15 as u32, + ), + left_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l16 as u32, + ), left_foot: super::super::super::wired::scene::node::Node::from_handle( l17 as u32, ), - right_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l18 as u32, - ), - right_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l19 as u32, - ), + right_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l18 as u32, + ), + right_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l19 as u32, + ), right_foot: super::super::super::wired::scene::node::Node::from_handle( l20 as u32, ), @@ -3343,7 +3218,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -3354,10 +3230,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -3467,9 +3340,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3517,9 +3388,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3549,7 +3418,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -3575,7 +3449,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -3677,9 +3552,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3879,9 +3752,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3929,9 +3800,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3995,10 +3864,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -4007,7 +3873,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -4115,9 +3982,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4165,9 +4030,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4201,9 +4064,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4276,9 +4137,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4328,9 +4187,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4455,9 +4312,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4515,9 +4370,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4575,9 +4428,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4635,9 +4486,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4694,7 +4543,8 @@ pub mod wired { pub mod scene { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; #[derive(Debug)] @@ -4778,9 +4628,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -4828,9 +4676,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -4904,7 +4750,8 @@ pub mod wired { pub mod document { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Scene = super::super::super::wired::scene::scene::Scene; /// A save-able collection of resources with an active scene. @@ -4971,9 +4818,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5033,9 +4878,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5093,9 +4936,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5169,7 +5010,8 @@ pub mod wired { pub mod composition { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Document = super::super::super::wired::scene::document::Document; pub type Transform = super::super::super::wired::math::types::Transform; @@ -5254,17 +5096,12 @@ pub mod wired { Document(Document), } impl ::core::fmt::Debug for Asset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Asset::Composition(e) => { f.debug_tuple("Asset::Composition").field(e).finish() } - Asset::Document(e) => { - f.debug_tuple("Asset::Document").field(e).finish() - } + Asset::Document(e) => f.debug_tuple("Asset::Document").field(e).finish(), } } } @@ -5293,9 +5130,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5366,12 +5201,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -5381,9 +5211,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5431,9 +5259,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5467,9 +5293,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5542,9 +5366,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5594,9 +5416,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5740,9 +5560,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5814,7 +5632,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Composition = super::super::super::wired::scene::composition::Composition; #[allow(unused_unsafe, clippy::all)] /// The root composition that the script is attached to. @@ -5849,7 +5668,8 @@ pub mod exports { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[derive(Debug)] #[repr(transparent)] @@ -5866,9 +5686,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScriptRep = Some(val); - let ptr: *mut _ScriptRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScriptRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -5906,12 +5724,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -5973,7 +5792,8 @@ pub mod exports { #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_script_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Script::new(T::new()); (result0).take_handle() as i32 } @@ -5983,7 +5803,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScriptBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -6121,7 +5942,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/example-wired-player/src/bindings.rs b/wasm/example-wired-player/src/bindings.rs index 2f87719d6..b42f22494 100644 --- a/wasm/example-wired-player/src/bindings.rs +++ b/wasm/example-wired-player/src/bindings.rs @@ -6,7 +6,8 @@ pub mod unavi { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; @@ -203,10 +204,7 @@ pub mod unavi { pub subdivisions: u8, } impl ::core::fmt::Debug for SphereIco { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereIco") .field("subdivisions", &self.subdivisions) .finish() @@ -219,10 +217,7 @@ pub mod unavi { pub stacks: u8, } impl ::core::fmt::Debug for SphereUv { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereUv") .field("sectors", &self.sectors) .field("stacks", &self.stacks) @@ -237,17 +232,10 @@ pub mod unavi { Uv(SphereUv), } impl ::core::fmt::Debug for SphereKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - SphereKind::Ico(e) => { - f.debug_tuple("SphereKind::Ico").field(e).finish() - } - SphereKind::Uv(e) => { - f.debug_tuple("SphereKind::Uv").field(e).finish() - } + SphereKind::Ico(e) => f.debug_tuple("SphereKind::Ico").field(e).finish(), + SphereKind::Uv(e) => f.debug_tuple("SphereKind::Uv").field(e).finish(), } } } @@ -329,10 +317,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -354,9 +339,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -371,10 +354,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -382,10 +362,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -396,11 +373,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -420,9 +393,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -442,9 +413,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -464,9 +433,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -580,9 +547,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -602,9 +567,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -624,9 +587,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -634,10 +595,8 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(half_size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = half_size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = + half_size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -659,9 +618,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -676,10 +633,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -687,10 +641,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_half_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -701,11 +652,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -763,9 +710,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -785,9 +730,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -807,9 +750,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1042,9 +983,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1064,9 +1003,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1086,9 +1023,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1111,11 +1046,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Cuboid::from_handle(ret as u32) } } @@ -1126,9 +1057,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1196,9 +1125,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1218,9 +1145,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1240,9 +1165,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1327,9 +1250,7 @@ pub mod unavi { unsafe { #[repr(align(1))] struct RetArea([::core::mem::MaybeUninit; 3]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 3], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 3]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1376,11 +1297,16 @@ pub mod unavi { unsafe { let (result2_0, result2_1, result2_2) = match value { SphereKind::Ico(e) => { - let SphereIco { subdivisions: subdivisions0 } = e; + let SphereIco { + subdivisions: subdivisions0, + } = e; (0i32, _rt::as_i32(subdivisions0), 0i32) } SphereKind::Uv(e) => { - let SphereUv { sectors: sectors1, stacks: stacks1 } = e; + let SphereUv { + sectors: sectors1, + stacks: stacks1, + } = e; (1i32, _rt::as_i32(sectors1), _rt::as_i32(stacks1)) } }; @@ -1394,12 +1320,7 @@ pub mod unavi { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result2_0, - result2_1, - result2_2, - ); + wit_import((self).handle() as i32, result2_0, result2_1, result2_2); } } } @@ -1419,9 +1340,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1441,9 +1360,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1463,9 +1380,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1541,9 +1456,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1558,7 +1471,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -1568,10 +1482,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -1599,10 +1510,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -1619,10 +1527,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -1646,10 +1551,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -1671,10 +1573,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -1687,17 +1586,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -1707,17 +1599,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -1732,10 +1617,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -1748,7 +1630,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -1815,9 +1698,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -2433,7 +2314,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -2443,10 +2325,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -2497,7 +2376,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -2505,10 +2385,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -2523,10 +2400,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -2543,10 +2417,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -2563,10 +2434,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -2619,7 +2487,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -2644,7 +2516,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -2676,9 +2553,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -2690,7 +2580,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -2737,10 +2628,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -2754,20 +2642,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -2816,17 +2695,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -2861,7 +2733,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -2943,9 +2818,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3003,9 +2876,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3065,7 +2936,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; pub struct Skeleton { @@ -3091,10 +2963,7 @@ pub mod wired { pub right_foot: Node, } impl ::core::fmt::Debug for Skeleton { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Skeleton") .field("hips", &self.hips) .field("spine", &self.spine) @@ -3171,9 +3040,7 @@ pub mod wired { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -3183,9 +3050,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 80]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 80], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 80]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:player/api")] @@ -3237,45 +3102,55 @@ pub mod wired { head: super::super::super::wired::scene::node::Node::from_handle( l6 as u32, ), - left_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l7 as u32, - ), - left_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l8 as u32, - ), - left_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l9 as u32, - ), + left_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l7 as u32, + ), + left_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l8 as u32, + ), + left_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l9 as u32, + ), left_hand: super::super::super::wired::scene::node::Node::from_handle( l10 as u32, ), - right_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l11 as u32, - ), - right_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l12 as u32, - ), - right_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l13 as u32, - ), + right_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l11 as u32, + ), + right_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l12 as u32, + ), + right_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l13 as u32, + ), right_hand: super::super::super::wired::scene::node::Node::from_handle( l14 as u32, ), - left_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l15 as u32, - ), - left_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l16 as u32, - ), + left_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l15 as u32, + ), + left_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l16 as u32, + ), left_foot: super::super::super::wired::scene::node::Node::from_handle( l17 as u32, ), - right_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l18 as u32, - ), - right_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l19 as u32, - ), + right_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l18 as u32, + ), + right_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l19 as u32, + ), right_foot: super::super::super::wired::scene::node::Node::from_handle( l20 as u32, ), @@ -3343,7 +3218,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -3354,10 +3230,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -3467,9 +3340,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3517,9 +3388,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3549,7 +3418,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -3575,7 +3449,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -3677,9 +3552,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3879,9 +3752,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3929,9 +3800,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3995,10 +3864,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -4007,7 +3873,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -4115,9 +3982,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4165,9 +4030,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4201,9 +4064,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4276,9 +4137,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4328,9 +4187,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4455,9 +4312,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4515,9 +4370,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4575,9 +4428,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4635,9 +4486,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4694,7 +4543,8 @@ pub mod wired { pub mod scene { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; #[derive(Debug)] @@ -4778,9 +4628,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -4828,9 +4676,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -4904,7 +4750,8 @@ pub mod wired { pub mod document { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Scene = super::super::super::wired::scene::scene::Scene; /// A save-able collection of resources with an active scene. @@ -4971,9 +4818,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5033,9 +4878,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5093,9 +4936,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5169,7 +5010,8 @@ pub mod wired { pub mod composition { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Document = super::super::super::wired::scene::document::Document; pub type Transform = super::super::super::wired::math::types::Transform; @@ -5254,17 +5096,12 @@ pub mod wired { Document(Document), } impl ::core::fmt::Debug for Asset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Asset::Composition(e) => { f.debug_tuple("Asset::Composition").field(e).finish() } - Asset::Document(e) => { - f.debug_tuple("Asset::Document").field(e).finish() - } + Asset::Document(e) => f.debug_tuple("Asset::Document").field(e).finish(), } } } @@ -5293,9 +5130,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5366,12 +5201,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -5381,9 +5211,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5431,9 +5259,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5467,9 +5293,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5542,9 +5366,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5594,9 +5416,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5740,9 +5560,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5814,7 +5632,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Composition = super::super::super::wired::scene::composition::Composition; #[allow(unused_unsafe, clippy::all)] /// The root composition that the script is attached to. @@ -5849,7 +5668,8 @@ pub mod exports { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[derive(Debug)] #[repr(transparent)] @@ -5866,9 +5686,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScriptRep = Some(val); - let ptr: *mut _ScriptRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScriptRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -5906,12 +5724,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -5973,7 +5792,8 @@ pub mod exports { #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_script_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Script::new(T::new()); (result0).take_handle() as i32 } @@ -5983,7 +5803,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScriptBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -6121,7 +5942,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/example-wired-scene/src/bindings.rs b/wasm/example-wired-scene/src/bindings.rs index a7478a849..4d5b36fd1 100644 --- a/wasm/example-wired-scene/src/bindings.rs +++ b/wasm/example-wired-scene/src/bindings.rs @@ -6,7 +6,8 @@ pub mod unavi { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; @@ -203,10 +204,7 @@ pub mod unavi { pub subdivisions: u8, } impl ::core::fmt::Debug for SphereIco { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereIco") .field("subdivisions", &self.subdivisions) .finish() @@ -219,10 +217,7 @@ pub mod unavi { pub stacks: u8, } impl ::core::fmt::Debug for SphereUv { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereUv") .field("sectors", &self.sectors) .field("stacks", &self.stacks) @@ -237,17 +232,10 @@ pub mod unavi { Uv(SphereUv), } impl ::core::fmt::Debug for SphereKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - SphereKind::Ico(e) => { - f.debug_tuple("SphereKind::Ico").field(e).finish() - } - SphereKind::Uv(e) => { - f.debug_tuple("SphereKind::Uv").field(e).finish() - } + SphereKind::Ico(e) => f.debug_tuple("SphereKind::Ico").field(e).finish(), + SphereKind::Uv(e) => f.debug_tuple("SphereKind::Uv").field(e).finish(), } } } @@ -329,10 +317,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -354,9 +339,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -371,10 +354,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -382,10 +362,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -396,11 +373,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -420,9 +393,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -442,9 +413,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -464,9 +433,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -580,9 +547,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -602,9 +567,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -624,9 +587,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -634,10 +595,8 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(half_size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = half_size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = + half_size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -659,9 +618,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -676,10 +633,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -687,10 +641,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_half_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -701,11 +652,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -763,9 +710,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -785,9 +730,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -807,9 +750,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1042,9 +983,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1064,9 +1003,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1086,9 +1023,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1111,11 +1046,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Cuboid::from_handle(ret as u32) } } @@ -1126,9 +1057,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1196,9 +1125,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1218,9 +1145,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1240,9 +1165,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1327,9 +1250,7 @@ pub mod unavi { unsafe { #[repr(align(1))] struct RetArea([::core::mem::MaybeUninit; 3]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 3], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 3]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1376,11 +1297,16 @@ pub mod unavi { unsafe { let (result2_0, result2_1, result2_2) = match value { SphereKind::Ico(e) => { - let SphereIco { subdivisions: subdivisions0 } = e; + let SphereIco { + subdivisions: subdivisions0, + } = e; (0i32, _rt::as_i32(subdivisions0), 0i32) } SphereKind::Uv(e) => { - let SphereUv { sectors: sectors1, stacks: stacks1 } = e; + let SphereUv { + sectors: sectors1, + stacks: stacks1, + } = e; (1i32, _rt::as_i32(sectors1), _rt::as_i32(stacks1)) } }; @@ -1394,12 +1320,7 @@ pub mod unavi { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result2_0, - result2_1, - result2_2, - ); + wit_import((self).handle() as i32, result2_0, result2_1, result2_2); } } } @@ -1419,9 +1340,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1441,9 +1360,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1463,9 +1380,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1541,9 +1456,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1558,7 +1471,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -1568,10 +1482,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -1599,10 +1510,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -1619,10 +1527,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -1646,10 +1551,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -1671,10 +1573,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -1687,17 +1586,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -1707,17 +1599,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -1732,10 +1617,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -1748,7 +1630,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -1815,9 +1698,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -2433,7 +2314,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -2443,10 +2325,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -2497,7 +2376,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -2505,10 +2385,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -2523,10 +2400,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -2543,10 +2417,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -2563,10 +2434,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -2619,7 +2487,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -2644,7 +2516,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -2676,9 +2553,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -2690,7 +2580,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -2737,10 +2628,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -2754,20 +2642,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -2816,17 +2695,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -2861,7 +2733,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -2943,9 +2818,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3003,9 +2876,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3065,7 +2936,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; pub struct Skeleton { @@ -3091,10 +2963,7 @@ pub mod wired { pub right_foot: Node, } impl ::core::fmt::Debug for Skeleton { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Skeleton") .field("hips", &self.hips) .field("spine", &self.spine) @@ -3171,9 +3040,7 @@ pub mod wired { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -3183,9 +3050,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 80]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 80], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 80]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:player/api")] @@ -3237,45 +3102,55 @@ pub mod wired { head: super::super::super::wired::scene::node::Node::from_handle( l6 as u32, ), - left_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l7 as u32, - ), - left_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l8 as u32, - ), - left_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l9 as u32, - ), + left_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l7 as u32, + ), + left_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l8 as u32, + ), + left_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l9 as u32, + ), left_hand: super::super::super::wired::scene::node::Node::from_handle( l10 as u32, ), - right_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l11 as u32, - ), - right_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l12 as u32, - ), - right_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l13 as u32, - ), + right_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l11 as u32, + ), + right_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l12 as u32, + ), + right_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l13 as u32, + ), right_hand: super::super::super::wired::scene::node::Node::from_handle( l14 as u32, ), - left_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l15 as u32, - ), - left_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l16 as u32, - ), + left_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l15 as u32, + ), + left_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l16 as u32, + ), left_foot: super::super::super::wired::scene::node::Node::from_handle( l17 as u32, ), - right_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l18 as u32, - ), - right_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l19 as u32, - ), + right_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l18 as u32, + ), + right_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l19 as u32, + ), right_foot: super::super::super::wired::scene::node::Node::from_handle( l20 as u32, ), @@ -3343,7 +3218,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -3354,10 +3230,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -3467,9 +3340,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3517,9 +3388,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3549,7 +3418,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -3575,7 +3449,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -3677,9 +3552,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3879,9 +3752,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3929,9 +3800,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3995,10 +3864,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -4007,7 +3873,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -4115,9 +3982,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4165,9 +4030,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4201,9 +4064,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4276,9 +4137,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4328,9 +4187,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4455,9 +4312,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4515,9 +4370,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4575,9 +4428,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4635,9 +4486,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4694,7 +4543,8 @@ pub mod wired { pub mod scene { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; #[derive(Debug)] @@ -4778,9 +4628,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -4828,9 +4676,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -4904,7 +4750,8 @@ pub mod wired { pub mod document { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Scene = super::super::super::wired::scene::scene::Scene; /// A save-able collection of resources with an active scene. @@ -4971,9 +4818,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5033,9 +4878,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5093,9 +4936,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5169,7 +5010,8 @@ pub mod wired { pub mod composition { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Document = super::super::super::wired::scene::document::Document; pub type Transform = super::super::super::wired::math::types::Transform; @@ -5254,17 +5096,12 @@ pub mod wired { Document(Document), } impl ::core::fmt::Debug for Asset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Asset::Composition(e) => { f.debug_tuple("Asset::Composition").field(e).finish() } - Asset::Document(e) => { - f.debug_tuple("Asset::Document").field(e).finish() - } + Asset::Document(e) => f.debug_tuple("Asset::Document").field(e).finish(), } } } @@ -5293,9 +5130,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5366,12 +5201,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -5381,9 +5211,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5431,9 +5259,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5467,9 +5293,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5542,9 +5366,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5594,9 +5416,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5740,9 +5560,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5814,7 +5632,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Composition = super::super::super::wired::scene::composition::Composition; #[allow(unused_unsafe, clippy::all)] /// The root composition that the script is attached to. @@ -5849,7 +5668,8 @@ pub mod exports { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[derive(Debug)] #[repr(transparent)] @@ -5866,9 +5686,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScriptRep = Some(val); - let ptr: *mut _ScriptRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScriptRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -5906,12 +5724,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -5973,7 +5792,8 @@ pub mod exports { #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_script_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Script::new(T::new()); (result0).take_handle() as i32 } @@ -5983,7 +5803,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScriptBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -6121,7 +5942,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/test-wired-dwn/src/bindings.rs b/wasm/test-wired-dwn/src/bindings.rs index 4d01ead1b..5a6fc7e0e 100644 --- a/wasm/test-wired-dwn/src/bindings.rs +++ b/wasm/test-wired-dwn/src/bindings.rs @@ -6,7 +6,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[derive(Clone)] pub struct EncryptedData { @@ -17,10 +18,7 @@ pub mod wired { pub tag: _rt::String, } impl ::core::fmt::Debug for EncryptedData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("EncryptedData") .field("alg", &self.alg) .field("ciphertext", &self.ciphertext) @@ -36,17 +34,10 @@ pub mod wired { Encrypted(EncryptedData), } impl ::core::fmt::Debug for Data { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Data::Base64(e) => { - f.debug_tuple("Data::Base64").field(e).finish() - } - Data::Encrypted(e) => { - f.debug_tuple("Data::Encrypted").field(e).finish() - } + Data::Base64(e) => f.debug_tuple("Data::Base64").field(e).finish(), + Data::Encrypted(e) => f.debug_tuple("Data::Encrypted").field(e).finish(), } } } @@ -56,10 +47,7 @@ pub mod wired { pub data: Option, } impl ::core::fmt::Debug for Message { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Message") .field("record-id", &self.record_id) .field("data", &self.data) @@ -72,10 +60,7 @@ pub mod wired { pub detail: Option<_rt::String>, } impl ::core::fmt::Debug for Status { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Status") .field("code", &self.code) .field("detail", &self.detail) @@ -87,7 +72,8 @@ pub mod wired { pub mod records_query { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Message = super::super::super::wired::dwn::types::Message; pub type Status = super::super::super::wired::dwn::types::Status; @@ -97,10 +83,7 @@ pub mod wired { pub status: Status, } impl ::core::fmt::Debug for RecordsQueryReply { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("RecordsQueryReply") .field("entries", &self.entries) .field("status", &self.status) @@ -187,9 +170,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 28]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 28], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 28]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:dwn/records-query")] @@ -218,11 +199,8 @@ pub mod wired { let l4 = *base.add(0).cast::<*mut u8>(); let l5 = *base.add(4).cast::(); let len6 = l5; - let bytes6 = _rt::Vec::from_raw_parts( - l4.cast(), - len6, - len6, - ); + let bytes6 = + _rt::Vec::from_raw_parts(l4.cast(), len6, len6); let l7 = i32::from(*base.add(8).cast::()); super::super::super::wired::dwn::types::Message { record_id: _rt::string_lift(bytes6), @@ -230,13 +208,20 @@ pub mod wired { 0 => None, 1 => { let e = { - let l8 = i32::from(*base.add(12).cast::()); + let l8 = i32::from( + *base.add(12).cast::(), + ); use super::super::super::wired::dwn::types::Data as V30; let v30 = match l8 { 0 => { let e30 = { - let l9 = *base.add(16).cast::<*mut u8>(); - let l10 = *base.add(20).cast::(); + let l9 = *base + .add(16) + .cast::<*mut u8>( + ); + let l10 = *base + .add(20) + .cast::(); let len11 = l10; let bytes11 = _rt::Vec::from_raw_parts( l9.cast(), @@ -248,55 +233,96 @@ pub mod wired { V30::Base64(e30) } n => { - debug_assert_eq!(n, 1, "invalid enum discriminant"); + debug_assert_eq!( + n, 1, + "invalid enum discriminant" + ); let e30 = { - let l12 = *base.add(16).cast::<*mut u8>(); - let l13 = *base.add(20).cast::(); + let l12 = *base + .add(16) + .cast::<*mut u8>( + ); + let l13 = *base + .add(20) + .cast::(); let len14 = l13; let bytes14 = _rt::Vec::from_raw_parts( l12.cast(), len14, len14, ); - let l15 = *base.add(24).cast::<*mut u8>(); - let l16 = *base.add(28).cast::(); + let l15 = *base + .add(24) + .cast::<*mut u8>( + ); + let l16 = *base + .add(28) + .cast::(); let len17 = l16; let bytes17 = _rt::Vec::from_raw_parts( l15.cast(), len17, len17, ); - let l18 = *base.add(32).cast::<*mut u8>(); - let l19 = *base.add(36).cast::(); + let l18 = *base + .add(32) + .cast::<*mut u8>( + ); + let l19 = *base + .add(36) + .cast::(); let len20 = l19; let bytes20 = _rt::Vec::from_raw_parts( l18.cast(), len20, len20, ); - let l21 = *base.add(40).cast::<*mut u8>(); - let l22 = *base.add(44).cast::(); + let l21 = *base + .add(40) + .cast::<*mut u8>( + ); + let l22 = *base + .add(44) + .cast::(); let base26 = l21; let len26 = l22; - let mut result26 = _rt::Vec::with_capacity(len26); + let mut result26 = + _rt::Vec::with_capacity( + len26, + ); for i in 0..len26 { - let base = base26.add(i * 8); + let base = + base26.add(i * 8); let e26 = { let l23 = *base.add(0).cast::<*mut u8>(); - let l24 = *base.add(4).cast::(); + let l24 = *base + .add(4) + .cast::( + ); let len25 = l24; let bytes25 = _rt::Vec::from_raw_parts( l23.cast(), len25, len25, ); - _rt::string_lift(bytes25) + _rt::string_lift( + bytes25, + ) }; result26.push(e26); } - _rt::cabi_dealloc(base26, len26 * 8, 4); - let l27 = *base.add(48).cast::<*mut u8>(); - let l28 = *base.add(52).cast::(); + _rt::cabi_dealloc( + base26, + len26 * 8, + 4, + ); + let l27 = *base + .add(48) + .cast::<*mut u8>( + ); + let l28 = *base + .add(52) + .cast::(); let len29 = l28; let bytes29 = _rt::Vec::from_raw_parts( l27.cast(), @@ -384,9 +410,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:dwn/records-query")] @@ -407,11 +431,7 @@ pub mod wired { let l2 = *ptr0.add(4).cast::<*mut u8>(); let l3 = *ptr0.add(8).cast::(); let len4 = l3; - let bytes4 = _rt::Vec::from_raw_parts( - l2.cast(), - len4, - len4, - ); + let bytes4 = _rt::Vec::from_raw_parts(l2.cast(), len4, len4); _rt::string_lift(bytes4) }; Some(e) @@ -444,12 +464,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: *mut u8, _: usize) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -459,9 +474,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:dwn/records-query")] @@ -482,11 +495,7 @@ pub mod wired { let l2 = *ptr0.add(4).cast::<*mut u8>(); let l3 = *ptr0.add(8).cast::(); let len4 = l3; - let bytes4 = _rt::Vec::from_raw_parts( - l2.cast(), - len4, - len4, - ); + let bytes4 = _rt::Vec::from_raw_parts(l2.cast(), len4, len4); _rt::string_lift(bytes4) }; Some(e) @@ -519,12 +528,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: *mut u8, _: usize) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -534,9 +538,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:dwn/records-query")] @@ -557,11 +559,7 @@ pub mod wired { let l2 = *ptr0.add(4).cast::<*mut u8>(); let l3 = *ptr0.add(8).cast::(); let len4 = l3; - let bytes4 = _rt::Vec::from_raw_parts( - l2.cast(), - len4, - len4, - ); + let bytes4 = _rt::Vec::from_raw_parts(l2.cast(), len4, len4); _rt::string_lift(bytes4) }; Some(e) @@ -594,12 +592,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: *mut u8, _: usize) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -627,7 +620,8 @@ pub mod wired { pub mod records_write { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Status = super::super::super::wired::dwn::types::Status; #[derive(Clone)] @@ -636,10 +630,7 @@ pub mod wired { pub status: Status, } impl ::core::fmt::Debug for RecordsWriteReply { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("RecordsWriteReply") .field("record-id", &self.record_id) .field("status", &self.status) @@ -726,9 +717,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 28]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 28], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 28]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:dwn/records-write")] @@ -749,11 +738,7 @@ pub mod wired { let l2 = *ptr0.add(4).cast::<*mut u8>(); let l3 = *ptr0.add(8).cast::(); let len4 = l3; - let bytes4 = _rt::Vec::from_raw_parts( - l2.cast(), - len4, - len4, - ); + let bytes4 = _rt::Vec::from_raw_parts(l2.cast(), len4, len4); let l5 = i32::from(*ptr0.add(12).cast::()); let l6 = i32::from(*ptr0.add(16).cast::()); RecordsWriteReply { @@ -813,9 +798,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:dwn/records-write")] @@ -836,11 +819,7 @@ pub mod wired { let l2 = *ptr0.add(4).cast::<*mut u8>(); let l3 = *ptr0.add(8).cast::(); let len4 = l3; - let bytes4 = _rt::Vec::from_raw_parts( - l2.cast(), - len4, - len4, - ); + let bytes4 = _rt::Vec::from_raw_parts(l2.cast(), len4, len4); _rt::string_lift(bytes4) }; Some(e) @@ -873,12 +852,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: *mut u8, _: usize) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -888,9 +862,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:dwn/records-write")] @@ -911,11 +883,7 @@ pub mod wired { let l2 = *ptr0.add(4).cast::<*mut u8>(); let l3 = *ptr0.add(8).cast::(); let len4 = l3; - let bytes4 = _rt::Vec::from_raw_parts( - l2.cast(), - len4, - len4, - ); + let bytes4 = _rt::Vec::from_raw_parts(l2.cast(), len4, len4); _rt::string_lift(bytes4) }; Some(e) @@ -948,12 +916,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: *mut u8, _: usize) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -963,9 +926,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:dwn/records-write")] @@ -986,11 +947,7 @@ pub mod wired { let l2 = *ptr0.add(4).cast::<*mut u8>(); let l3 = *ptr0.add(8).cast::(); let len4 = l3; - let bytes4 = _rt::Vec::from_raw_parts( - l2.cast(), - len4, - len4, - ); + let bytes4 = _rt::Vec::from_raw_parts(l2.cast(), len4, len4); _rt::string_lift(bytes4) }; Some(e) @@ -1023,12 +980,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: *mut u8, _: usize) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -1056,10 +1008,13 @@ pub mod wired { pub mod dwn { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; - pub type RecordsQueryBuilder = super::super::super::wired::dwn::records_query::RecordsQueryBuilder; - pub type RecordsWriteBuilder = super::super::super::wired::dwn::records_write::RecordsWriteBuilder; + pub type RecordsQueryBuilder = + super::super::super::wired::dwn::records_query::RecordsQueryBuilder; + pub type RecordsWriteBuilder = + super::super::super::wired::dwn::records_write::RecordsWriteBuilder; #[derive(Debug)] #[repr(transparent)] pub struct Dwn { @@ -1183,7 +1138,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -1193,10 +1149,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -1252,7 +1205,8 @@ pub mod exports { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[derive(Debug)] #[repr(transparent)] @@ -1269,9 +1223,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScriptRep = Some(val); - let ptr: *mut _ScriptRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScriptRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -1309,12 +1261,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -1376,7 +1329,8 @@ pub mod exports { #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_script_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Script::new(T::new()); (result0).take_handle() as i32 } @@ -1386,7 +1340,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScriptBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -1526,7 +1481,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/test-wired-physics/src/bindings.rs b/wasm/test-wired-physics/src/bindings.rs index ed1114b10..7e8d69d27 100644 --- a/wasm/test-wired-physics/src/bindings.rs +++ b/wasm/test-wired-physics/src/bindings.rs @@ -6,7 +6,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -16,10 +17,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -47,10 +45,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -67,10 +62,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -94,10 +86,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -119,10 +108,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -135,17 +121,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -155,17 +134,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -180,10 +152,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -196,7 +165,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -263,9 +233,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -881,7 +849,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -891,10 +860,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -945,7 +911,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -953,10 +920,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -971,10 +935,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -991,10 +952,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -1011,10 +969,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -1067,7 +1022,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -1092,7 +1051,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -1124,9 +1088,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -1138,7 +1115,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -1185,10 +1163,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -1202,20 +1177,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -1264,17 +1230,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -1309,7 +1268,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -1391,9 +1353,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -1451,9 +1411,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -1513,7 +1471,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; pub struct Skeleton { @@ -1539,10 +1498,7 @@ pub mod wired { pub right_foot: Node, } impl ::core::fmt::Debug for Skeleton { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Skeleton") .field("hips", &self.hips) .field("spine", &self.spine) @@ -1619,9 +1575,7 @@ pub mod wired { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1631,9 +1585,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 80]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 80], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 80]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:player/api")] @@ -1685,45 +1637,55 @@ pub mod wired { head: super::super::super::wired::scene::node::Node::from_handle( l6 as u32, ), - left_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l7 as u32, - ), - left_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l8 as u32, - ), - left_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l9 as u32, - ), + left_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l7 as u32, + ), + left_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l8 as u32, + ), + left_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l9 as u32, + ), left_hand: super::super::super::wired::scene::node::Node::from_handle( l10 as u32, ), - right_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l11 as u32, - ), - right_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l12 as u32, - ), - right_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l13 as u32, - ), + right_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l11 as u32, + ), + right_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l12 as u32, + ), + right_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l13 as u32, + ), right_hand: super::super::super::wired::scene::node::Node::from_handle( l14 as u32, ), - left_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l15 as u32, - ), - left_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l16 as u32, - ), + left_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l15 as u32, + ), + left_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l16 as u32, + ), left_foot: super::super::super::wired::scene::node::Node::from_handle( l17 as u32, ), - right_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l18 as u32, - ), - right_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l19 as u32, - ), + right_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l18 as u32, + ), + right_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l19 as u32, + ), right_foot: super::super::super::wired::scene::node::Node::from_handle( l20 as u32, ), @@ -1791,7 +1753,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -1802,10 +1765,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -1915,9 +1875,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -1965,9 +1923,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -1997,7 +1953,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -2023,7 +1984,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -2125,9 +2087,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -2327,9 +2287,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -2377,9 +2335,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -2443,10 +2399,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -2455,7 +2408,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -2563,9 +2517,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2613,9 +2565,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2649,9 +2599,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2724,9 +2672,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2776,9 +2722,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2903,9 +2847,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2963,9 +2905,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -3023,9 +2963,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -3083,9 +3021,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -3142,7 +3078,8 @@ pub mod wired { pub mod scene { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; #[derive(Debug)] @@ -3226,9 +3163,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -3276,9 +3211,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -3352,7 +3285,8 @@ pub mod wired { pub mod document { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Scene = super::super::super::wired::scene::scene::Scene; /// A save-able collection of resources with an active scene. @@ -3419,9 +3353,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -3481,9 +3413,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -3541,9 +3471,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -3617,7 +3545,8 @@ pub mod wired { pub mod composition { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Document = super::super::super::wired::scene::document::Document; pub type Transform = super::super::super::wired::math::types::Transform; @@ -3702,17 +3631,12 @@ pub mod wired { Document(Document), } impl ::core::fmt::Debug for Asset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Asset::Composition(e) => { f.debug_tuple("Asset::Composition").field(e).finish() } - Asset::Document(e) => { - f.debug_tuple("Asset::Document").field(e).finish() - } + Asset::Document(e) => f.debug_tuple("Asset::Document").field(e).finish(), } } } @@ -3741,9 +3665,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -3814,12 +3736,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -3829,9 +3746,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -3879,9 +3794,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -3915,9 +3828,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -3990,9 +3901,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -4042,9 +3951,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -4188,9 +4095,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -4262,7 +4167,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Composition = super::super::super::wired::scene::composition::Composition; #[allow(unused_unsafe, clippy::all)] /// The root composition that the script is attached to. @@ -4297,7 +4203,8 @@ pub mod exports { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[derive(Debug)] #[repr(transparent)] @@ -4314,9 +4221,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScriptRep = Some(val); - let ptr: *mut _ScriptRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScriptRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -4354,12 +4259,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -4421,7 +4327,8 @@ pub mod exports { #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_script_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Script::new(T::new()); (result0).take_handle() as i32 } @@ -4431,7 +4338,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScriptBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -4569,7 +4477,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/test-wired-scene/src/bindings.rs b/wasm/test-wired-scene/src/bindings.rs index fe0268f50..1f102d58b 100644 --- a/wasm/test-wired-scene/src/bindings.rs +++ b/wasm/test-wired-scene/src/bindings.rs @@ -6,7 +6,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -16,10 +17,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -47,10 +45,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -67,10 +62,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -94,10 +86,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -119,10 +108,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -135,17 +121,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -155,17 +134,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -180,10 +152,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -196,7 +165,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -263,9 +233,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -881,7 +849,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -891,10 +860,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -945,7 +911,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -953,10 +920,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -971,10 +935,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -991,10 +952,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -1011,10 +969,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -1067,7 +1022,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -1092,7 +1051,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -1124,9 +1088,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -1138,7 +1115,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -1185,10 +1163,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -1202,20 +1177,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -1264,17 +1230,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -1309,7 +1268,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -1391,9 +1353,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -1451,9 +1411,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -1513,7 +1471,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; pub struct Skeleton { @@ -1539,10 +1498,7 @@ pub mod wired { pub right_foot: Node, } impl ::core::fmt::Debug for Skeleton { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Skeleton") .field("hips", &self.hips) .field("spine", &self.spine) @@ -1619,9 +1575,7 @@ pub mod wired { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1631,9 +1585,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 80]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 80], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 80]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:player/api")] @@ -1685,45 +1637,55 @@ pub mod wired { head: super::super::super::wired::scene::node::Node::from_handle( l6 as u32, ), - left_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l7 as u32, - ), - left_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l8 as u32, - ), - left_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l9 as u32, - ), + left_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l7 as u32, + ), + left_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l8 as u32, + ), + left_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l9 as u32, + ), left_hand: super::super::super::wired::scene::node::Node::from_handle( l10 as u32, ), - right_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l11 as u32, - ), - right_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l12 as u32, - ), - right_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l13 as u32, - ), + right_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l11 as u32, + ), + right_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l12 as u32, + ), + right_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l13 as u32, + ), right_hand: super::super::super::wired::scene::node::Node::from_handle( l14 as u32, ), - left_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l15 as u32, - ), - left_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l16 as u32, - ), + left_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l15 as u32, + ), + left_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l16 as u32, + ), left_foot: super::super::super::wired::scene::node::Node::from_handle( l17 as u32, ), - right_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l18 as u32, - ), - right_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l19 as u32, - ), + right_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l18 as u32, + ), + right_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l19 as u32, + ), right_foot: super::super::super::wired::scene::node::Node::from_handle( l20 as u32, ), @@ -1791,7 +1753,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -1802,10 +1765,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -1915,9 +1875,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -1965,9 +1923,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -1997,7 +1953,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -2023,7 +1984,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -2125,9 +2087,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -2327,9 +2287,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -2377,9 +2335,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -2443,10 +2399,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -2455,7 +2408,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -2563,9 +2517,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2613,9 +2565,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2649,9 +2599,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2724,9 +2672,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2776,9 +2722,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2903,9 +2847,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2963,9 +2905,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -3023,9 +2963,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -3083,9 +3021,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -3142,7 +3078,8 @@ pub mod wired { pub mod scene { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; #[derive(Debug)] @@ -3226,9 +3163,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -3276,9 +3211,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -3352,7 +3285,8 @@ pub mod wired { pub mod document { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Scene = super::super::super::wired::scene::scene::Scene; /// A save-able collection of resources with an active scene. @@ -3419,9 +3353,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -3481,9 +3413,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -3541,9 +3471,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -3617,7 +3545,8 @@ pub mod wired { pub mod composition { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Document = super::super::super::wired::scene::document::Document; pub type Transform = super::super::super::wired::math::types::Transform; @@ -3702,17 +3631,12 @@ pub mod wired { Document(Document), } impl ::core::fmt::Debug for Asset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Asset::Composition(e) => { f.debug_tuple("Asset::Composition").field(e).finish() } - Asset::Document(e) => { - f.debug_tuple("Asset::Document").field(e).finish() - } + Asset::Document(e) => f.debug_tuple("Asset::Document").field(e).finish(), } } } @@ -3741,9 +3665,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -3814,12 +3736,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -3829,9 +3746,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -3879,9 +3794,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -3915,9 +3828,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -3990,9 +3901,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -4042,9 +3951,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -4188,9 +4095,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -4262,7 +4167,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Composition = super::super::super::wired::scene::composition::Composition; #[allow(unused_unsafe, clippy::all)] /// The root composition that the script is attached to. @@ -4297,7 +4203,8 @@ pub mod exports { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[derive(Debug)] #[repr(transparent)] @@ -4314,9 +4221,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScriptRep = Some(val); - let ptr: *mut _ScriptRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScriptRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -4354,12 +4259,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -4421,7 +4327,8 @@ pub mod exports { #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_script_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Script::new(T::new()); (result0).take_handle() as i32 } @@ -4431,7 +4338,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScriptBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -4569,7 +4477,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/unavi-layout/src/bindings.rs b/wasm/unavi-layout/src/bindings.rs index 57b505248..5b881c31f 100644 --- a/wasm/unavi-layout/src/bindings.rs +++ b/wasm/unavi-layout/src/bindings.rs @@ -6,7 +6,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -16,10 +17,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -47,10 +45,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -67,10 +62,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -94,10 +86,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -119,10 +108,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -135,17 +121,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -155,17 +134,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -180,10 +152,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -196,7 +165,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -263,9 +233,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -881,7 +849,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -889,10 +858,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -907,10 +873,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -927,10 +890,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -947,10 +907,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -1003,7 +960,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -1028,7 +989,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -1060,9 +1026,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -1074,7 +1053,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -1121,10 +1101,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -1138,20 +1115,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -1200,17 +1168,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -1245,7 +1206,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -1327,9 +1291,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -1387,9 +1349,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -1449,7 +1409,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -1460,10 +1421,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -1573,9 +1531,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -1623,9 +1579,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -1655,7 +1609,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -1681,7 +1640,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -1783,9 +1743,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -1985,9 +1943,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -2035,9 +1991,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -2101,10 +2055,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -2113,7 +2064,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -2221,9 +2173,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2271,9 +2221,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2307,9 +2255,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2382,9 +2328,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2434,9 +2378,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2561,9 +2503,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2621,9 +2561,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2681,9 +2619,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2741,9 +2677,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2808,7 +2742,8 @@ pub mod exports { pub mod container { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; pub type Vec3 = super::super::super::super::wired::math::types::Vec3; pub type Node = super::super::super::super::wired::scene::node::Node; @@ -2820,18 +2755,11 @@ pub mod exports { Start, } impl ::core::fmt::Debug for Alignment { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Alignment::Center => { - f.debug_tuple("Alignment::Center").finish() - } + Alignment::Center => f.debug_tuple("Alignment::Center").finish(), Alignment::End => f.debug_tuple("Alignment::End").finish(), - Alignment::Start => { - f.debug_tuple("Alignment::Start").finish() - } + Alignment::Start => f.debug_tuple("Alignment::Start").finish(), } } } @@ -2865,9 +2793,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ContainerRep = Some(val); - let ptr: *mut _ContainerRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ContainerRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -2905,12 +2831,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -2960,9 +2887,7 @@ pub mod exports { unreachable!(); #[cfg(target_arch = "wasm32")] { - #[link( - wasm_import_module = "[export]unavi:layout/container" - )] + #[link(wasm_import_module = "[export]unavi:layout/container")] extern "C" { #[link_name = "[resource-drop]container"] fn drop(_: u32); @@ -2978,14 +2903,15 @@ pub mod exports { arg1: f32, arg2: f32, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = Container::new( - T::new(super::super::super::super::wired::math::types::Vec3 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = Container::new(T::new( + super::super::super::super::wired::math::types::Vec3 { x: arg0, y: arg1, z: arg2, - }), - ); + }, + )); (result0).take_handle() as i32 } #[doc(hidden)] @@ -2993,10 +2919,9 @@ pub mod exports { pub unsafe fn _export_method_container_ref_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::ref_( - ContainerBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::ref_(ContainerBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -3004,10 +2929,9 @@ pub mod exports { pub unsafe fn _export_method_container_root_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::root( - ContainerBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::root(ContainerBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -3015,28 +2939,24 @@ pub mod exports { pub unsafe fn _export_method_container_inner_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::inner( - ContainerBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::inner(ContainerBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_container_list_children_cabi< - T: GuestContainer, - >(arg0: *mut u8) -> *mut u8 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::list_children( - ContainerBorrow::lift(arg0 as u32 as usize).get(), - ); + pub unsafe fn _export_method_container_list_children_cabi( + arg0: *mut u8, + ) -> *mut u8 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = + T::list_children(ContainerBorrow::lift(arg0 as u32 as usize).get()); let ptr1 = _RET_AREA.0.as_mut_ptr().cast::(); let vec2 = result0; let len2 = vec2.len(); - let layout2 = _rt::alloc::Layout::from_size_align_unchecked( - vec2.len() * 4, - 4, - ); + let layout2 = _rt::alloc::Layout::from_size_align_unchecked(vec2.len() * 4, 4); let result2 = if layout2.size() != 0 { let ptr = _rt::alloc::alloc(layout2).cast::(); if ptr.is_null() { @@ -3044,7 +2964,9 @@ pub mod exports { } ptr } else { - { ::core::ptr::null_mut() } + { + ::core::ptr::null_mut() + } }; for (i, e) in vec2.into_iter().enumerate() { let base = result2.add(i * 4); @@ -3058,9 +2980,9 @@ pub mod exports { } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn __post_return_method_container_list_children< - T: GuestContainer, - >(arg0: *mut u8) { + pub unsafe fn __post_return_method_container_list_children( + arg0: *mut u8, + ) { let l0 = *arg0.add(0).cast::<*mut u8>(); let l1 = *arg0.add(4).cast::(); let base2 = l0; @@ -3073,7 +2995,8 @@ pub mod exports { arg0: *mut u8, arg1: i32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::add_child( ContainerBorrow::lift(arg0 as u32 as usize).get(), ContainerBorrow::lift(arg1 as u32 as usize), @@ -3081,10 +3004,12 @@ pub mod exports { } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_container_remove_child_cabi< - T: GuestContainer, - >(arg0: *mut u8, arg1: i32) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_method_container_remove_child_cabi( + arg0: *mut u8, + arg1: i32, + ) { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::remove_child( ContainerBorrow::lift(arg0 as u32 as usize).get(), ContainerBorrow::lift(arg1 as u32 as usize), @@ -3095,10 +3020,9 @@ pub mod exports { pub unsafe fn _export_method_container_size_cabi( arg0: *mut u8, ) -> *mut u8 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::size( - ContainerBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::size(ContainerBorrow::lift(arg0 as u32 as usize).get()); let ptr1 = _RET_AREA.0.as_mut_ptr().cast::(); let super::super::super::super::wired::math::types::Vec3 { x: x2, @@ -3118,7 +3042,8 @@ pub mod exports { arg2: f32, arg3: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_size( ContainerBorrow::lift(arg0 as u32 as usize).get(), super::super::super::super::wired::math::types::Vec3 { @@ -3133,10 +3058,9 @@ pub mod exports { pub unsafe fn _export_method_container_align_x_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::align_x( - ContainerBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::align_x(ContainerBorrow::lift(arg0 as u32 as usize).get()); result0.clone() as i32 } #[doc(hidden)] @@ -3144,10 +3068,9 @@ pub mod exports { pub unsafe fn _export_method_container_align_y_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::align_y( - ContainerBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::align_y(ContainerBorrow::lift(arg0 as u32 as usize).get()); result0.clone() as i32 } #[doc(hidden)] @@ -3155,18 +3078,19 @@ pub mod exports { pub unsafe fn _export_method_container_align_z_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::align_z( - ContainerBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::align_z(ContainerBorrow::lift(arg0 as u32 as usize).get()); result0.clone() as i32 } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_container_set_align_x_cabi< - T: GuestContainer, - >(arg0: *mut u8, arg1: i32) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_method_container_set_align_x_cabi( + arg0: *mut u8, + arg1: i32, + ) { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_align_x( ContainerBorrow::lift(arg0 as u32 as usize).get(), Alignment::_lift(arg1 as u8), @@ -3174,10 +3098,12 @@ pub mod exports { } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_container_set_align_y_cabi< - T: GuestContainer, - >(arg0: *mut u8, arg1: i32) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_method_container_set_align_y_cabi( + arg0: *mut u8, + arg1: i32, + ) { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_align_y( ContainerBorrow::lift(arg0 as u32 as usize).get(), Alignment::_lift(arg1 as u8), @@ -3185,10 +3111,12 @@ pub mod exports { } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_container_set_align_z_cabi< - T: GuestContainer, - >(arg0: *mut u8, arg1: i32) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_method_container_set_align_z_cabi( + arg0: *mut u8, + arg1: i32, + ) { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_align_z( ContainerBorrow::lift(arg0 as u32 as usize).get(), Alignment::_lift(arg1 as u8), @@ -3210,9 +3138,7 @@ pub mod exports { } #[cfg(target_arch = "wasm32")] { - #[link( - wasm_import_module = "[export]unavi:layout/container" - )] + #[link(wasm_import_module = "[export]unavi:layout/container")] extern "C" { #[link_name = "[resource-new]container"] fn new(_: *mut u8) -> u32; @@ -3232,9 +3158,7 @@ pub mod exports { } #[cfg(target_arch = "wasm32")] { - #[link( - wasm_import_module = "[export]unavi:layout/container" - )] + #[link(wasm_import_module = "[export]unavi:layout/container")] extern "C" { #[link_name = "[resource-rep]container"] fn rep(_: u32) -> *mut u8; @@ -3362,20 +3286,21 @@ pub mod exports { pub(crate) use __export_unavi_layout_container_cabi; #[repr(align(4))] struct _RetArea([::core::mem::MaybeUninit; 12]); - static mut _RET_AREA: _RetArea = _RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + static mut _RET_AREA: _RetArea = _RetArea([::core::mem::MaybeUninit::uninit(); 12]); } #[allow(dead_code, clippy::all)] pub mod grid { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; - pub type Container = super::super::super::super::exports::unavi::layout::container::Container; - pub type ContainerBorrow<'a> = super::super::super::super::exports::unavi::layout::container::ContainerBorrow< - 'a, - >; + pub type Container = + super::super::super::super::exports::unavi::layout::container::Container; + pub type ContainerBorrow<'a> = + super::super::super::super::exports::unavi::layout::container::ContainerBorrow< + 'a, + >; pub type Vec3 = super::super::super::super::wired::math::types::Vec3; /// Creates a 3D grid of `container`s, with a set number of `rows` in each direction. #[derive(Debug)] @@ -3393,9 +3318,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _GridRep = Some(val); - let ptr: *mut _GridRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _GridRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -3433,12 +3356,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -3507,29 +3431,27 @@ pub mod exports { arg4: f32, arg5: f32, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = Grid::new( - T::new( - super::super::super::super::wired::math::types::Vec3 { - x: arg0, - y: arg1, - z: arg2, - }, - super::super::super::super::wired::math::types::Vec3 { - x: arg3, - y: arg4, - z: arg5, - }, - ), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = Grid::new(T::new( + super::super::super::super::wired::math::types::Vec3 { + x: arg0, + y: arg1, + z: arg2, + }, + super::super::super::super::wired::math::types::Vec3 { + x: arg3, + y: arg4, + z: arg5, + }, + )); (result0).take_handle() as i32 } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_grid_root_cabi( - arg0: *mut u8, - ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_method_grid_root_cabi(arg0: *mut u8) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = T::root(GridBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } @@ -3538,15 +3460,13 @@ pub mod exports { pub unsafe fn _export_method_grid_cells_cabi( arg0: *mut u8, ) -> *mut u8 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = T::cells(GridBorrow::lift(arg0 as u32 as usize).get()); let ptr1 = _RET_AREA.0.as_mut_ptr().cast::(); let vec2 = result0; let len2 = vec2.len(); - let layout2 = _rt::alloc::Layout::from_size_align_unchecked( - vec2.len() * 4, - 4, - ); + let layout2 = _rt::alloc::Layout::from_size_align_unchecked(vec2.len() * 4, 4); let result2 = if layout2.size() != 0 { let ptr = _rt::alloc::alloc(layout2).cast::(); if ptr.is_null() { @@ -3554,7 +3474,9 @@ pub mod exports { } ptr } else { - { ::core::ptr::null_mut() } + { + ::core::ptr::null_mut() + } }; for (i, e) in vec2.into_iter().enumerate() { let base = result2.add(i * 4); @@ -3568,9 +3490,7 @@ pub mod exports { } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn __post_return_method_grid_cells( - arg0: *mut u8, - ) { + pub unsafe fn __post_return_method_grid_cells(arg0: *mut u8) { let l0 = *arg0.add(0).cast::<*mut u8>(); let l1 = *arg0.add(4).cast::(); let base2 = l0; @@ -3585,7 +3505,8 @@ pub mod exports { arg2: i32, arg3: i32, ) -> *mut u8 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = T::cell( GridBorrow::lift(arg0 as u32 as usize).get(), arg1 as u32, @@ -3609,7 +3530,8 @@ pub mod exports { pub unsafe fn _export_method_grid_rows_cabi( arg0: *mut u8, ) -> *mut u8 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = T::rows(GridBorrow::lift(arg0 as u32 as usize).get()); let ptr1 = _RET_AREA.0.as_mut_ptr().cast::(); let super::super::super::super::wired::math::types::Vec3 { @@ -3630,7 +3552,8 @@ pub mod exports { arg2: f32, arg3: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_rows( GridBorrow::lift(arg0 as u32 as usize).get(), super::super::super::super::wired::math::types::Vec3 { @@ -3740,9 +3663,7 @@ pub mod exports { pub(crate) use __export_unavi_layout_grid_cabi; #[repr(align(4))] struct _RetArea([::core::mem::MaybeUninit; 12]); - static mut _RET_AREA: _RetArea = _RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + static mut _RET_AREA: _RetArea = _RetArea([::core::mem::MaybeUninit::uninit(); 12]); } } } @@ -3809,7 +3730,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/unavi-shapes/src/bindings.rs b/wasm/unavi-shapes/src/bindings.rs index e0bdc0a8e..1cde055cb 100644 --- a/wasm/unavi-shapes/src/bindings.rs +++ b/wasm/unavi-shapes/src/bindings.rs @@ -6,7 +6,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -16,10 +17,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -47,10 +45,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -67,10 +62,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -94,10 +86,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -119,10 +108,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -135,17 +121,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -155,17 +134,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -180,10 +152,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -196,7 +165,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -263,9 +233,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -881,7 +849,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -891,10 +860,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -945,7 +911,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -953,10 +920,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -971,10 +935,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -991,10 +952,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -1011,10 +969,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -1067,7 +1022,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -1092,7 +1051,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -1124,9 +1088,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -1138,7 +1115,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -1185,10 +1163,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -1202,20 +1177,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -1264,17 +1230,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -1309,7 +1268,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -1391,9 +1353,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -1451,9 +1411,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -1513,7 +1471,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -1524,10 +1483,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -1637,9 +1593,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -1687,9 +1641,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -1719,7 +1671,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -1745,7 +1702,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -1847,9 +1805,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -2049,9 +2005,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -2099,9 +2053,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -2165,10 +2117,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -2177,7 +2126,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -2285,9 +2235,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2335,9 +2283,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2371,9 +2317,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2446,9 +2390,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2498,9 +2440,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2625,9 +2565,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2685,9 +2623,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2745,9 +2681,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2805,9 +2739,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -2872,7 +2804,8 @@ pub mod exports { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; pub type Vec2 = super::super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::super::wired::math::types::Vec3; @@ -2893,9 +2826,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _RectangleRep = Some(val); - let ptr: *mut _RectangleRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _RectangleRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -2933,12 +2864,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -3012,9 +2944,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _CircleRep = Some(val); - let ptr: *mut _CircleRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _CircleRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -3052,12 +2982,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -3131,9 +3062,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _EllipseRep = Some(val); - let ptr: *mut _EllipseRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _EllipseRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -3171,12 +3100,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -3250,9 +3180,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _CylinderRep = Some(val); - let ptr: *mut _CylinderRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _CylinderRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -3290,12 +3218,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -3369,9 +3298,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _CuboidRep = Some(val); - let ptr: *mut _CuboidRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _CuboidRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -3409,12 +3336,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -3479,10 +3407,7 @@ pub mod exports { pub subdivisions: u8, } impl ::core::fmt::Debug for SphereIco { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereIco") .field("subdivisions", &self.subdivisions) .finish() @@ -3495,10 +3420,7 @@ pub mod exports { pub stacks: u8, } impl ::core::fmt::Debug for SphereUv { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereUv") .field("sectors", &self.sectors) .field("stacks", &self.stacks) @@ -3513,17 +3435,12 @@ pub mod exports { Uv(SphereUv), } impl ::core::fmt::Debug for SphereKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { SphereKind::Ico(e) => { f.debug_tuple("SphereKind::Ico").field(e).finish() } - SphereKind::Uv(e) => { - f.debug_tuple("SphereKind::Uv").field(e).finish() - } + SphereKind::Uv(e) => f.debug_tuple("SphereKind::Uv").field(e).finish(), } } } @@ -3542,9 +3459,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _SphereRep = Some(val); - let ptr: *mut _SphereRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _SphereRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -3582,12 +3497,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -3661,9 +3577,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _AxesRep = Some(val); - let ptr: *mut _AxesRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _AxesRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -3701,12 +3615,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -3771,13 +3686,11 @@ pub mod exports { arg0: f32, arg1: f32, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = Rectangle::new( - T::new(super::super::super::super::wired::math::types::Vec2 { - x: arg0, - y: arg1, - }), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = Rectangle::new(T::new( + super::super::super::super::wired::math::types::Vec2 { x: arg0, y: arg1 }, + )); (result0).take_handle() as i32 } #[doc(hidden)] @@ -3785,15 +3698,12 @@ pub mod exports { pub unsafe fn _export_method_rectangle_size_cabi( arg0: *mut u8, ) -> *mut u8 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::size( - RectangleBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::size(RectangleBorrow::lift(arg0 as u32 as usize).get()); let ptr1 = _RET_AREA.0.as_mut_ptr().cast::(); - let super::super::super::super::wired::math::types::Vec2 { - x: x2, - y: y2, - } = result0; + let super::super::super::super::wired::math::types::Vec2 { x: x2, y: y2 } = + result0; *ptr1.add(0).cast::() = _rt::as_f32(x2); *ptr1.add(4).cast::() = _rt::as_f32(y2); ptr1 @@ -3805,13 +3715,11 @@ pub mod exports { arg1: f32, arg2: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_size( RectangleBorrow::lift(arg0 as u32 as usize).get(), - super::super::super::super::wired::math::types::Vec2 { - x: arg1, - y: arg2, - }, + super::super::super::super::wired::math::types::Vec2 { x: arg1, y: arg2 }, ); } #[doc(hidden)] @@ -3819,10 +3727,9 @@ pub mod exports { pub unsafe fn _export_method_rectangle_to_mesh_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_mesh( - RectangleBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_mesh(RectangleBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -3830,29 +3737,27 @@ pub mod exports { pub unsafe fn _export_method_rectangle_to_node_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_node( - RectangleBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_node(RectangleBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_rectangle_to_physics_node_cabi< - T: GuestRectangle, - >(arg0: *mut u8) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_physics_node( - RectangleBorrow::lift(arg0 as u32 as usize).get(), - ); + pub unsafe fn _export_method_rectangle_to_physics_node_cabi( + arg0: *mut u8, + ) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = + T::to_physics_node(RectangleBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_constructor_circle_cabi( - arg0: f32, - ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_constructor_circle_cabi(arg0: f32) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Circle::new(T::new(arg0)); (result0).take_handle() as i32 } @@ -3861,10 +3766,9 @@ pub mod exports { pub unsafe fn _export_method_circle_radius_cabi( arg0: *mut u8, ) -> f32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::radius( - CircleBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::radius(CircleBorrow::lift(arg0 as u32 as usize).get()); _rt::as_f32(result0) } #[doc(hidden)] @@ -3873,7 +3777,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_radius(CircleBorrow::lift(arg0 as u32 as usize).get(), arg1); } #[doc(hidden)] @@ -3881,10 +3786,9 @@ pub mod exports { pub unsafe fn _export_method_circle_resolution_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::resolution( - CircleBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::resolution(CircleBorrow::lift(arg0 as u32 as usize).get()); _rt::as_i32(result0) } #[doc(hidden)] @@ -3893,21 +3797,18 @@ pub mod exports { arg0: *mut u8, arg1: i32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - T::set_resolution( - CircleBorrow::lift(arg0 as u32 as usize).get(), - arg1 as u16, - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + T::set_resolution(CircleBorrow::lift(arg0 as u32 as usize).get(), arg1 as u16); } #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_method_circle_to_mesh_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_mesh( - CircleBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_mesh(CircleBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -3915,10 +3816,9 @@ pub mod exports { pub unsafe fn _export_method_circle_to_node_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_node( - CircleBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_node(CircleBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -3926,10 +3826,10 @@ pub mod exports { pub unsafe fn _export_method_circle_to_physics_node_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_physics_node( - CircleBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = + T::to_physics_node(CircleBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -3938,13 +3838,11 @@ pub mod exports { arg0: f32, arg1: f32, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = Ellipse::new( - T::new(super::super::super::super::wired::math::types::Vec2 { - x: arg0, - y: arg1, - }), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = Ellipse::new(T::new( + super::super::super::super::wired::math::types::Vec2 { x: arg0, y: arg1 }, + )); (result0).take_handle() as i32 } #[doc(hidden)] @@ -3952,15 +3850,12 @@ pub mod exports { pub unsafe fn _export_method_ellipse_half_size_cabi( arg0: *mut u8, ) -> *mut u8 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::half_size( - EllipseBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::half_size(EllipseBorrow::lift(arg0 as u32 as usize).get()); let ptr1 = _RET_AREA.0.as_mut_ptr().cast::(); - let super::super::super::super::wired::math::types::Vec2 { - x: x2, - y: y2, - } = result0; + let super::super::super::super::wired::math::types::Vec2 { x: x2, y: y2 } = + result0; *ptr1.add(0).cast::() = _rt::as_f32(x2); *ptr1.add(4).cast::() = _rt::as_f32(y2); ptr1 @@ -3972,13 +3867,11 @@ pub mod exports { arg1: f32, arg2: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_half_size( EllipseBorrow::lift(arg0 as u32 as usize).get(), - super::super::super::super::wired::math::types::Vec2 { - x: arg1, - y: arg2, - }, + super::super::super::super::wired::math::types::Vec2 { x: arg1, y: arg2 }, ); } #[doc(hidden)] @@ -3986,32 +3879,29 @@ pub mod exports { pub unsafe fn _export_method_ellipse_resolution_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::resolution( - EllipseBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::resolution(EllipseBorrow::lift(arg0 as u32 as usize).get()); _rt::as_i32(result0) } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_ellipse_set_resolution_cabi< - T: GuestEllipse, - >(arg0: *mut u8, arg1: i32) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - T::set_resolution( - EllipseBorrow::lift(arg0 as u32 as usize).get(), - arg1 as u16, - ); + pub unsafe fn _export_method_ellipse_set_resolution_cabi( + arg0: *mut u8, + arg1: i32, + ) { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + T::set_resolution(EllipseBorrow::lift(arg0 as u32 as usize).get(), arg1 as u16); } #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_method_ellipse_to_mesh_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_mesh( - EllipseBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_mesh(EllipseBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -4019,21 +3909,20 @@ pub mod exports { pub unsafe fn _export_method_ellipse_to_node_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_node( - EllipseBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_node(EllipseBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_ellipse_to_physics_node_cabi< - T: GuestEllipse, - >(arg0: *mut u8) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_physics_node( - EllipseBorrow::lift(arg0 as u32 as usize).get(), - ); + pub unsafe fn _export_method_ellipse_to_physics_node_cabi( + arg0: *mut u8, + ) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = + T::to_physics_node(EllipseBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -4042,7 +3931,8 @@ pub mod exports { arg0: f32, arg1: f32, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Cylinder::new(T::new(arg0, arg1)); (result0).take_handle() as i32 } @@ -4051,10 +3941,9 @@ pub mod exports { pub unsafe fn _export_method_cylinder_cap_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::cap( - CylinderBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::cap(CylinderBorrow::lift(arg0 as u32 as usize).get()); match result0 { true => 1, false => 0, @@ -4066,7 +3955,8 @@ pub mod exports { arg0: *mut u8, arg1: i32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_cap( CylinderBorrow::lift(arg0 as u32 as usize).get(), _rt::bool_lift(arg1 as u8), @@ -4077,10 +3967,9 @@ pub mod exports { pub unsafe fn _export_method_cylinder_height_cabi( arg0: *mut u8, ) -> f32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::height( - CylinderBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::height(CylinderBorrow::lift(arg0 as u32 as usize).get()); _rt::as_f32(result0) } #[doc(hidden)] @@ -4089,21 +3978,18 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - T::set_height( - CylinderBorrow::lift(arg0 as u32 as usize).get(), - arg1, - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + T::set_height(CylinderBorrow::lift(arg0 as u32 as usize).get(), arg1); } #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_method_cylinder_radius_cabi( arg0: *mut u8, ) -> f32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::radius( - CylinderBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::radius(CylinderBorrow::lift(arg0 as u32 as usize).get()); _rt::as_f32(result0) } #[doc(hidden)] @@ -4112,65 +3998,58 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - T::set_radius( - CylinderBorrow::lift(arg0 as u32 as usize).get(), - arg1, - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + T::set_radius(CylinderBorrow::lift(arg0 as u32 as usize).get(), arg1); } #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_method_cylinder_resolution_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::resolution( - CylinderBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::resolution(CylinderBorrow::lift(arg0 as u32 as usize).get()); _rt::as_i32(result0) } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_cylinder_set_resolution_cabi< - T: GuestCylinder, - >(arg0: *mut u8, arg1: i32) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - T::set_resolution( - CylinderBorrow::lift(arg0 as u32 as usize).get(), - arg1 as u8, - ); + pub unsafe fn _export_method_cylinder_set_resolution_cabi( + arg0: *mut u8, + arg1: i32, + ) { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + T::set_resolution(CylinderBorrow::lift(arg0 as u32 as usize).get(), arg1 as u8); } #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_method_cylinder_segments_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::segments( - CylinderBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::segments(CylinderBorrow::lift(arg0 as u32 as usize).get()); _rt::as_i32(result0) } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_cylinder_set_segments_cabi< - T: GuestCylinder, - >(arg0: *mut u8, arg1: i32) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - T::set_segments( - CylinderBorrow::lift(arg0 as u32 as usize).get(), - arg1 as u8, - ); + pub unsafe fn _export_method_cylinder_set_segments_cabi( + arg0: *mut u8, + arg1: i32, + ) { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + T::set_segments(CylinderBorrow::lift(arg0 as u32 as usize).get(), arg1 as u8); } #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_method_cylinder_to_mesh_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_mesh( - CylinderBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_mesh(CylinderBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -4178,21 +4057,20 @@ pub mod exports { pub unsafe fn _export_method_cylinder_to_node_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_node( - CylinderBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_node(CylinderBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_cylinder_to_physics_node_cabi< - T: GuestCylinder, - >(arg0: *mut u8) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_physics_node( - CylinderBorrow::lift(arg0 as u32 as usize).get(), - ); + pub unsafe fn _export_method_cylinder_to_physics_node_cabi( + arg0: *mut u8, + ) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = + T::to_physics_node(CylinderBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -4202,14 +4080,15 @@ pub mod exports { arg1: f32, arg2: f32, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = Cuboid::new( - T::new(super::super::super::super::wired::math::types::Vec3 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = Cuboid::new(T::new( + super::super::super::super::wired::math::types::Vec3 { x: arg0, y: arg1, z: arg2, - }), - ); + }, + )); (result0).take_handle() as i32 } #[doc(hidden)] @@ -4217,10 +4096,9 @@ pub mod exports { pub unsafe fn _export_method_cuboid_size_cabi( arg0: *mut u8, ) -> *mut u8 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::size( - CuboidBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::size(CuboidBorrow::lift(arg0 as u32 as usize).get()); let ptr1 = _RET_AREA.0.as_mut_ptr().cast::(); let super::super::super::super::wired::math::types::Vec3 { x: x2, @@ -4240,7 +4118,8 @@ pub mod exports { arg2: f32, arg3: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_size( CuboidBorrow::lift(arg0 as u32 as usize).get(), super::super::super::super::wired::math::types::Vec3 { @@ -4255,10 +4134,9 @@ pub mod exports { pub unsafe fn _export_method_cuboid_to_mesh_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_mesh( - CuboidBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_mesh(CuboidBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -4266,10 +4144,9 @@ pub mod exports { pub unsafe fn _export_method_cuboid_to_node_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_node( - CuboidBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_node(CuboidBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -4277,27 +4154,25 @@ pub mod exports { pub unsafe fn _export_method_cuboid_to_physics_node_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_physics_node( - CuboidBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = + T::to_physics_node(CuboidBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_static_sphere_new_ico_cabi( - arg0: f32, - ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_static_sphere_new_ico_cabi(arg0: f32) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = T::new_ico(arg0); (result0).take_handle() as i32 } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_static_sphere_new_uv_cabi( - arg0: f32, - ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_static_sphere_new_uv_cabi(arg0: f32) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = T::new_uv(arg0); (result0).take_handle() as i32 } @@ -4306,10 +4181,9 @@ pub mod exports { pub unsafe fn _export_method_sphere_radius_cabi( arg0: *mut u8, ) -> f32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::radius( - SphereBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::radius(SphereBorrow::lift(arg0 as u32 as usize).get()); _rt::as_f32(result0) } #[doc(hidden)] @@ -4318,7 +4192,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_radius(SphereBorrow::lift(arg0 as u32 as usize).get(), arg1); } #[doc(hidden)] @@ -4326,21 +4201,24 @@ pub mod exports { pub unsafe fn _export_method_sphere_kind_cabi( arg0: *mut u8, ) -> *mut u8 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::kind( - SphereBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::kind(SphereBorrow::lift(arg0 as u32 as usize).get()); let ptr1 = _RET_AREA.0.as_mut_ptr().cast::(); match result0 { SphereKind::Ico(e) => { *ptr1.add(0).cast::() = (0i32) as u8; - let SphereIco { subdivisions: subdivisions2 } = e; - *ptr1.add(1).cast::() = (_rt::as_i32(subdivisions2)) - as u8; + let SphereIco { + subdivisions: subdivisions2, + } = e; + *ptr1.add(1).cast::() = (_rt::as_i32(subdivisions2)) as u8; } SphereKind::Uv(e) => { *ptr1.add(0).cast::() = (1i32) as u8; - let SphereUv { sectors: sectors3, stacks: stacks3 } = e; + let SphereUv { + sectors: sectors3, + stacks: stacks3, + } = e; *ptr1.add(1).cast::() = (_rt::as_i32(sectors3)) as u8; *ptr1.add(2).cast::() = (_rt::as_i32(stacks3)) as u8; } @@ -4355,7 +4233,8 @@ pub mod exports { arg2: i32, arg3: i32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let v0 = match arg1 { 0 => { let e0 = SphereIco { @@ -4379,10 +4258,9 @@ pub mod exports { pub unsafe fn _export_method_sphere_to_mesh_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_mesh( - SphereBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_mesh(SphereBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -4390,10 +4268,9 @@ pub mod exports { pub unsafe fn _export_method_sphere_to_node_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_node( - SphereBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_node(SphereBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -4401,25 +4278,25 @@ pub mod exports { pub unsafe fn _export_method_sphere_to_physics_node_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_physics_node( - SphereBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = + T::to_physics_node(SphereBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_axes_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Axes::new(T::new()); (result0).take_handle() as i32 } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_axes_size_cabi( - arg0: *mut u8, - ) -> f32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_method_axes_size_cabi(arg0: *mut u8) -> f32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = T::size(AxesBorrow::lift(arg0 as u32 as usize).get()); _rt::as_f32(result0) } @@ -4429,18 +4306,16 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_size(AxesBorrow::lift(arg0 as u32 as usize).get(), arg1); } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_axes_to_node_cabi( - arg0: *mut u8, - ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::to_node( - AxesBorrow::lift(arg0 as u32 as usize).get(), - ); + pub unsafe fn _export_method_axes_to_node_cabi(arg0: *mut u8) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_node(AxesBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } pub trait Guest { @@ -5121,9 +4996,7 @@ pub mod exports { pub(crate) use __export_unavi_shapes_api_cabi; #[repr(align(4))] struct _RetArea([::core::mem::MaybeUninit; 12]); - static mut _RET_AREA: _RetArea = _RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + static mut _RET_AREA: _RetArea = _RetArea([::core::mem::MaybeUninit::uninit(); 12]); } } } @@ -5190,7 +5063,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/unavi-system/src/bindings.rs b/wasm/unavi-system/src/bindings.rs index 4e18fa5d7..0c767204a 100644 --- a/wasm/unavi-system/src/bindings.rs +++ b/wasm/unavi-system/src/bindings.rs @@ -6,7 +6,8 @@ pub mod unavi { pub mod container { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Node = super::super::super::wired::scene::node::Node; @@ -18,10 +19,7 @@ pub mod unavi { Start, } impl ::core::fmt::Debug for Alignment { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Alignment::Center => f.debug_tuple("Alignment::Center").finish(), Alignment::End => f.debug_tuple("Alignment::End").finish(), @@ -100,11 +98,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Container::from_handle(ret as u32) } } @@ -146,9 +140,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -169,9 +161,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -181,9 +171,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/container")] @@ -256,9 +244,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/container")] @@ -429,7 +415,8 @@ pub mod unavi { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[allow(unused_unsafe, clippy::all)] pub fn update_ui(delta: f32) { @@ -452,7 +439,8 @@ pub mod unavi { pub mod button { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Container = super::super::super::unavi::layout::container::Container; /// 3D interactable button. @@ -579,7 +567,8 @@ pub mod unavi { pub mod text { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Alignment = super::super::super::unavi::layout::container::Alignment; pub type Container = super::super::super::unavi::layout::container::Container; @@ -629,14 +618,9 @@ pub mod unavi { Word, } impl ::core::fmt::Debug for WordWrap { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - WordWrap::Character => { - f.debug_tuple("WordWrap::Character").finish() - } + WordWrap::Character => f.debug_tuple("WordWrap::Character").finish(), WordWrap::Word => f.debug_tuple("WordWrap::Word").finish(), } } @@ -759,12 +743,7 @@ pub mod unavi { fn wit_import(_: i32, _: i32, _: *mut u8, _: usize) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -774,9 +753,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:ui/text")] @@ -833,9 +810,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::unavi::layout::container::Alignment::_lift( - ret as u8, - ) + super::super::super::unavi::layout::container::Alignment::_lift(ret as u8) } } } @@ -854,9 +829,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::unavi::layout::container::Alignment::_lift( - ret as u8, - ) + super::super::super::unavi::layout::container::Alignment::_lift(ret as u8) } } } @@ -976,9 +949,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:ui/text")] @@ -1045,9 +1016,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1177,7 +1146,8 @@ pub mod unavi { pub mod screen { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Container = super::super::super::unavi::layout::container::Container; pub type Vec2 = super::super::super::wired::math::types::Vec2; @@ -1187,10 +1157,7 @@ pub mod unavi { Rectangle(Vec2), } impl ::core::fmt::Debug for ScreenShape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { ScreenShape::Circle(e) => { f.debug_tuple("ScreenShape::Circle").field(e).finish() @@ -1247,10 +1214,8 @@ pub mod unavi { let (result1_0, result1_1, result1_2) = match shape { ScreenShape::Circle(e) => (0i32, _rt::as_f32(e), 0.0f32), ScreenShape::Rectangle(e) => { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = e; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = + e; (1i32, _rt::as_f32(x0), _rt::as_f32(y0)) } }; @@ -1419,9 +1384,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:vscreen/screen")] @@ -1518,7 +1481,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -1528,10 +1492,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -1559,10 +1520,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -1579,10 +1537,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -1606,10 +1561,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -1631,10 +1583,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -1647,17 +1596,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -1667,17 +1609,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -1692,10 +1627,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -1708,7 +1640,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -1775,9 +1708,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -2393,7 +2324,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -2403,10 +2335,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -2457,7 +2386,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -2465,10 +2395,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -2483,10 +2410,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -2503,10 +2427,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -2523,10 +2444,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -2579,7 +2497,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -2604,7 +2526,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -2636,9 +2563,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -2650,7 +2590,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -2697,10 +2638,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -2714,20 +2652,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -2776,17 +2705,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -2821,7 +2743,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -2903,9 +2828,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -2963,9 +2886,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3025,7 +2946,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; pub struct Skeleton { @@ -3051,10 +2973,7 @@ pub mod wired { pub right_foot: Node, } impl ::core::fmt::Debug for Skeleton { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Skeleton") .field("hips", &self.hips) .field("spine", &self.spine) @@ -3131,9 +3050,7 @@ pub mod wired { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -3143,9 +3060,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 80]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 80], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 80]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:player/api")] @@ -3197,45 +3112,55 @@ pub mod wired { head: super::super::super::wired::scene::node::Node::from_handle( l6 as u32, ), - left_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l7 as u32, - ), - left_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l8 as u32, - ), - left_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l9 as u32, - ), + left_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l7 as u32, + ), + left_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l8 as u32, + ), + left_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l9 as u32, + ), left_hand: super::super::super::wired::scene::node::Node::from_handle( l10 as u32, ), - right_shoulder: super::super::super::wired::scene::node::Node::from_handle( - l11 as u32, - ), - right_upper_arm: super::super::super::wired::scene::node::Node::from_handle( - l12 as u32, - ), - right_lower_arm: super::super::super::wired::scene::node::Node::from_handle( - l13 as u32, - ), + right_shoulder: + super::super::super::wired::scene::node::Node::from_handle( + l11 as u32, + ), + right_upper_arm: + super::super::super::wired::scene::node::Node::from_handle( + l12 as u32, + ), + right_lower_arm: + super::super::super::wired::scene::node::Node::from_handle( + l13 as u32, + ), right_hand: super::super::super::wired::scene::node::Node::from_handle( l14 as u32, ), - left_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l15 as u32, - ), - left_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l16 as u32, - ), + left_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l15 as u32, + ), + left_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l16 as u32, + ), left_foot: super::super::super::wired::scene::node::Node::from_handle( l17 as u32, ), - right_upper_leg: super::super::super::wired::scene::node::Node::from_handle( - l18 as u32, - ), - right_lower_leg: super::super::super::wired::scene::node::Node::from_handle( - l19 as u32, - ), + right_upper_leg: + super::super::super::wired::scene::node::Node::from_handle( + l18 as u32, + ), + right_lower_leg: + super::super::super::wired::scene::node::Node::from_handle( + l19 as u32, + ), right_foot: super::super::super::wired::scene::node::Node::from_handle( l20 as u32, ), @@ -3303,7 +3228,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -3314,10 +3240,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -3427,9 +3350,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3477,9 +3398,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3509,7 +3428,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -3535,7 +3459,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -3637,9 +3562,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3839,9 +3762,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3889,9 +3810,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -3955,10 +3874,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -3967,7 +3883,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -4075,9 +3992,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4125,9 +4040,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4161,9 +4074,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4236,9 +4147,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4288,9 +4197,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4415,9 +4322,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4475,9 +4380,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4535,9 +4438,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4595,9 +4496,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4654,7 +4553,8 @@ pub mod wired { pub mod scene { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Node = super::super::super::wired::scene::node::Node; #[derive(Debug)] @@ -4738,9 +4638,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -4788,9 +4686,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/scene")] @@ -4864,7 +4760,8 @@ pub mod wired { pub mod document { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Scene = super::super::super::wired::scene::scene::Scene; /// A save-able collection of resources with an active scene. @@ -4931,9 +4828,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -4993,9 +4888,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5053,9 +4946,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/document")] @@ -5129,7 +5020,8 @@ pub mod wired { pub mod composition { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Document = super::super::super::wired::scene::document::Document; pub type Transform = super::super::super::wired::math::types::Transform; @@ -5214,17 +5106,12 @@ pub mod wired { Document(Document), } impl ::core::fmt::Debug for Asset { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Asset::Composition(e) => { f.debug_tuple("Asset::Composition").field(e).finish() } - Asset::Document(e) => { - f.debug_tuple("Asset::Document").field(e).finish() - } + Asset::Document(e) => f.debug_tuple("Asset::Document").field(e).finish(), } } } @@ -5253,9 +5140,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5326,12 +5211,7 @@ pub mod wired { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result1_0, - result1_1, - result1_2, - ); + wit_import((self).handle() as i32, result1_0, result1_1, result1_2); } } } @@ -5341,9 +5221,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5391,9 +5269,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5427,9 +5303,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5502,9 +5376,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5554,9 +5426,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5700,9 +5570,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/composition")] @@ -5774,7 +5642,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Composition = super::super::super::wired::scene::composition::Composition; #[allow(unused_unsafe, clippy::all)] /// The root composition that the script is attached to. @@ -5809,7 +5678,8 @@ pub mod exports { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[derive(Debug)] #[repr(transparent)] @@ -5826,9 +5696,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScriptRep = Some(val); - let ptr: *mut _ScriptRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScriptRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -5866,12 +5734,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -5933,7 +5802,8 @@ pub mod exports { #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_script_cabi() -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Script::new(T::new()); (result0).take_handle() as i32 } @@ -5943,7 +5813,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScriptBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -6081,7 +5952,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/unavi-ui/src/bindings.rs b/wasm/unavi-ui/src/bindings.rs index beaada838..c0af24011 100644 --- a/wasm/unavi-ui/src/bindings.rs +++ b/wasm/unavi-ui/src/bindings.rs @@ -6,7 +6,8 @@ pub mod unavi { pub mod container { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Node = super::super::super::wired::scene::node::Node; @@ -18,10 +19,7 @@ pub mod unavi { Start, } impl ::core::fmt::Debug for Alignment { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Alignment::Center => f.debug_tuple("Alignment::Center").finish(), Alignment::End => f.debug_tuple("Alignment::End").finish(), @@ -100,11 +98,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Container::from_handle(ret as u32) } } @@ -146,9 +140,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -169,9 +161,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -181,9 +171,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/container")] @@ -256,9 +244,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/container")] @@ -429,7 +415,8 @@ pub mod unavi { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; @@ -626,10 +613,7 @@ pub mod unavi { pub subdivisions: u8, } impl ::core::fmt::Debug for SphereIco { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereIco") .field("subdivisions", &self.subdivisions) .finish() @@ -642,10 +626,7 @@ pub mod unavi { pub stacks: u8, } impl ::core::fmt::Debug for SphereUv { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereUv") .field("sectors", &self.sectors) .field("stacks", &self.stacks) @@ -660,17 +641,10 @@ pub mod unavi { Uv(SphereUv), } impl ::core::fmt::Debug for SphereKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - SphereKind::Ico(e) => { - f.debug_tuple("SphereKind::Ico").field(e).finish() - } - SphereKind::Uv(e) => { - f.debug_tuple("SphereKind::Uv").field(e).finish() - } + SphereKind::Ico(e) => f.debug_tuple("SphereKind::Ico").field(e).finish(), + SphereKind::Uv(e) => f.debug_tuple("SphereKind::Uv").field(e).finish(), } } } @@ -752,10 +726,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -777,9 +748,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -794,10 +763,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -805,10 +771,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -819,11 +782,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -843,9 +802,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -865,9 +822,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -887,9 +842,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1003,9 +956,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1025,9 +976,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1047,9 +996,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1057,10 +1004,8 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(half_size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = half_size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = + half_size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -1082,9 +1027,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1099,10 +1042,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -1110,10 +1050,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_half_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -1124,11 +1061,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -1186,9 +1119,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1208,9 +1139,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1230,9 +1159,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1465,9 +1392,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1487,9 +1412,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1509,9 +1432,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1534,11 +1455,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Cuboid::from_handle(ret as u32) } } @@ -1549,9 +1466,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1619,9 +1534,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1641,9 +1554,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1663,9 +1574,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1750,9 +1659,7 @@ pub mod unavi { unsafe { #[repr(align(1))] struct RetArea([::core::mem::MaybeUninit; 3]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 3], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 3]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1799,11 +1706,16 @@ pub mod unavi { unsafe { let (result2_0, result2_1, result2_2) = match value { SphereKind::Ico(e) => { - let SphereIco { subdivisions: subdivisions0 } = e; + let SphereIco { + subdivisions: subdivisions0, + } = e; (0i32, _rt::as_i32(subdivisions0), 0i32) } SphereKind::Uv(e) => { - let SphereUv { sectors: sectors1, stacks: stacks1 } = e; + let SphereUv { + sectors: sectors1, + stacks: stacks1, + } = e; (1i32, _rt::as_i32(sectors1), _rt::as_i32(stacks1)) } }; @@ -1817,12 +1729,7 @@ pub mod unavi { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result2_0, - result2_1, - result2_2, - ); + wit_import((self).handle() as i32, result2_0, result2_1, result2_2); } } } @@ -1842,9 +1749,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1864,9 +1769,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1886,9 +1789,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1964,9 +1865,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1981,7 +1880,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -1991,10 +1891,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -2022,10 +1919,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -2042,10 +1936,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -2069,10 +1960,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -2094,10 +1982,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -2110,17 +1995,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -2130,17 +2008,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -2155,10 +2026,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -2171,7 +2039,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -2238,9 +2107,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -2856,7 +2723,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -2866,10 +2734,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -2920,7 +2785,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -2928,10 +2794,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -2946,10 +2809,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -2966,10 +2826,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -2986,10 +2843,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -3042,7 +2896,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -3067,7 +2925,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -3099,9 +2962,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -3113,7 +2989,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -3160,10 +3037,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -3177,20 +3051,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -3239,17 +3104,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -3284,7 +3142,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -3366,9 +3227,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3426,9 +3285,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3488,7 +3345,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -3499,10 +3357,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -3612,9 +3467,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3662,9 +3515,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3694,7 +3545,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -3720,7 +3576,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -3822,9 +3679,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -4024,9 +3879,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -4074,9 +3927,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -4140,10 +3991,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -4152,7 +4000,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -4260,9 +4109,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4310,9 +4157,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4346,9 +4191,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4421,9 +4264,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4473,9 +4314,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4600,9 +4439,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4660,9 +4497,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4720,9 +4555,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4780,9 +4613,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4847,12 +4678,14 @@ pub mod exports { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_update_ui_cabi(arg0: f32) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update_ui(arg0); } pub trait Guest { @@ -4873,9 +4706,11 @@ pub mod exports { pub mod button { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; - pub type Container = super::super::super::super::unavi::layout::container::Container; + pub type Container = + super::super::super::super::unavi::layout::container::Container; /// 3D interactable button. /// Fills the space of its root container. #[derive(Debug)] @@ -4893,9 +4728,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ButtonRep = Some(val); - let ptr: *mut _ButtonRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ButtonRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -4933,12 +4766,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -4999,10 +4833,9 @@ pub mod exports { } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_constructor_button_cabi( - arg0: i32, - ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_constructor_button_cabi(arg0: i32) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = Button::new( T::new( super::super::super::super::unavi::layout::container::Container::from_handle( @@ -5017,10 +4850,9 @@ pub mod exports { pub unsafe fn _export_method_button_root_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::root( - ButtonBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::root(ButtonBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -5028,10 +4860,9 @@ pub mod exports { pub unsafe fn _export_method_button_hovered_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::hovered( - ButtonBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::hovered(ButtonBorrow::lift(arg0 as u32 as usize).get()); match result0 { true => 1, false => 0, @@ -5042,10 +4873,9 @@ pub mod exports { pub unsafe fn _export_method_button_pressed_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::pressed( - ButtonBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::pressed(ButtonBorrow::lift(arg0 as u32 as usize).get()); match result0 { true => 1, false => 0, @@ -5135,10 +4965,13 @@ pub mod exports { pub mod text { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; - pub type Alignment = super::super::super::super::unavi::layout::container::Alignment; - pub type Container = super::super::super::super::unavi::layout::container::Container; + pub type Alignment = + super::super::super::super::unavi::layout::container::Alignment; + pub type Container = + super::super::super::super::unavi::layout::container::Container; pub type Material = super::super::super::super::wired::scene::material::Material; pub type Mesh = super::super::super::super::wired::scene::mesh::Mesh; #[derive(Debug)] @@ -5156,9 +4989,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _TextRep = Some(val); - let ptr: *mut _TextRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _TextRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -5196,12 +5027,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -5267,14 +5099,9 @@ pub mod exports { Word, } impl ::core::fmt::Debug for WordWrap { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - WordWrap::Character => { - f.debug_tuple("WordWrap::Character").finish() - } + WordWrap::Character => f.debug_tuple("WordWrap::Character").finish(), WordWrap::Word => f.debug_tuple("WordWrap::Word").finish(), } } @@ -5308,9 +5135,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _TextBoxRep = Some(val); - let ptr: *mut _TextBoxRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _TextBoxRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -5348,12 +5173,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -5418,7 +5244,8 @@ pub mod exports { arg0: *mut u8, arg1: usize, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let len0 = arg1; let bytes0 = _rt::Vec::from_raw_parts(arg0.cast(), len0, len0); let result1 = Text::new(T::new(_rt::string_lift(bytes0))); @@ -5426,10 +5253,9 @@ pub mod exports { } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_text_ref_cabi( - arg0: *mut u8, - ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_method_text_ref_cabi(arg0: *mut u8) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = T::ref_(TextBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } @@ -5441,7 +5267,8 @@ pub mod exports { arg2: *mut u8, arg3: usize, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_font( TextBorrow::lift(arg0 as u32 as usize).get(), match arg1 { @@ -5462,7 +5289,8 @@ pub mod exports { pub unsafe fn _export_method_text_text_cabi( arg0: *mut u8, ) -> *mut u8 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = T::text(TextBorrow::lift(arg0 as u32 as usize).get()); let ptr1 = _RET_AREA.0.as_mut_ptr().cast::(); let vec2 = (result0.into_bytes()).into_boxed_slice(); @@ -5475,9 +5303,7 @@ pub mod exports { } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn __post_return_method_text_text( - arg0: *mut u8, - ) { + pub unsafe fn __post_return_method_text_text(arg0: *mut u8) { let l0 = *arg0.add(0).cast::<*mut u8>(); let l1 = *arg0.add(4).cast::(); _rt::cabi_dealloc(l0, l1, 1); @@ -5489,7 +5315,8 @@ pub mod exports { arg1: *mut u8, arg2: usize, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let len0 = arg2; let bytes0 = _rt::Vec::from_raw_parts(arg1.cast(), len0, len0); T::set_text( @@ -5499,24 +5326,18 @@ pub mod exports { } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_text_align_x_cabi( - arg0: *mut u8, - ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::align_x( - TextBorrow::lift(arg0 as u32 as usize).get(), - ); + pub unsafe fn _export_method_text_align_x_cabi(arg0: *mut u8) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::align_x(TextBorrow::lift(arg0 as u32 as usize).get()); result0.clone() as i32 } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_text_align_y_cabi( - arg0: *mut u8, - ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::align_y( - TextBorrow::lift(arg0 as u32 as usize).get(), - ); + pub unsafe fn _export_method_text_align_y_cabi(arg0: *mut u8) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::align_y(TextBorrow::lift(arg0 as u32 as usize).get()); result0.clone() as i32 } #[doc(hidden)] @@ -5525,7 +5346,8 @@ pub mod exports { arg0: *mut u8, arg1: i32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_align_x( TextBorrow::lift(arg0 as u32 as usize).get(), super::super::super::super::unavi::layout::container::Alignment::_lift( @@ -5539,7 +5361,8 @@ pub mod exports { arg0: *mut u8, arg1: i32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_align_y( TextBorrow::lift(arg0 as u32 as usize).get(), super::super::super::super::unavi::layout::container::Alignment::_lift( @@ -5552,10 +5375,9 @@ pub mod exports { pub unsafe fn _export_method_text_font_size_cabi( arg0: *mut u8, ) -> f32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::font_size( - TextBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::font_size(TextBorrow::lift(arg0 as u32 as usize).get()); _rt::as_f32(result0) } #[doc(hidden)] @@ -5564,7 +5386,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_font_size(TextBorrow::lift(arg0 as u32 as usize).get(), arg1); } #[doc(hidden)] @@ -5572,10 +5395,9 @@ pub mod exports { pub unsafe fn _export_method_text_thickness_cabi( arg0: *mut u8, ) -> f32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::thickness( - TextBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::thickness(TextBorrow::lift(arg0 as u32 as usize).get()); _rt::as_f32(result0) } #[doc(hidden)] @@ -5584,7 +5406,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_thickness(TextBorrow::lift(arg0 as u32 as usize).get(), arg1); } #[doc(hidden)] @@ -5592,10 +5415,9 @@ pub mod exports { pub unsafe fn _export_method_text_material_cabi( arg0: *mut u8, ) -> *mut u8 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::material( - TextBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::material(TextBorrow::lift(arg0 as u32 as usize).get()); let ptr1 = _RET_AREA.0.as_mut_ptr().cast::(); match result0 { Some(e) => { @@ -5615,7 +5437,8 @@ pub mod exports { arg1: i32, arg2: i32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let handle0; T::set_material( TextBorrow::lift(arg0 as u32 as usize).get(), @@ -5636,19 +5459,17 @@ pub mod exports { } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_text_mesh_cabi( - arg0: *mut u8, - ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_method_text_mesh_cabi(arg0: *mut u8) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = T::mesh(TextBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_constructor_text_box_cabi( - arg0: i32, - ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + pub unsafe fn _export_constructor_text_box_cabi(arg0: i32) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let result0 = TextBox::new( T::new( super::super::super::super::unavi::layout::container::Container::from_handle( @@ -5663,10 +5484,9 @@ pub mod exports { pub unsafe fn _export_method_text_box_root_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::root( - TextBoxBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::root(TextBoxBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -5674,10 +5494,9 @@ pub mod exports { pub unsafe fn _export_method_text_box_text_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::text( - TextBoxBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::text(TextBoxBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -5687,7 +5506,8 @@ pub mod exports { arg1: *mut u8, arg2: usize, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let len0 = arg2; let bytes0 = _rt::Vec::from_raw_parts(arg1.cast(), len0, len0); T::set_text( @@ -5700,10 +5520,9 @@ pub mod exports { pub unsafe fn _export_method_text_box_wrap_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::wrap( - TextBoxBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::wrap(TextBoxBorrow::lift(arg0 as u32 as usize).get()); result0.clone() as i32 } #[doc(hidden)] @@ -5712,7 +5531,8 @@ pub mod exports { arg0: *mut u8, arg1: i32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_wrap( TextBoxBorrow::lift(arg0 as u32 as usize).get(), WordWrap::_lift(arg1 as u8), @@ -5951,9 +5771,7 @@ pub mod exports { pub(crate) use __export_unavi_ui_text_cabi; #[repr(align(4))] struct _RetArea([::core::mem::MaybeUninit; 8]); - static mut _RET_AREA: _RetArea = _RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + static mut _RET_AREA: _RetArea = _RetArea([::core::mem::MaybeUninit::uninit(); 8]); } } } @@ -6020,7 +5838,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { diff --git a/wasm/unavi-vscreen/src/bindings.rs b/wasm/unavi-vscreen/src/bindings.rs index 02fae36fc..a4eca2221 100644 --- a/wasm/unavi-vscreen/src/bindings.rs +++ b/wasm/unavi-vscreen/src/bindings.rs @@ -6,7 +6,8 @@ pub mod unavi { pub mod container { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Node = super::super::super::wired::scene::node::Node; @@ -18,10 +19,7 @@ pub mod unavi { Start, } impl ::core::fmt::Debug for Alignment { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { Alignment::Center => f.debug_tuple("Alignment::Center").finish(), Alignment::End => f.debug_tuple("Alignment::End").finish(), @@ -100,11 +98,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Container::from_handle(ret as u32) } } @@ -146,9 +140,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -169,9 +161,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -181,9 +171,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/container")] @@ -256,9 +244,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:layout/container")] @@ -429,7 +415,8 @@ pub mod unavi { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; @@ -626,10 +613,7 @@ pub mod unavi { pub subdivisions: u8, } impl ::core::fmt::Debug for SphereIco { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereIco") .field("subdivisions", &self.subdivisions) .finish() @@ -642,10 +626,7 @@ pub mod unavi { pub stacks: u8, } impl ::core::fmt::Debug for SphereUv { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("SphereUv") .field("sectors", &self.sectors) .field("stacks", &self.stacks) @@ -660,17 +641,10 @@ pub mod unavi { Uv(SphereUv), } impl ::core::fmt::Debug for SphereKind { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - SphereKind::Ico(e) => { - f.debug_tuple("SphereKind::Ico").field(e).finish() - } - SphereKind::Uv(e) => { - f.debug_tuple("SphereKind::Uv").field(e).finish() - } + SphereKind::Ico(e) => f.debug_tuple("SphereKind::Ico").field(e).finish(), + SphereKind::Uv(e) => f.debug_tuple("SphereKind::Uv").field(e).finish(), } } } @@ -752,10 +726,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -777,9 +748,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -794,10 +763,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -805,10 +771,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -819,11 +782,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -843,9 +802,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -865,9 +822,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -887,9 +842,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1003,9 +956,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1025,9 +976,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1047,9 +996,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1057,10 +1004,8 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn new(half_size: Vec2) -> Self { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = half_size; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = + half_size; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -1082,9 +1027,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1099,10 +1042,7 @@ pub mod unavi { wit_import((self).handle() as i32, ptr0); let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); - super::super::super::wired::math::types::Vec2 { - x: l1, - y: l2, - } + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } } } } @@ -1110,10 +1050,7 @@ pub mod unavi { #[allow(unused_unsafe, clippy::all)] pub fn set_half_size(&self, value: Vec2) { unsafe { - let super::super::super::wired::math::types::Vec2 { - x: x0, - y: y0, - } = value; + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] extern "C" { @@ -1124,11 +1061,7 @@ pub mod unavi { fn wit_import(_: i32, _: f32, _: f32) { unreachable!() } - wit_import( - (self).handle() as i32, - _rt::as_f32(x0), - _rt::as_f32(y0), - ); + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); } } } @@ -1186,9 +1119,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1208,9 +1139,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1230,9 +1159,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1465,9 +1392,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1487,9 +1412,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1509,9 +1432,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1534,11 +1455,7 @@ pub mod unavi { fn wit_import(_: f32, _: f32, _: f32) -> i32 { unreachable!() } - let ret = wit_import( - _rt::as_f32(x0), - _rt::as_f32(y0), - _rt::as_f32(z0), - ); + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); Cuboid::from_handle(ret as u32) } } @@ -1549,9 +1466,7 @@ pub mod unavi { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1619,9 +1534,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1641,9 +1554,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1663,9 +1574,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1750,9 +1659,7 @@ pub mod unavi { unsafe { #[repr(align(1))] struct RetArea([::core::mem::MaybeUninit; 3]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 3], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 3]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "unavi:shapes/api")] @@ -1799,11 +1706,16 @@ pub mod unavi { unsafe { let (result2_0, result2_1, result2_2) = match value { SphereKind::Ico(e) => { - let SphereIco { subdivisions: subdivisions0 } = e; + let SphereIco { + subdivisions: subdivisions0, + } = e; (0i32, _rt::as_i32(subdivisions0), 0i32) } SphereKind::Uv(e) => { - let SphereUv { sectors: sectors1, stacks: stacks1 } = e; + let SphereUv { + sectors: sectors1, + stacks: stacks1, + } = e; (1i32, _rt::as_i32(sectors1), _rt::as_i32(stacks1)) } }; @@ -1817,12 +1729,7 @@ pub mod unavi { fn wit_import(_: i32, _: i32, _: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - result2_0, - result2_1, - result2_2, - ); + wit_import((self).handle() as i32, result2_0, result2_1, result2_2); } } } @@ -1842,9 +1749,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::mesh::Mesh::from_handle( - ret as u32, - ) + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) } } } @@ -1864,9 +1769,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1886,9 +1789,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1964,9 +1865,7 @@ pub mod unavi { unreachable!() } let ret = wit_import((self).handle() as i32); - super::super::super::wired::scene::node::Node::from_handle( - ret as u32, - ) + super::super::super::wired::scene::node::Node::from_handle(ret as u32) } } } @@ -1981,7 +1880,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Quat = super::super::super::wired::math::types::Quat; #[repr(u8)] @@ -1991,10 +1891,7 @@ pub mod wired { Right, } impl ::core::fmt::Debug for HandSide { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { HandSide::Left => f.debug_tuple("HandSide::Left").finish(), HandSide::Right => f.debug_tuple("HandSide::Right").finish(), @@ -2022,10 +1919,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for Joint { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Joint") .field("translation", &self.translation) .field("rotation", &self.rotation) @@ -2042,10 +1936,7 @@ pub mod wired { pub metacarpal: Joint, } impl ::core::fmt::Debug for Finger { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Finger") .field("tip", &self.tip) .field("distal", &self.distal) @@ -2069,10 +1960,7 @@ pub mod wired { pub elbow: Option, } impl ::core::fmt::Debug for Hand { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Hand") .field("side", &self.side) .field("thumb", &self.thumb) @@ -2094,10 +1982,7 @@ pub mod wired { pub origin: Vec3, } impl ::core::fmt::Debug for Ray { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Ray") .field("orientation", &self.orientation) .field("origin", &self.origin) @@ -2110,17 +1995,10 @@ pub mod wired { Ray(Ray), } impl ::core::fmt::Debug for InputData { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputData::Hand(e) => { - f.debug_tuple("InputData::Hand").field(e).finish() - } - InputData::Ray(e) => { - f.debug_tuple("InputData::Ray").field(e).finish() - } + InputData::Hand(e) => f.debug_tuple("InputData::Hand").field(e).finish(), + InputData::Ray(e) => f.debug_tuple("InputData::Ray").field(e).finish(), } } } @@ -2130,17 +2008,10 @@ pub mod wired { Hover, } impl ::core::fmt::Debug for InputAction { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - InputAction::Collision => { - f.debug_tuple("InputAction::Collision").finish() - } - InputAction::Hover => { - f.debug_tuple("InputAction::Hover").finish() - } + InputAction::Collision => f.debug_tuple("InputAction::Collision").finish(), + InputAction::Hover => f.debug_tuple("InputAction::Hover").finish(), } } } @@ -2155,10 +2026,7 @@ pub mod wired { pub data: InputData, } impl ::core::fmt::Debug for InputEvent { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("InputEvent") .field("id", &self.id) .field("action", &self.action) @@ -2171,7 +2039,8 @@ pub mod wired { pub mod handler { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type InputEvent = super::super::super::wired::input::types::InputEvent; #[derive(Debug)] @@ -2238,9 +2107,7 @@ pub mod wired { unsafe { #[repr(align(8))] struct RetArea([::core::mem::MaybeUninit; 768]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 768], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 768]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:input/handler")] @@ -2856,7 +2723,8 @@ pub mod wired { pub mod api { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(u8)] #[derive(Clone, Copy, Eq, PartialEq)] pub enum LogLevel { @@ -2866,10 +2734,7 @@ pub mod wired { Error, } impl ::core::fmt::Debug for LogLevel { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { LogLevel::Debug => f.debug_tuple("LogLevel::Debug").finish(), LogLevel::Info => f.debug_tuple("LogLevel::Info").finish(), @@ -2920,7 +2785,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] pub struct Vec2 { @@ -2928,10 +2794,7 @@ pub mod wired { pub y: f32, } impl ::core::fmt::Debug for Vec2 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec2") .field("x", &self.x) .field("y", &self.y) @@ -2946,10 +2809,7 @@ pub mod wired { pub z: f32, } impl ::core::fmt::Debug for Vec3 { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Vec3") .field("x", &self.x) .field("y", &self.y) @@ -2966,10 +2826,7 @@ pub mod wired { pub w: f32, } impl ::core::fmt::Debug for Quat { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x) .field("y", &self.y) @@ -2986,10 +2843,7 @@ pub mod wired { pub translation: Vec3, } impl ::core::fmt::Debug for Transform { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Transform") .field("rotation", &self.rotation) .field("scale", &self.scale) @@ -3042,7 +2896,11 @@ pub mod wired { let l1 = *ptr0.add(0).cast::(); let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); - Vec3 { x: l1, y: l2, z: l3 } + Vec3 { + x: l1, + y: l2, + z: l3, + } } } #[allow(unused_unsafe, clippy::all)] @@ -3067,7 +2925,12 @@ pub mod wired { let l2 = *ptr0.add(4).cast::(); let l3 = *ptr0.add(8).cast::(); let l4 = *ptr0.add(12).cast::(); - Quat { x: l1, y: l2, z: l3, w: l4 } + Quat { + x: l1, + y: l2, + z: l3, + w: l4, + } } } #[allow(unused_unsafe, clippy::all)] @@ -3099,9 +2962,22 @@ pub mod wired { let l9 = *ptr0.add(32).cast::(); let l10 = *ptr0.add(36).cast::(); Transform { - rotation: Quat { x: l1, y: l2, z: l3, w: l4 }, - scale: Vec3 { x: l5, y: l6, z: l7 }, - translation: Vec3 { x: l8, y: l9, z: l10 }, + rotation: Quat { + x: l1, + y: l2, + z: l3, + w: l4, + }, + scale: Vec3 { + x: l5, + y: l6, + z: l7, + }, + translation: Vec3 { + x: l8, + y: l9, + z: l10, + }, } } } @@ -3113,7 +2989,8 @@ pub mod wired { pub mod types { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Vec3 = super::super::super::wired::math::types::Vec3; #[derive(Debug)] @@ -3160,10 +3037,7 @@ pub mod wired { pub radius: f32, } impl ::core::fmt::Debug for ShapeCylinder { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("ShapeCylinder") .field("height", &self.height) .field("radius", &self.radius) @@ -3177,20 +3051,11 @@ pub mod wired { Sphere(f32), } impl ::core::fmt::Debug for Shape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - Shape::Cuboid(e) => { - f.debug_tuple("Shape::Cuboid").field(e).finish() - } - Shape::Cylinder(e) => { - f.debug_tuple("Shape::Cylinder").field(e).finish() - } - Shape::Sphere(e) => { - f.debug_tuple("Shape::Sphere").field(e).finish() - } + Shape::Cuboid(e) => f.debug_tuple("Shape::Cuboid").field(e).finish(), + Shape::Cylinder(e) => f.debug_tuple("Shape::Cylinder").field(e).finish(), + Shape::Sphere(e) => f.debug_tuple("Shape::Sphere").field(e).finish(), } } } @@ -3239,17 +3104,10 @@ pub mod wired { Kinematic, } impl ::core::fmt::Debug for RigidBodyType { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { - RigidBodyType::Dynamic => { - f.debug_tuple("RigidBodyType::Dynamic").finish() - } - RigidBodyType::Fixed => { - f.debug_tuple("RigidBodyType::Fixed").finish() - } + RigidBodyType::Dynamic => f.debug_tuple("RigidBodyType::Dynamic").finish(), + RigidBodyType::Fixed => f.debug_tuple("RigidBodyType::Fixed").finish(), RigidBodyType::Kinematic => { f.debug_tuple("RigidBodyType::Kinematic").finish() } @@ -3284,7 +3142,10 @@ pub mod wired { (0i32, _rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)) } Shape::Cylinder(e) => { - let ShapeCylinder { height: height1, radius: radius1 } = e; + let ShapeCylinder { + height: height1, + radius: radius1, + } = e; (1i32, _rt::as_f32(height1), _rt::as_f32(radius1), 0.0f32) } Shape::Sphere(e) => (2i32, _rt::as_f32(e), 0.0f32, 0.0f32), @@ -3366,9 +3227,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3426,9 +3285,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 12]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 12], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:physics/types")] @@ -3488,7 +3345,8 @@ pub mod wired { pub mod material { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[repr(C)] #[derive(Clone, Copy)] @@ -3499,10 +3357,7 @@ pub mod wired { pub a: f32, } impl ::core::fmt::Debug for Color { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Color") .field("r", &self.r) .field("g", &self.g) @@ -3612,9 +3467,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3662,9 +3515,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 16]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 16]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] @@ -3694,7 +3545,12 @@ pub mod wired { #[allow(unused_unsafe, clippy::all)] pub fn set_color(&self, value: Color) { unsafe { - let Color { r: r0, g: g0, b: b0, a: a0 } = value; + let Color { + r: r0, + g: g0, + b: b0, + a: a0, + } = value; #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/material")] extern "C" { @@ -3720,7 +3576,8 @@ pub mod wired { pub mod mesh { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Material = super::super::super::wired::scene::material::Material; #[derive(Debug)] @@ -3822,9 +3679,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -4024,9 +3879,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -4074,9 +3927,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/mesh")] @@ -4140,10 +3991,7 @@ pub mod wired { fn wit_import(_: i32, _: i32) { unreachable!() } - wit_import( - (self).handle() as i32, - (&value).take_handle() as i32, - ); + wit_import((self).handle() as i32, (&value).take_handle() as i32); } } } @@ -4152,7 +4000,8 @@ pub mod wired { pub mod node { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type InputHandler = super::super::super::wired::input::handler::InputHandler; @@ -4260,9 +4109,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4310,9 +4157,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4346,9 +4191,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4421,9 +4264,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4473,9 +4314,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 40]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 40], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 40]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4600,9 +4439,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4660,9 +4497,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4720,9 +4555,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4780,9 +4613,7 @@ pub mod wired { unsafe { #[repr(align(4))] struct RetArea([::core::mem::MaybeUninit; 8]); - let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link(wasm_import_module = "wired:scene/node")] @@ -4847,9 +4678,11 @@ pub mod exports { pub mod screen { #[used] #[doc(hidden)] - static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; + static __FORCE_SECTION_REF: fn() = + super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; - pub type Container = super::super::super::super::unavi::layout::container::Container; + pub type Container = + super::super::super::super::unavi::layout::container::Container; pub type Vec2 = super::super::super::super::wired::math::types::Vec2; #[derive(Clone, Copy)] pub enum ScreenShape { @@ -4857,10 +4690,7 @@ pub mod exports { Rectangle(Vec2), } impl ::core::fmt::Debug for ScreenShape { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { ScreenShape::Circle(e) => { f.debug_tuple("ScreenShape::Circle").field(e).finish() @@ -4888,9 +4718,7 @@ pub mod exports { pub fn new(val: T) -> Self { Self::type_guard::(); let val: _ScreenRep = Some(val); - let ptr: *mut _ScreenRep = _rt::Box::into_raw( - _rt::Box::new(val), - ); + let ptr: *mut _ScreenRep = _rt::Box::into_raw(_rt::Box::new(val)); unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } } /// Gets access to the underlying `T` which represents this resource. @@ -4928,12 +4756,13 @@ pub mod exports { use core::any::TypeId; static mut LAST_TYPE: Option = None; unsafe { - assert!(! cfg!(target_feature = "atomics")); + assert!(!cfg!(target_feature = "atomics")); let id = TypeId::of::(); match LAST_TYPE { Some(ty) => { assert!( - ty == id, "cannot use two types with this resource type" + ty == id, + "cannot use two types with this resource type" ) } None => LAST_TYPE = Some(id), @@ -4999,7 +4828,8 @@ pub mod exports { arg1: f32, arg2: f32, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); let v0 = match arg0 { 0 => { let e0 = arg1; @@ -5022,10 +4852,9 @@ pub mod exports { pub unsafe fn _export_method_screen_root_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::root( - ScreenBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::root(ScreenBorrow::lift(arg0 as u32 as usize).get()); (result0).take_handle() as i32 } #[doc(hidden)] @@ -5033,10 +4862,9 @@ pub mod exports { pub unsafe fn _export_method_screen_open_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::open( - ScreenBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::open(ScreenBorrow::lift(arg0 as u32 as usize).get()); match result0 { true => 1, false => 0, @@ -5048,7 +4876,8 @@ pub mod exports { arg0: *mut u8, arg1: i32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_open( ScreenBorrow::lift(arg0 as u32 as usize).get(), _rt::bool_lift(arg1 as u8), @@ -5059,10 +4888,9 @@ pub mod exports { pub unsafe fn _export_method_screen_visible_cabi( arg0: *mut u8, ) -> i32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::visible( - ScreenBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::visible(ScreenBorrow::lift(arg0 as u32 as usize).get()); match result0 { true => 1, false => 0, @@ -5074,7 +4902,8 @@ pub mod exports { arg0: *mut u8, arg1: i32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::set_visible( ScreenBorrow::lift(arg0 as u32 as usize).get(), _rt::bool_lift(arg1 as u8), @@ -5082,42 +4911,37 @@ pub mod exports { } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_screen_animation_duration_cabi< - T: GuestScreen, - >(arg0: *mut u8) -> f32 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::animation_duration( - ScreenBorrow::lift(arg0 as u32 as usize).get(), - ); + pub unsafe fn _export_method_screen_animation_duration_cabi( + arg0: *mut u8, + ) -> f32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = + T::animation_duration(ScreenBorrow::lift(arg0 as u32 as usize).get()); _rt::as_f32(result0) } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn _export_method_screen_set_animation_duration_cabi< - T: GuestScreen, - >(arg0: *mut u8, arg1: f32) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - T::set_animation_duration( - ScreenBorrow::lift(arg0 as u32 as usize).get(), - arg1, - ); + pub unsafe fn _export_method_screen_set_animation_duration_cabi( + arg0: *mut u8, + arg1: f32, + ) { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + T::set_animation_duration(ScreenBorrow::lift(arg0 as u32 as usize).get(), arg1); } #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_method_screen_children_cabi( arg0: *mut u8, ) -> *mut u8 { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = T::children( - ScreenBorrow::lift(arg0 as u32 as usize).get(), - ); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::children(ScreenBorrow::lift(arg0 as u32 as usize).get()); let ptr1 = _RET_AREA.0.as_mut_ptr().cast::(); let vec2 = result0; let len2 = vec2.len(); - let layout2 = _rt::alloc::Layout::from_size_align_unchecked( - vec2.len() * 4, - 4, - ); + let layout2 = _rt::alloc::Layout::from_size_align_unchecked(vec2.len() * 4, 4); let result2 = if layout2.size() != 0 { let ptr = _rt::alloc::alloc(layout2).cast::(); if ptr.is_null() { @@ -5125,7 +4949,9 @@ pub mod exports { } ptr } else { - { ::core::ptr::null_mut() } + { + ::core::ptr::null_mut() + } }; for (i, e) in vec2.into_iter().enumerate() { let base = result2.add(i * 4); @@ -5139,9 +4965,7 @@ pub mod exports { } #[doc(hidden)] #[allow(non_snake_case)] - pub unsafe fn __post_return_method_screen_children( - arg0: *mut u8, - ) { + pub unsafe fn __post_return_method_screen_children(arg0: *mut u8) { let l0 = *arg0.add(0).cast::<*mut u8>(); let l1 = *arg0.add(4).cast::(); let base2 = l0; @@ -5154,7 +4978,8 @@ pub mod exports { arg0: *mut u8, arg1: i32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::add_child( ScreenBorrow::lift(arg0 as u32 as usize).get(), ScreenBorrow::lift(arg1 as u32 as usize), @@ -5166,7 +4991,8 @@ pub mod exports { arg0: *mut u8, arg1: i32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::remove_child( ScreenBorrow::lift(arg0 as u32 as usize).get(), ScreenBorrow::lift(arg1 as u32 as usize), @@ -5178,7 +5004,8 @@ pub mod exports { arg0: *mut u8, arg1: f32, ) { - #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); T::update(ScreenBorrow::lift(arg0 as u32 as usize).get(), arg1); } pub trait Guest { @@ -5318,9 +5145,7 @@ pub mod exports { pub(crate) use __export_unavi_vscreen_screen_cabi; #[repr(align(4))] struct _RetArea([::core::mem::MaybeUninit; 8]); - static mut _RET_AREA: _RetArea = _RetArea( - [::core::mem::MaybeUninit::uninit(); 8], - ); + static mut _RET_AREA: _RetArea = _RetArea([::core::mem::MaybeUninit::uninit(); 8]); } } } @@ -5387,7 +5212,9 @@ mod _rt { } impl fmt::Debug for Resource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource").field("handle", &self.handle).finish() + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() } } impl Drop for Resource { From 49378b575bc14cc44221a8e61821a96f2d1f533f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 22:21:23 +0000 Subject: [PATCH 2/2] Bump surrealdb from 2.0.2 to 2.0.4 Bumps [surrealdb](https://github.com/surrealdb/surrealdb) from 2.0.2 to 2.0.4. - [Release notes](https://github.com/surrealdb/surrealdb/releases) - [Changelog](https://github.com/surrealdb/surrealdb/blob/main/release.toml) - [Commits](https://github.com/surrealdb/surrealdb/compare/v2.0.2...v2.0.4) --- updated-dependencies: - dependency-name: surrealdb dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.lock | 25 +++++++++++-------------- Cargo.toml | 2 +- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 234942675..cf8911e75 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2083,7 +2083,7 @@ dependencies = [ "bitflags 2.6.0", "cexpr", "clang-sys", - "itertools 0.12.1", + "itertools 0.13.0", "proc-macro2", "quote", "regex", @@ -9320,9 +9320,9 @@ dependencies = [ [[package]] name = "reblessive" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568fde39e6aec674be99c9dd38b4c79040faf31038bd5a41ab1908db00c2319b" +checksum = "1d4f118ca848dfd632a8c0883f9aacd6b58da548eb0629a78cafee3d330938da" [[package]] name = "rectangle-pack" @@ -11261,9 +11261,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "surrealdb" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39763f42366823f524ded4e423420fe990352a18665f00151521ea49f590d33e" +checksum = "300749e641e2a5546a142333d91b3537969e9c4cbd1fa2d1d10d92f01624d470" dependencies = [ "arrayvec 0.7.4", "async-channel 1.9.0", @@ -11298,9 +11298,9 @@ dependencies = [ [[package]] name = "surrealdb-core" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12d8339a5d2968dedee86705482becc6a6181a07cc30ed2e674526a81bd7389e" +checksum = "5795fca60f099754934069dfb3d20824cfec94b4c13c7130d1cd52e0fcadfc42" dependencies = [ "addr", "ahash 0.8.11", @@ -11395,9 +11395,9 @@ dependencies = [ [[package]] name = "surrealkv" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ac63abeb621f728a556d63004756b70ff6dd9b9805c4d8e2e26c16bbed6097" +checksum = "f7d5229be1d8f2500842c02549665735ae3cf6265ba5afd0eab44fae7397e1b4" dependencies = [ "ahash 0.8.11", "async-channel 2.3.1", @@ -12556,12 +12556,9 @@ checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" [[package]] name = "vart" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e19cf5555815b1ebc839ceb17face450eb0346e09c0acc6ad0e3097ec49dcad" -dependencies = [ - "hashbrown 0.14.5", -] +checksum = "dd6bd87feca9f16f8ad061a454246178acd32881d188262ec377d4e170d63503" [[package]] name = "vcpkg" diff --git a/Cargo.toml b/Cargo.toml index 2630cbd6d..372e019b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ reqwest = "0.12.5" semver = "1.0.22" serde = { version = "1.0.197", features = ["derive"] } serde_json = "1.0.115" -surrealdb = { version = "2.0.2", default-features = false } +surrealdb = { version = "2.0.4", default-features = false } thiserror = "1.0.61" tokio = { version = "1.40.0", features = ["macros", "rt", "time"] } tracing = "0.1.40"