I like Go a lot, but I'm looking for a more powerful tool for organizing my projects. Here's some of the things I could hopefully do in Meson if we added support
- build multiple executables with a varied set of params
- for instance cross compile some
- set flags on others
- build nice docs
- compile markdown to roff, or html, or etc.
- package those executables into native packages (e.g. RPM)
- Build and link in C code
I can do all these things, but I am copying scripts around, and so is my team at work :)
I've built Go with Bazel. At my company we have a project that compiles C++ and Go into a single binary, and we use Bazel to do that, becuase we require integration with Envoy, and Envoy uses Bazel. It works fine, but it's way too heavy to recommend for new projects.
It seems that the Rust + Meson integration is some relevant prior art for me to look at. So I have some questions about that, and some general questions, too.
- The Go tool downloads dependencies on its own, and the custom is to store them a ./vendor repo. Cargo does something similar. How does Meson interact with cargo generally? What's the Meson philosophy on interacting with language-specific package managers?
- A Go project declares all its direct dependencies in a go.mod file, and the go tool builds a go.sum file with all (?) the transient dependencies as well. Would a Go plugin for Meson be expected to parse these files? How much can I delegate to the official Go tools?
I cloned the Meson repo the other day, and grepped for "Rust". I'm sure I've missed a few things, but here's some files that caught my eye
compilers/compilers.py
compilers/detect.py
compilers/rust.py
modules/unstable_rust.py
interpreter/interpreter.py
templates/rusttemplates.py
Can you provide a study guide for walking through the codebase, and/or a high level list of things one has to implement to add support for Go?
related post; https://recursiveascent.blogspot.com/2021/02/rust-in-meson-057-edition.html
it seems like there is a minimum set of functionality one can implement, and then cooler features (like first class test support) can be added later