From a5172b2a1acda543fe99af4d694cc455fd606d20 Mon Sep 17 00:00:00 2001 From: Adam Chalmers Date: Wed, 12 Aug 2026 13:23:28 -0500 Subject: [PATCH] Execute KCL on engine by default Opt out by passing ENGINE_EXECUTION=0 --- src/context.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/context.rs b/src/context.rs index 31a9be3a..733d45f3 100644 --- a/src/context.rs +++ b/src/context.rs @@ -408,9 +408,12 @@ impl<'a> Context<'a> { /// Should KCL be executed on the server (true)? /// Or locally (false)? pub(crate) fn use_server_kcl_execution() -> bool { - std::env::var(ENGINE_EXECUTION_ENV) - .map(|value| !value.is_empty()) - .unwrap_or_default() + // Default to true. + let Ok(engine_exec) = std::env::var(ENGINE_EXECUTION_ENV) else { + return true; + }; + // Opt out if set to 0. + engine_exec != "0" } async fn engine_ws_with_settings(