wasm builds
This commit is contained in:
@@ -2,6 +2,9 @@ mod utils;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
use crate::instance::Instance;
|
||||
use crate::error::MizeResult;
|
||||
|
||||
// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
|
||||
// allocator.
|
||||
#[cfg(feature = "wee_alloc")]
|
||||
@@ -17,3 +20,10 @@ extern {
|
||||
pub fn greet() {
|
||||
alert("Hello, wasm-game-of-life!");
|
||||
}
|
||||
|
||||
pub fn wasm_instance_init(instance: &mut Instance) -> MizeResult<()> {
|
||||
println!("Hello world from wasm_instance_init!!!!!!!!!!");
|
||||
alert("Hello world from wasm_instance_init!!!!!!!!!!");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user