Rust编写的JavaScript引擎,该项目是一个试验性质的项目。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
552 B

Bump the rust-dependencies group across 1 directory with 8 updates (#4021) * Bump the rust-dependencies group across 1 directory with 8 updates Bumps the rust-dependencies group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.5.19` | `4.5.20` | | [serde_json](https://github.com/serde-rs/json) | `1.0.128` | `1.0.132` | | [trybuild](https://github.com/dtolnay/trybuild) | `1.0.99` | `1.0.101` | | [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) | `0.2.93` | `0.2.95` | | [wasm-bindgen-test](https://github.com/rustwasm/wasm-bindgen) | `0.3.43` | `0.3.45` | | [syn](https://github.com/dtolnay/syn) | `2.0.79` | `2.0.82` | | [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.86` | `1.0.88` | | [bytemuck](https://github.com/Lokathor/bytemuck) | `1.18.0` | `1.19.0` | Updates `clap` from 4.5.19 to 4.5.20 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.19...clap_complete-v4.5.20) Updates `serde_json` from 1.0.128 to 1.0.132 - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/1.0.128...1.0.132) Updates `trybuild` from 1.0.99 to 1.0.101 - [Release notes](https://github.com/dtolnay/trybuild/releases) - [Commits](https://github.com/dtolnay/trybuild/compare/1.0.99...1.0.101) Updates `wasm-bindgen` from 0.2.93 to 0.2.95 - [Release notes](https://github.com/rustwasm/wasm-bindgen/releases) - [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md) - [Commits](https://github.com/rustwasm/wasm-bindgen/compare/0.2.93...0.2.95) Updates `wasm-bindgen-test` from 0.3.43 to 0.3.45 - [Release notes](https://github.com/rustwasm/wasm-bindgen/releases) - [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md) - [Commits](https://github.com/rustwasm/wasm-bindgen/commits) Updates `syn` from 2.0.79 to 2.0.82 - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.79...2.0.82) Updates `proc-macro2` from 1.0.86 to 1.0.88 - [Release notes](https://github.com/dtolnay/proc-macro2/releases) - [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.86...1.0.88) Updates `bytemuck` from 1.18.0 to 1.19.0 - [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md) - [Commits](https://github.com/Lokathor/bytemuck/compare/v1.18.0...v1.19.0) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: trybuild dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: wasm-bindgen dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: wasm-bindgen-test dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: proc-macro2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: bytemuck dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * Fix wasm dependencies --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: José Julián Espina <julian.espina@canonical.com>
1 month ago
#![expect(
unused_crate_dependencies,
reason = "https://github.com/rust-lang/rust/issues/95513"
)]
#![cfg(all(
any(target_arch = "wasm32", target_arch = "wasm64"),
target_os = "unknown"
))]
use wasm_bindgen_test::*;
wasm_bindgen_test_configure!(run_in_browser);
#[wasm_bindgen_test]
fn simple() {
const CODE: &str = r"
function greet(targetName) {
return 'Hello, ' + targetName + '!';
}
greet('World')
";
let result = boa_wasm::evaluate(CODE).unwrap();
assert_eq!(result, "\"Hello, World!\"");
}