Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Make the wasmbind feature of the chrono crate optional #2810

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion boa_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ console = []
# Enable Boa's additional ECMAScript features for web browsers.
annex-b = []

# Enables the wasmbind dependency of the `chrono` crate.
wasmbind = ["chrono/wasmbind"]

Razican marked this conversation as resolved.
Show resolved Hide resolved
[dependencies]
boa_interner.workspace = true
boa_gc = { workspace = true, features = [ "thinvec" ] }
Expand All @@ -60,7 +63,7 @@ num-integer = "0.1.45"
bitflags = "2.1.0"
indexmap = "1.9.3"
ryu-js = "0.2.2"
chrono = { version = "0.4.24", default-features = false, features = ["clock", "std", "wasmbind"] }
chrono = { version = "0.4.24", default-features = false, features = ["clock", "std"] }
fast-float = "0.2.0"
unicode-normalization = "0.1.22"
once_cell = "1.17.1"
Expand Down
3 changes: 3 additions & 0 deletions boa_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
//! - **console** - Enables `boa`'s [WHATWG `console`][whatwg] object implementation.
//! - **profiler** - Enables profiling with measureme (this is mostly internal).
//! - **intl** - Enables `boa`'s [ECMA-402 Internationalization API][ecma-402] (`Intl` object)
//! - **wasmbind** - Enables the `wasmbind` feature in the `chrono` crate, to enable retrieving
//! real-time clocks in web browsers. Note that enabling this feature can make build fail if
//! `wasm-bindgen` is not available in a Webassembly platform.
//!
//! # Boa Crates
//! - **`boa_ast`** - Boa's ECMAScript Abstract Syntax Tree.
Expand Down
2 changes: 1 addition & 1 deletion boa_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository.workspace = true
rust-version.workspace = true

[dependencies]
boa_engine = { workspace = true, features = ["console", "annex-b"] }
boa_engine = { workspace = true, features = ["console", "annex-b", "wasmbind"] }
wasm-bindgen = "0.2.84"
getrandom = { version = "0.2.9", features = ["js"] }

Expand Down