| ... | @@ -41,6 +41,12 @@ fn detct_mainfile(def: []const u8) ![]const u8 { | ... | @@ -41,6 +41,12 @@ fn detct_mainfile(def: []const u8) ![]const u8 { |
| 41 | } | 41 | } |
| 42 | } | 42 | } |
| 43 | } | 43 | } |
| 44 | return "src/main.zig"; | 44 | if (try u.does_file_exist("./src/lib.zig")) { |
| | 45 | return "src/lib.zig"; |
| | 46 | } |
| | 47 | if (try u.does_file_exist("./src/main.zig")) { |
| | 48 | return "src/main.zig"; |
| | 49 | } |
| 45 | u.assert(false, "unable to detect package entry point", .{}); | 50 | u.assert(false, "unable to detect package entry point", .{}); |
| | 51 | unreachable; |
| 46 | } | 52 | } |