Hi there!
This is a super interesting question to me.
It's true that there are not a lot of educational content about Bazel available,
there are even less technical deep dive content in the wild.
Good thing is that the source code is out in the open for us to explore.
I think most actions in matured bazel rules are attached with a mnemonic, which is an alias to easily identify that action type.
In general, I find it very easy to work backward from where the mnemonic was declared in a rule set back to the rule's definition.
So in this particular CPP rule set, you can grep for "mnemonic" to find where and how the actions you care about get constructed.
For example:
This SourceGraph search would be a good place to start.
Some of the interesting classes include:
- CppCompileAction.java
- CppLinkAction.java
- CppLinkActionBuilder.java
Some of the higher level constructs that you might want to go through first:
- src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java
- src/main/java/com/google/devtools/build/lib/actions/Action.java
Hope it helps :)
Son Luong.