diff --git a/js/src/rust/shared/Cargo.toml b/js/src/rust/shared/Cargo.toml index 60867cb19be4..0ec41ac57474 100644 --- a/js/src/rust/shared/Cargo.toml +++ b/js/src/rust/shared/Cargo.toml @@ -9,7 +9,7 @@ name = "jsrust_shared" path = "lib.rs" [dependencies] -baldrdash = { path = "../../wasm/cranelift" } +baldrdash = { path = "../../wasm/cranelift", optional = true } mozilla-central-workspace-hack = { path = "../../../../build/workspace-hack" } [features] diff --git a/js/src/rust/shared/lib.rs b/js/src/rust/shared/lib.rs index ed735024ae3b..247eb4037e6d 100644 --- a/js/src/rust/shared/lib.rs +++ b/js/src/rust/shared/lib.rs @@ -12,4 +12,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#[cfg(feature = "baldrdash")] extern crate baldrdash; diff --git a/toolkit/library/rust/shared/Cargo.toml b/toolkit/library/rust/shared/Cargo.toml index 31a09e2c379c..2ab70aaaff8d 100644 --- a/toolkit/library/rust/shared/Cargo.toml +++ b/toolkit/library/rust/shared/Cargo.toml @@ -34,7 +34,7 @@ xulstore = { path = "../../../components/xulstore", optional = true } log = {version = "0.4", features = ["release_max_level_info"]} env_logger = {version = "0.5", default-features = false} # disable `regex` to reduce code size cose-c = { version = "0.1.5" } -jsrust_shared = { path = "../../../../js/src/rust/shared", optional = true } +jsrust_shared = { path = "../../../../js/src/rust/shared" } arrayvec = "0.4" cert_storage = { path = "../../../../security/manager/ssl/cert_storage", optional = true } bitsdownload = { path = "../../../components/bitsdownload", optional = true } @@ -58,7 +58,7 @@ gecko_refcount_logging = ["geckoservo/gecko_refcount_logging"] simd-accel = ["encoding_c/simd-accel", "encoding_glue/simd-accel"] moz_memory = ["mp4parse_capi/mp4parse_fallible"] moz_places = ["bookmark_sync"] -spidermonkey_rust = ["jsrust_shared"] +spidermonkey_rust = ["jsrust_shared/baldrdash"] cranelift_x86 = ["jsrust_shared/cranelift_x86"] cranelift_arm32 = ["jsrust_shared/cranelift_arm32"] cranelift_arm64 = ["jsrust_shared/cranelift_arm64"] diff --git a/toolkit/library/rust/shared/lib.rs b/toolkit/library/rust/shared/lib.rs index 7257de1830fd..fccbd5c33a84 100644 --- a/toolkit/library/rust/shared/lib.rs +++ b/toolkit/library/rust/shared/lib.rs @@ -39,7 +39,6 @@ extern crate cosec; extern crate rsdparsa_capi; #[cfg(feature = "new_xulstore")] extern crate xulstore; -#[cfg(feature = "spidermonkey_rust")] extern crate jsrust_shared; #[cfg(feature = "bitsdownload")] extern crate bitsdownload;