From 9eed6994ad27cb0f5f9f8e1ba37ed18a8b1b4701 Mon Sep 17 00:00:00 2001 From: Jan Hohenheim Date: Sun, 18 Feb 2024 22:09:39 +0100 Subject: [PATCH] Fix consumer's Wasm build being broken --- Cargo.lock | 4 ++-- crates/compiler/Cargo.toml | 5 ++++- demo/Cargo.toml | 4 ---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1284fc9a..bcb0c766 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1120,7 +1120,6 @@ dependencies = [ "bevy_sprite3d", "bevy_yarnspinner", "bevy_yarnspinner_example_dialogue_view", - "instant", ] [[package]] @@ -4627,12 +4626,13 @@ dependencies = [ [[package]] name = "yarnspinner_compiler" -version = "0.2.0" +version = "0.2.1" dependencies = [ "annotate-snippets", "antlr-rust", "better_any", "bevy", + "instant", "rand", "regex", "serde", diff --git a/crates/compiler/Cargo.toml b/crates/compiler/Cargo.toml index a5be7c79..d63a2a00 100644 --- a/crates/compiler/Cargo.toml +++ b/crates/compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yarnspinner_compiler" -version = "0.2.0" +version = "0.2.1" edition = "2021" repository = "https://github.com/YarnSpinnerTool/YarnSpinner-Rust" homepage = "https://docs.yarnspinner.dev/" @@ -26,3 +26,6 @@ annotate-snippets = "0.10" serde = { version = "1", features = ["derive"], optional = true } bevy = { version = "0.13", default-features = false, optional = true } rand = { version = "0.8", features = ["small_rng"] } + +[target.'cfg(target_arch = "wasm32")'.dependencies] +instant = { version = "0.1.12", features = ["wasm-bindgen"] } # see https://github.com/Amanieu/parking_lot/issues/269, pulled in by (unmaintained) anltr-rust diff --git a/demo/Cargo.toml b/demo/Cargo.toml index 3566516c..0c426163 100644 --- a/demo/Cargo.toml +++ b/demo/Cargo.toml @@ -15,7 +15,3 @@ bevy = "0.13" bevy_yarnspinner = { path = "../crates/bevy_plugin", version = "0.2" } bevy_yarnspinner_example_dialogue_view = { path = "../crates/example_dialogue_view", version = "0.2" } bevy_sprite3d = { git = "https://github.com/vertesians/bevy_sprite3d", branch = "main" } # waiting for https://github.com/FraserLee/bevy_sprite3d/pull/15 to be merged - - -[target.'cfg(target_arch = "wasm32")'.dependencies] -instant = { version = "0.1.12", features = ["wasm-bindgen"] } # see https://github.com/rustwasm/wasm-bindgen/discussions/3500#discussioncomment-6334669