diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index 8836b9e2..f1dcbbfd 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -31,6 +31,7 @@ bitflags! { const JAVY_STREAM_IO = 1 << 2; const REDIRECT_STDOUT_TO_STDERR = 1 << 3; const TEXT_ENCODING = 1 << 4; + const JAVY_CRYPTOX = 1 << 5; } } @@ -44,5 +45,6 @@ mod tests { assert!(Config::JAVY_STREAM_IO == Config::from_bits(1 << 2).unwrap()); assert!(Config::REDIRECT_STDOUT_TO_STDERR == Config::from_bits(1 << 3).unwrap()); assert!(Config::TEXT_ENCODING == Config::from_bits(1 << 4).unwrap()); + assert!(Config::JAVY_CRYPTOX == Config::from_bits(1 << 5).unwrap()); } } diff --git a/crates/core/src/runtime.rs b/crates/core/src/runtime.rs index ee366cd8..1e52c74b 100644 --- a/crates/core/src/runtime.rs +++ b/crates/core/src/runtime.rs @@ -13,7 +13,7 @@ pub(crate) fn new(shared_config: SharedConfig) -> Result { // fix forward. .override_json_parse_and_stringify(false) .javy_json(false) - .javy_cryptox(true); + .javy_cryptox(shared_config.contains(SharedConfig::JAVY_CRYPTOX)); Runtime::new(std::mem::take(config)) }