4 ms·
If I need to do compile-time pre-computation, I'd probably do it using "code generation" using something like this: https://github.com/linzhp/codegen_example/tr
by eximius 2y ago
If I need to do compile-time pre-computation, I'd probably do it using "code generation" using something like this: https://github.com/linzhp/codegen_example/tree/master https://github.com/linzhp/codegen_example/tree/master
* integrated into bazel rather than go-compiler-hacking
* your "normal" code just imports the result - which can be go-to-definition-ed to see the generated code