Commit

403b3cb

In Mox you can run any code at compile time! This is very easy replacement for all this crappy build tools. https://github.com/Morglod/mox
mox
#linkc fn puts(str: *u8): void;

#run puts("this message will be printed at compilation time");

// this constant will be baked from env variable at compilation time, not at runtime
const SOME_COMPTIME_FLAG := #run os_get_env("PUBLIC_URL");

fn main() {
    build_version := #run os_exec_output("git rev-parse HEAD");
}
GitHubGitHub - Morglod/mox: mox programming languagemox programming language. Contribute to Morglod/mox development by creating an account on GitHub.

commit 403b3cb