7 mainDotHare = writeText "main.ha" ''
10 export fn main() void = {
12 match(mime::lookup_ext(ext)) {
13 case let mime: const *mime::mimetype =>
14 fmt::printfln("Found mimetype for extension `{}`: {}", ext, mime.mime)!;
16 fmt::fatalf("Could not find mimetype for `{}`", ext);
21 runCommandNoCC "mime-module-test" { nativeBuildInputs = [ hare ]; } ''
22 HARECACHE="$(mktemp -d)"
24 readonly binout="test-bin"
25 hare build -qRo "$binout" ${mainDotHare}