D(Some(f))
}
-#[repr(transparent)]
+#[cfg_attr(not(target_arch = "wasm32"), repr(transparent))]
+#[derive(Debug)]
pub struct JodChild(pub std::process::Child);
impl ops::Deref for JodChild {
impl JodChild {
pub fn into_inner(self) -> std::process::Child {
- // SAFETY: repr transparent
+ if cfg!(target_arch = "wasm32") {
+ panic!("no processes on wasm");
+ }
+ // SAFETY: repr transparent, except on WASM
unsafe { std::mem::transmute::<JodChild, std::process::Child>(self) }
}
}