commit f4a3d88eb3cb8c8d927662106c29c9d55d4d042b
Author: triesap <tyson@radroots.org>
Date: Sun, 15 Feb 2026 17:30:58 +0000
Initial commit
Diffstat:
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/core/crates/tera_wasm/Cargo.toml b/core/crates/tera_wasm/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+name = "radroots_app_wasm"
+description = "WebAssembly bindings for Radroots web apps"
+version.workspace = true
+edition.workspace = true
+authors = ["Radroots Authors"]
+rust-version.workspace = true
+license.workspace = true
+
+[lib]
+crate-type = ["cdylib", "rlib"]
+
+[dependencies]
+radroots_app_core = { workspace = true, default-features = false }
+wasm-bindgen = { workspace = true }
diff --git a/core/crates/tera_wasm/src/lib.rs b/core/crates/tera_wasm/src/lib.rs
@@ -0,0 +1,15 @@
+#![forbid(unsafe_code)]
+
+use wasm_bindgen::prelude::wasm_bindgen;
+
+#[wasm_bindgen]
+pub fn app_wasm_build_info_json() -> String {
+ let runtime = match radroots_app_core::RadrootsRuntime::new() {
+ Ok(runtime) => runtime,
+ Err(err) => {
+ return format!(r#"{{\"error\":\"runtime init failed: {}\"}}"#, err);
+ }
+ };
+
+ runtime.info_json()
+}