diff options
author | 2021-10-30 20:53:08 -0700 | |
---|---|---|
committer | 2021-10-30 20:53:08 -0700 | |
commit | cd5c740368811ce49eeabb5f72d7ac2fa7098843 (patch) | |
tree | 378f272e33f3f869ad535c2ff35864b8cf9ed1d4 | |
parent | e2eef2bb25fead44aedf73fd8ee55e902b82a4e9 (diff) | |
download | bun-cd5c740368811ce49eeabb5f72d7ac2fa7098843.tar.gz bun-cd5c740368811ce49eeabb5f72d7ac2fa7098843.tar.zst bun-cd5c740368811ce49eeabb5f72d7ac2fa7098843.zip |
[internal] Fix loading runtime code in debug builds
-rw-r--r-- | src/runtime.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime.zig b/src/runtime.zig index ef4910afd..db9954b27 100644 --- a/src/runtime.zig +++ b/src/runtime.zig @@ -6,8 +6,8 @@ const resolve_path = @import("./resolver/resolve_path.zig"); const Fs = @import("./fs.zig"); const Schema = @import("./api/schema.zig"); -// packages/bun-cli-*/bin/bun -const BUN_ROOT = "../../../"; +// packages/bun-cli-*/bun +const BUN_ROOT = "../../"; const Api = Schema.Api; @@ -17,7 +17,7 @@ pub const ErrorCSS = struct { pub const ProdSourceContent = @embedFile("../" ++ ErrorCSSPath); - pub fn sourceContent() string { + pub inline fn sourceContent() string { if (comptime isDebug) { var env = std.process.getEnvMap(default_allocator) catch unreachable; var out_buffer: [std.fs.MAX_PATH_BYTES]u8 = undefined; @@ -42,7 +42,7 @@ pub const ErrorJS = struct { pub const ProdSourceContent = @embedFile("../" ++ ErrorJSPath); - pub fn sourceContent() string { + pub inline fn sourceContent() string { if (comptime isDebug) { var env = std.process.getEnvMap(default_allocator) catch unreachable; var out_buffer: [std.fs.MAX_PATH_BYTES]u8 = undefined; @@ -160,7 +160,7 @@ pub const Fallback = struct { pub const Runtime = struct { pub const ProdSourceContent = @embedFile("./runtime.out.js"); - pub fn sourceContent() string { + pub inline fn sourceContent() string { if (comptime isDebug) { var dirpath = std.fs.path.dirname(@src().file).?; var env = std.process.getEnvMap(default_allocator) catch unreachable; @@ -189,7 +189,7 @@ pub const Runtime = struct { return version_hash_int; } - pub fn version() string { + pub inline fn version() string { return version_hash; } |