Vendor things

This commit is contained in:
John Doty 2024-03-08 11:03:01 -08:00
parent 5deceec006
commit 977e3c17e5
19434 changed files with 10682014 additions and 0 deletions

View file

@ -0,0 +1,18 @@
#![cfg(target_arch = "wasm32")]
extern crate js_sys;
extern crate wasm_bindgen;
extern crate wasm_bindgen_test;
use wasm_bindgen::prelude::*;
use wasm_bindgen_test::wasm_bindgen_test_configure;
wasm_bindgen_test_configure!(run_in_dedicated_worker);
pub mod modules;
// should not be executed
#[wasm_bindgen(start)]
fn start() {
panic!();
}

View file

@ -0,0 +1,3 @@
export function get_five() {
return 5;
}

View file

@ -0,0 +1,12 @@
use wasm_bindgen::prelude::*;
use wasm_bindgen_test::*;
#[wasm_bindgen(raw_module = "./tests/worker/modules.js")]
extern "C" {
fn get_five() -> u32;
}
#[wasm_bindgen_test]
fn test_get_five() {
assert_eq!(get_five(), 5);
}

View file

@ -0,0 +1,18 @@
#![cfg(target_arch = "wasm32")]
extern crate js_sys;
extern crate wasm_bindgen;
extern crate wasm_bindgen_test;
use wasm_bindgen::prelude::*;
use wasm_bindgen_test::wasm_bindgen_test_configure;
wasm_bindgen_test_configure!(run_in_service_worker);
pub mod modules;
// should not be executed
#[wasm_bindgen(start)]
fn start() {
panic!();
}

View file

@ -0,0 +1,18 @@
#![cfg(target_arch = "wasm32")]
extern crate js_sys;
extern crate wasm_bindgen;
extern crate wasm_bindgen_test;
use wasm_bindgen::prelude::*;
use wasm_bindgen_test::wasm_bindgen_test_configure;
wasm_bindgen_test_configure!(run_in_shared_worker);
pub mod modules;
// should not be executed
#[wasm_bindgen(start)]
fn start() {
panic!();
}