diff --git a/.buildkite/ci.mjs b/.buildkite/ci.mjs index 14a7efad0d..b3b2f4ca4c 100755 --- a/.buildkite/ci.mjs +++ b/.buildkite/ci.mjs @@ -471,7 +471,7 @@ function getBuildZigStep(platform, options) { cancel_on_build_failing: isMergeQueue(), env: getBuildEnv(platform, options), command: `bun run build:ci --target bun-zig --toolchain ${toolchain}`, - timeout_in_minutes: 25, + timeout_in_minutes: 35, }; } diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp index 257a876d39..75514a4e25 100644 --- a/src/bun.js/bindings/ZigGlobalObject.cpp +++ b/src/bun.js/bindings/ZigGlobalObject.cpp @@ -892,7 +892,29 @@ extern "C" JSC__JSGlobalObject* Zig__GlobalObject__create(void* console_client, vm.heap.acquireAccess(); JSC::JSLockHolder locker(vm); - vm.heap.disableStopIfNecessaryTimer(); + { + const char* disable_stop_if_necessary_timer = getenv("BUN_DISABLE_STOP_IF_NECESSARY_TIMER"); + // Keep stopIfNecessaryTimer enabled by default when either: + // - `--smol` is passed + // - The machine has less than 4GB of RAM + bool shouldDisableStopIfNecessaryTimer = !miniMode; + if (WTF::ramSize() < 1024ull * 1024ull * 1024ull * 4ull) { + shouldDisableStopIfNecessaryTimer = false; + } + + if (disable_stop_if_necessary_timer) { + const char value = disable_stop_if_necessary_timer[0]; + if (value == '0') { + shouldDisableStopIfNecessaryTimer = false; + } else if (value == '1') { + shouldDisableStopIfNecessaryTimer = true; + } + } + + if (shouldDisableStopIfNecessaryTimer) { + vm.heap.disableStopIfNecessaryTimer(); + } + } // Every JS VM's RunLoop should use Bun's RunLoop implementation ASSERT(vmPtr->runLoop().kind() == WTF::RunLoop::Kind::Bun); diff --git a/src/cli/init_command.zig b/src/cli/init_command.zig index a5bb0b0d89..a13abfffff 100644 --- a/src/cli/init_command.zig +++ b/src/cli/init_command.zig @@ -827,14 +827,12 @@ pub const InitCommand = struct { } if (fields.entry_point.len > 0 and !did_load_package_json) { - Output.pretty("\nTo get started, run:\n\n\t", .{}); - if (strings.containsAny( - " \"'", - fields.entry_point, - )) { - Output.prettyln("bun run {any}", .{bun.fmt.formatJSONStringLatin1(fields.entry_point)}); + Output.pretty("\nTo get started, run:\n\n ", .{}); + + if (strings.containsAny(" \"'", fields.entry_point)) { + Output.pretty("bun run {any}\n\n", .{bun.fmt.formatJSONStringLatin1(fields.entry_point)}); } else { - Output.prettyln("bun run {s}", .{fields.entry_point}); + Output.pretty("bun run {s}\n\n", .{fields.entry_point}); } } @@ -1106,15 +1104,15 @@ const Template = enum { \\ \\Development - full-stack dev server with hot reload \\ - \\ bun dev + \\ bun dev \\ \\Static Site - build optimized assets to disk (no backend) \\ - \\ bun run build + \\ bun run build \\ \\Production - serve a full-stack production build \\ - \\ bun start + \\ bun start \\ \\Happy bunning! 🐇 \\