qualia_core_db/wgsl_forge/
runtime.rs1use super::ForgeError;
2use std::path::PathBuf;
3pub struct ForgeRuntime(etalon_wgsl_forge::numerical::ForgeRuntime);
4impl ForgeRuntime {
5 pub fn new(capacity_bytes: usize, cache_dir: Option<PathBuf>) -> Result<Self, ForgeError> {
6 #[cfg(not(target_arch = "wasm32"))]
7 super::install_device_policy();
8 etalon_wgsl_forge::numerical::ForgeRuntime::new(capacity_bytes, cache_dir).map(Self)
9 }
10}
11impl std::ops::Deref for ForgeRuntime {
12 type Target = etalon_wgsl_forge::numerical::ForgeRuntime;
13 fn deref(&self) -> &Self::Target {
14 &self.0
15 }
16}
17impl std::ops::DerefMut for ForgeRuntime {
18 fn deref_mut(&mut self) -> &mut Self::Target {
19 &mut self.0
20 }
21}