wasm builds

This commit is contained in:
Sebastian Moser
2024-08-27 11:50:18 +02:00
parent 39cf7f5ee3
commit 31e071078a
8 changed files with 36 additions and 13 deletions

View File

@@ -316,7 +316,7 @@ impl MinimalTracer {
pub fn register() -> Result<(), tracing::subscriber::SetGlobalDefaultError> {
let mut enabled = true;
let mut span_names_to_enable = Vec::new();
let mut my_level = Level::INFO;
let mut my_level = Level::ERROR;
let mut filters: Vec<LogFilter> = Vec::with_capacity(10);
if let Ok(env_value) = env::var("RUST_LOG") {

View File

@@ -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(())
}