Split cxx runtime and build components
diff --git a/BUCK b/BUCK
index 6a9870e..2339f71 100644
--- a/BUCK
+++ b/BUCK
@@ -5,19 +5,13 @@
     deps = [
         ":core",
         ":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/**"]),
+    srcs = glob(["gen/cmd/src/**"]),
     crate = "cxxbridge",
     visibility = ["PUBLIC"],
     deps = [
@@ -52,3 +46,17 @@
         "//third-party:syn",
     ],
 )
+
+rust_library(
+    name = "build",
+    srcs = glob(["gen/build/src/**"]),
+    visibility = ["PUBLIC"],
+    deps = [
+        "//third-party:anyhow",
+        "//third-party:cc",
+        "//third-party:codespan-reporting",
+        "//third-party:proc-macro2",
+        "//third-party:quote",
+        "//third-party:syn",
+    ],
+)