Split cxx runtime and build components
diff --git a/BUILD b/BUILD
index 2eea8c7..d63fea7 100644
--- a/BUILD
+++ b/BUILD
@@ -3,25 +3,18 @@
 rust_library(
     name = "cxx",
     srcs = glob(["src/**/*.rs"]),
-    data = ["src/gen/include/cxx.h"],
     visibility = ["//visibility:public"],
     deps = [
         ":core-lib",
         ":cxxbridge-macro",
-        "//third-party:anyhow",
-        "//third-party:cc",
-        "//third-party:codespan-reporting",
         "//third-party:link-cplusplus",
-        "//third-party:proc-macro2",
-        "//third-party:quote",
-        "//third-party:syn",
     ],
 )
 
 rust_binary(
     name = "codegen",
-    srcs = glob(["cmd/src/**/*.rs"]),
-    data = ["cmd/src/gen/include/cxx.h"],
+    srcs = glob(["gen/cmd/src/**/*.rs"]),
+    data = ["gen/cmd/src/gen/include/cxx.h"],
     visibility = ["//visibility:public"],
     deps = [
         "//third-party:anyhow",
@@ -57,3 +50,18 @@
         "//third-party:syn",
     ],
 )
+
+rust_library(
+    name = "build",
+    srcs = glob(["gen/build/src/**/*.rs"]),
+    data = ["gen/build/src/gen/include/cxx.h"],
+    visibility = ["//visibility:public"],
+    deps = [
+        "//third-party:anyhow",
+        "//third-party:cc",
+        "//third-party:codespan-reporting",
+        "//third-party:proc-macro2",
+        "//third-party:quote",
+        "//third-party:syn",
+    ],
+)