kotobas_wasm/lib.rs
1use wasm_bindgen::prelude::*;
2
3#[cfg(feature = "wee_alloc")]
4#[global_allocator]
5static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
6
7/// Compiles KotobaScript code to TSX code.
8#[wasm_bindgen]
9pub fn compile(code: &str) -> Result<String, JsValue> {
10 // Temporarily disabled the actual compilation logic to isolate build issues.
11 // This will just return a placeholder string.
12 Ok(format!("/* Compiled from KotobaScript (length: {}): */", code.len()))
13}