This commit is contained in:
velzie 2024-07-14 23:17:57 -04:00 committed by Percs
parent a7cbca42d1
commit 6cc293b453
10 changed files with 1050 additions and 91 deletions

17
rewriter/src/lib.rs Normal file
View file

@ -0,0 +1,17 @@
pub mod rewrite;
use rewrite::rewrite;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen(js_namespace = console)]
fn log(s: &str);
}
#[wasm_bindgen]
pub fn rewrite_js(js: &str) -> String {
log("hello from rust");
rewrite(js)
}