1 stable release
new 1.0.0 | Mar 10, 2025 |
---|
#1620 in WebAssembly
47 downloads per month
48KB
902 lines
Refer to the crate level documentation to learn more.
Example usage:
use std::path::Path;
use javy_codegen::{Generator, LinkingKind, Plugin, JS};
fn main() {
// Load your target Javascript.
let js = JS::from_file(Path::new("example.js"));
// Load existing pre-initialized Javy plugin.
let plugin = Plugin::new_from_path(Path::new("example-plugin.wasm"));
// Configure code generator.
let mut generator = Generator::new();
generator.plugin(plugin);
generator.linking(LinkingKind::Static);
// Generate your Wasm module.
let wasm = generator.generate(&js)?;
}
Dependencies
~83MB
~1.5M SLoC