k8s-openapi
k8s-openapi copied to clipboard
Selectively build API groups?
k8s-openapi compiles very slowly. That isn't really a dig on it, it's just a big crate.
But it would be nice if we could opt in to which APIs are actually relevant.
I figure a decent first approximation would be to have a cargo feature per apiVersion, which are already used for module separation anyway.
It's not impossible, though it will require the codegen process to keep track of cross-module dependencies. Eg everything depends on meta/v1, so enabling anything else should also enable the meta/v1 feature. (Well, meta/v1 will need to be enabled by default anyway because of how fundamental it is, but you get the idea.)
Also, the feature names will have to incorporate the whole path so that they're unambiguous, eg apimachinery/pkg/api/resource -> "apimachinery_pkg_api_resource"