From 7595ccf18f12f7124494ecec26fc4bd53d0c3b1a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 3 Mar 2023 09:09:44 -0800 Subject: [PATCH] build_config sets runtime to "none" if embedded --- src/build_config.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/build_config.zig b/src/build_config.zig index 27575c79d..5b457061b 100644 --- a/src/build_config.zig +++ b/src/build_config.zig @@ -13,10 +13,10 @@ const apprt = @import("apprt.zig"); pub const artifact = Artifact.detect(); /// The runtime to back exe artifacts with. -pub const app_runtime = std.meta.stringToEnum( - apprt.Runtime, - std.meta.tagName(options.app_runtime), -).?; +pub const app_runtime: apprt.Runtime = switch (artifact) { + .lib => .none, + else => std.meta.stringToEnum(apprt.Runtime, std.meta.tagName(options.app_runtime)).?, +}; /// Whether our devmode UI is enabled or not. This requires imgui to be /// compiled.