web: Bump `wasm-bindgen` to 0.2.83
This reverts commitcf721d45f9
and restores commit084b252030
, this time without updating `web-sys`, due to being coupled to `wgpu`.
This commit is contained in:
parent
4828a9c5cf
commit
1954f6162f
|
@ -318,7 +318,7 @@ jobs:
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: install
|
command: install
|
||||||
args: wasm-bindgen-cli --version 0.2.82
|
args: wasm-bindgen-cli --version 0.2.83
|
||||||
|
|
||||||
- name: Setup conda
|
- name: Setup conda
|
||||||
uses: conda-incubator/setup-miniconda@v2
|
uses: conda-incubator/setup-miniconda@v2
|
||||||
|
|
|
@ -60,7 +60,7 @@ jobs:
|
||||||
# wasm-bindgen-cli version must match wasm-bindgen crate version.
|
# wasm-bindgen-cli version must match wasm-bindgen crate version.
|
||||||
# Be sure to update in release_nightly.yml, web/Cargo.toml and web/README.md.
|
# Be sure to update in release_nightly.yml, web/Cargo.toml and web/README.md.
|
||||||
- name: Install wasm-bindgen
|
- name: Install wasm-bindgen
|
||||||
run: cargo install wasm-bindgen-cli --version 0.2.82
|
run: cargo install wasm-bindgen-cli --version 0.2.83
|
||||||
|
|
||||||
- name: Setup conda
|
- name: Setup conda
|
||||||
uses: conda-incubator/setup-miniconda@v2
|
uses: conda-incubator/setup-miniconda@v2
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -50,7 +50,7 @@ rustversion = "1.0.9"
|
||||||
version = "0.3.24"
|
version = "0.3.24"
|
||||||
|
|
||||||
[target.'cfg(target_family = "wasm")'.dependencies.wasm-bindgen-futures]
|
[target.'cfg(target_family = "wasm")'.dependencies.wasm-bindgen-futures]
|
||||||
version = "0.4.32"
|
version = "0.4.33"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|
|
@ -15,7 +15,7 @@ smallvec = { version = "1.9.0", features = ["union"] }
|
||||||
downcast-rs = "1.2.0"
|
downcast-rs = "1.2.0"
|
||||||
lyon = { version = "1.0.0", optional = true }
|
lyon = { version = "1.0.0", optional = true }
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
wasm-bindgen = { version = "=0.2.82", optional = true }
|
wasm-bindgen = { version = "=0.2.83", optional = true }
|
||||||
|
|
||||||
[dependencies.jpeg-decoder]
|
[dependencies.jpeg-decoder]
|
||||||
version = "0.2.6"
|
version = "0.2.6"
|
||||||
|
|
|
@ -6,10 +6,10 @@ edition = "2021"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
js-sys = "0.3.59"
|
js-sys = "0.3.60"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
ruffle_web_common = { path = "../../web/common" }
|
ruffle_web_common = { path = "../../web/common" }
|
||||||
wasm-bindgen = "=0.2.82"
|
wasm-bindgen = "=0.2.83"
|
||||||
fnv = "1.0.7"
|
fnv = "1.0.7"
|
||||||
ruffle_render = { path = "..", features = ["web"] }
|
ruffle_render = { path = "..", features = ["web"] }
|
||||||
swf = { path = "../../swf" }
|
swf = { path = "../../swf" }
|
||||||
|
|
|
@ -6,11 +6,11 @@ edition = "2021"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
js-sys = "0.3.59"
|
js-sys = "0.3.60"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
ruffle_web_common = { path = "../../web/common" }
|
ruffle_web_common = { path = "../../web/common" }
|
||||||
ruffle_render = { path = "..", features = ["tessellator", "web"] }
|
ruffle_render = { path = "..", features = ["tessellator", "web"] }
|
||||||
wasm-bindgen = "=0.2.82"
|
wasm-bindgen = "=0.2.83"
|
||||||
bytemuck = { version = "1.12.1", features = ["derive"] }
|
bytemuck = { version = "1.12.1", features = ["derive"] }
|
||||||
fnv = "1.0.7"
|
fnv = "1.0.7"
|
||||||
swf = { path = "../../swf" }
|
swf = { path = "../../swf" }
|
||||||
|
|
|
@ -30,7 +30,7 @@ wgpu-webgl = ["ruffle_render_wgpu", "ruffle_render_wgpu/webgl"]
|
||||||
console_error_panic_hook = { version = "0.1.7", optional = true }
|
console_error_panic_hook = { version = "0.1.7", optional = true }
|
||||||
console_log = { version = "0.2", optional = true }
|
console_log = { version = "0.2", optional = true }
|
||||||
generational-arena = "0.2.8"
|
generational-arena = "0.2.8"
|
||||||
js-sys = "0.3.59"
|
js-sys = "0.3.60"
|
||||||
log = { version = "0.4", features = ["serde"] }
|
log = { version = "0.4", features = ["serde"] }
|
||||||
ruffle_render_canvas = { path = "../render/canvas", optional = true }
|
ruffle_render_canvas = { path = "../render/canvas", optional = true }
|
||||||
ruffle_web_common = { path = "common" }
|
ruffle_web_common = { path = "common" }
|
||||||
|
@ -38,8 +38,9 @@ ruffle_render_webgl = { path = "../render/webgl", optional = true }
|
||||||
ruffle_render_wgpu = { path = "../render/wgpu", optional = true }
|
ruffle_render_wgpu = { path = "../render/wgpu", optional = true }
|
||||||
ruffle_video_software = { path = "../video/software" }
|
ruffle_video_software = { path = "../video/software" }
|
||||||
url = "2.3.1"
|
url = "2.3.1"
|
||||||
wasm-bindgen = { version = "=0.2.82", features = ["serde-serialize"] }
|
wasm-bindgen = "=0.2.83"
|
||||||
wasm-bindgen-futures = "0.4.32"
|
wasm-bindgen-futures = "0.4.32"
|
||||||
|
serde-wasm-bindgen = "0.4.3"
|
||||||
chrono = { version = "0.4", features = ["wasmbind"] }
|
chrono = { version = "0.4", features = ["wasmbind"] }
|
||||||
getrandom = { version = "0.2", features = ["js"] }
|
getrandom = { version = "0.2", features = ["js"] }
|
||||||
serde = { version = "1.0.144", features = ["derive"] }
|
serde = { version = "1.0.144", features = ["derive"] }
|
||||||
|
|
|
@ -58,7 +58,7 @@ Note that npm 7 or newer is required. It should come bundled with Node.js 15 or
|
||||||
|
|
||||||
<!-- Be sure to also update the wasm-bindgen-cli version in `.github/workflows/*.yml` and `web/Cargo.toml`. -->
|
<!-- Be sure to also update the wasm-bindgen-cli version in `.github/workflows/*.yml` and `web/Cargo.toml`. -->
|
||||||
|
|
||||||
This can be installed with `cargo install wasm-bindgen-cli --version 0.2.82`. Be sure to install this specific version of `wasm-bindgen-cli` to match the version used by Ruffle.
|
This can be installed with `cargo install wasm-bindgen-cli --version 0.2.83`. Be sure to install this specific version of `wasm-bindgen-cli` to match the version used by Ruffle.
|
||||||
|
|
||||||
#### Binaryen
|
#### Binaryen
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@ edition = "2021"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
js-sys = "0.3.59"
|
js-sys = "0.3.60"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
wasm-bindgen = "=0.2.82"
|
wasm-bindgen = "=0.2.83"
|
||||||
|
|
||||||
[dependencies.web-sys]
|
[dependencies.web-sys]
|
||||||
version = "0.3.58"
|
version = "0.3.58"
|
||||||
|
|
|
@ -204,8 +204,8 @@ pub struct Ruffle(Index);
|
||||||
impl Ruffle {
|
impl Ruffle {
|
||||||
#[allow(clippy::new_ret_no_self)]
|
#[allow(clippy::new_ret_no_self)]
|
||||||
#[wasm_bindgen(constructor)]
|
#[wasm_bindgen(constructor)]
|
||||||
pub fn new(parent: HtmlElement, js_player: JavascriptPlayer, config: &JsValue) -> Promise {
|
pub fn new(parent: HtmlElement, js_player: JavascriptPlayer, config: JsValue) -> Promise {
|
||||||
let config: Config = config.into_serde().unwrap_or_default();
|
let config: Config = serde_wasm_bindgen::from_value(config).unwrap_or_default();
|
||||||
wasm_bindgen_futures::future_to_promise(async move {
|
wasm_bindgen_futures::future_to_promise(async move {
|
||||||
if RUFFLE_GLOBAL_PANIC.is_completed() {
|
if RUFFLE_GLOBAL_PANIC.is_completed() {
|
||||||
// If an actual panic happened, then we can't trust the state it left us in.
|
// If an actual panic happened, then we can't trust the state it left us in.
|
||||||
|
@ -224,9 +224,9 @@ impl Ruffle {
|
||||||
/// Stream an arbitrary movie file from (presumably) the Internet.
|
/// Stream an arbitrary movie file from (presumably) the Internet.
|
||||||
///
|
///
|
||||||
/// This method should only be called once per player.
|
/// This method should only be called once per player.
|
||||||
pub fn stream_from(&mut self, movie_url: String, parameters: &JsValue) -> Result<(), JsValue> {
|
pub fn stream_from(&mut self, movie_url: String, parameters: JsValue) -> Result<(), JsValue> {
|
||||||
let _ = self.with_core_mut(|core| {
|
let _ = self.with_core_mut(|core| {
|
||||||
let parameters_to_load = parse_movie_parameters(parameters);
|
let parameters_to_load = parse_movie_parameters(¶meters);
|
||||||
|
|
||||||
let ruffle = *self;
|
let ruffle = *self;
|
||||||
let on_metadata = move |swf_header: &ruffle_core::swf::HeaderExt| {
|
let on_metadata = move |swf_header: &ruffle_core::swf::HeaderExt| {
|
||||||
|
@ -241,10 +241,10 @@ impl Ruffle {
|
||||||
/// Play an arbitrary movie on this instance.
|
/// Play an arbitrary movie on this instance.
|
||||||
///
|
///
|
||||||
/// This method should only be called once per player.
|
/// This method should only be called once per player.
|
||||||
pub fn load_data(&mut self, swf_data: Uint8Array, parameters: &JsValue) -> Result<(), JsValue> {
|
pub fn load_data(&mut self, swf_data: Uint8Array, parameters: JsValue) -> Result<(), JsValue> {
|
||||||
let mut movie = SwfMovie::from_data(&swf_data.to_vec(), None, None)
|
let mut movie = SwfMovie::from_data(&swf_data.to_vec(), None, None)
|
||||||
.map_err(|e| format!("Error loading movie: {}", e))?;
|
.map_err(|e| format!("Error loading movie: {}", e))?;
|
||||||
movie.append_parameters(parse_movie_parameters(parameters));
|
movie.append_parameters(parse_movie_parameters(¶meters));
|
||||||
|
|
||||||
self.on_metadata(movie.header());
|
self.on_metadata(movie.header());
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ impl Ruffle {
|
||||||
pub fn prepare_context_menu(&mut self) -> JsValue {
|
pub fn prepare_context_menu(&mut self) -> JsValue {
|
||||||
self.with_core_mut(|core| {
|
self.with_core_mut(|core| {
|
||||||
let info = core.prepare_context_menu();
|
let info = core.prepare_context_menu();
|
||||||
JsValue::from_serde(&info).unwrap_or(JsValue::UNDEFINED)
|
serde_wasm_bindgen::to_value(&info).unwrap_or(JsValue::UNDEFINED)
|
||||||
})
|
})
|
||||||
.unwrap_or(JsValue::UNDEFINED)
|
.unwrap_or(JsValue::UNDEFINED)
|
||||||
}
|
}
|
||||||
|
@ -1032,7 +1032,7 @@ impl Ruffle {
|
||||||
is_action_script_3: swf_header.is_action_script_3(),
|
is_action_script_3: swf_header.is_action_script_3(),
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Ok(value) = JsValue::from_serde(&metadata) {
|
if let Ok(value) = serde_wasm_bindgen::to_value(&metadata) {
|
||||||
instance.js_player.set_metadata(value);
|
instance.js_player.set_metadata(value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue