| Crates.io | javy-codegen |
| lib.rs | javy-codegen |
| version | 2.0.0 |
| created_at | 2025-03-10 14:57:55.609372+00 |
| updated_at | 2025-08-29 17:35:51.416508+00 |
| description | Wasm generation library for use with Javy |
| homepage | https://github.com/bytecodealliance/javy/tree/main/crates/codegen |
| repository | https://github.com/bytecodealliance/javy/tree/main/crates/codegen |
| max_upload_size | |
| id | 1586807 |
| size | 158,462 |
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)?;
}