Switch to buck2 prelude's cargo package macros
diff --git a/third-party/BUCK b/third-party/BUCK
index 29efee6..945ad9b 100644
--- a/third-party/BUCK
+++ b/third-party/BUCK
@@ -1,7 +1,7 @@
 # @generated by `reindeer buckify`
 
-load("//tools/buck:third_party.bzl", "third_party_rust_library")
 load("@prelude//rust:cargo_buildscript.bzl", "buildscript_run")
+load("@prelude//rust:cargo_package.bzl", "cargo")
 
 http_archive(
     name = "bitflags-1.3.2.crate",
@@ -11,7 +11,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "bitflags-1.3.2",
     srcs = [":bitflags-1.3.2.crate"],
     crate = "bitflags",
@@ -36,7 +36,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "cc-1.0.79",
     srcs = [":cc-1.0.79.crate"],
     crate = "cc",
@@ -60,7 +60,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "clap-4.1.13",
     srcs = [":clap-4.1.13.crate"],
     crate = "clap",
@@ -88,7 +88,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "clap_lex-0.3.3",
     srcs = [":clap_lex-0.3.3.crate"],
     crate = "clap_lex",
@@ -113,7 +113,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "codespan-reporting-0.11.1",
     srcs = [":codespan-reporting-0.11.1.crate"],
     crate = "codespan_reporting",
@@ -141,7 +141,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "once_cell-1.17.1",
     srcs = [":once_cell-1.17.1.crate"],
     crate = "once_cell",
@@ -165,7 +165,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "os_str_bytes-6.5.0",
     srcs = [":os_str_bytes-6.5.0.crate"],
     crate = "os_str_bytes",
@@ -190,7 +190,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "proc-macro2-1.0.53",
     srcs = [":proc-macro2-1.0.53.crate"],
     crate = "proc_macro2",
@@ -209,7 +209,7 @@
     deps = [":unicode-ident-1.0.8"],
 )
 
-rust_binary(
+cargo.rust_binary(
     name = "proc-macro2-1.0.53-build-script-build",
     srcs = [":proc-macro2-1.0.53.crate"],
     crate = "build_script_build",
@@ -250,7 +250,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "quote-1.0.26",
     srcs = [":quote-1.0.26.crate"],
     crate = "quote",
@@ -268,7 +268,7 @@
     deps = [":proc-macro2-1.0.53"],
 )
 
-rust_binary(
+cargo.rust_binary(
     name = "quote-1.0.26-build-script-build",
     srcs = [":quote-1.0.26.crate"],
     crate = "build_script_build",
@@ -307,7 +307,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "scratch-1.0.5",
     srcs = [":scratch-1.0.5.crate"],
     crate = "scratch",
@@ -320,7 +320,7 @@
     visibility = [],
 )
 
-rust_binary(
+cargo.rust_binary(
     name = "scratch-1.0.5-build-script-build",
     srcs = [":scratch-1.0.5.crate"],
     crate = "build_script_build",
@@ -351,7 +351,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "syn-2.0.10",
     srcs = [":syn-2.0.10.crate"],
     crate = "syn",
@@ -384,12 +384,20 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "termcolor-1.2.0",
     srcs = [":termcolor-1.2.0.crate"],
     crate = "termcolor",
     crate_root = "termcolor-1.2.0.crate/src/lib.rs",
     edition = "2018",
+    platform = {
+        "windows-gnu": dict(
+            deps = [":winapi-util-0.1.5"],
+        ),
+        "windows-msvc": dict(
+            deps = [":winapi-util-0.1.5"],
+        ),
+    },
     rustc_flags = ["--cap-lints=allow"],
     visibility = [],
 )
@@ -402,7 +410,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "unicode-ident-1.0.8",
     srcs = [":unicode-ident-1.0.8.crate"],
     crate = "unicode_ident",
@@ -420,7 +428,7 @@
     visibility = [],
 )
 
-third_party_rust_library(
+cargo.rust_library(
     name = "unicode-width-0.1.10",
     srcs = [":unicode-width-0.1.10.crate"],
     crate = "unicode_width",
@@ -430,3 +438,59 @@
     rustc_flags = ["--cap-lints=allow"],
     visibility = [],
 )
+
+http_archive(
+    name = "winapi-0.3.9.crate",
+    sha256 = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419",
+    strip_prefix = "winapi-0.3.9",
+    urls = ["https://crates.io/api/v1/crates/winapi/0.3.9/download"],
+    visibility = [],
+)
+
+cargo.rust_library(
+    name = "winapi-0.3.9",
+    srcs = [":winapi-0.3.9.crate"],
+    crate = "winapi",
+    crate_root = "winapi-0.3.9.crate/src/lib.rs",
+    edition = "2015",
+    features = [
+        "consoleapi",
+        "errhandlingapi",
+        "fileapi",
+        "minwindef",
+        "processenv",
+        "std",
+        "winbase",
+        "wincon",
+        "winerror",
+        "winnt",
+    ],
+    rustc_flags = ["--cap-lints=allow"],
+    visibility = [],
+)
+
+http_archive(
+    name = "winapi-util-0.1.5.crate",
+    sha256 = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178",
+    strip_prefix = "winapi-util-0.1.5",
+    urls = ["https://crates.io/api/v1/crates/winapi-util/0.1.5/download"],
+    visibility = [],
+)
+
+cargo.rust_library(
+    name = "winapi-util-0.1.5",
+    srcs = [":winapi-util-0.1.5.crate"],
+    crate = "winapi_util",
+    crate_root = "winapi-util-0.1.5.crate/src/lib.rs",
+    edition = "2018",
+    platform = {
+        "windows-gnu": dict(
+            deps = [":winapi-0.3.9"],
+        ),
+        "windows-msvc": dict(
+            deps = [":winapi-0.3.9"],
+        ),
+    },
+    rustc_flags = ["--cap-lints=allow"],
+    visibility = [],
+)
diff --git a/third-party/fixups/winapi/fixups.toml b/third-party/fixups/winapi/fixups.toml
new file mode 100644
index 0000000..db40d72
--- /dev/null
+++ b/third-party/fixups/winapi/fixups.toml
@@ -0,0 +1 @@
+buildscript = []
diff --git a/third-party/reindeer.toml b/third-party/reindeer.toml
index 1f9fef5..8415d64 100644
--- a/third-party/reindeer.toml
+++ b/third-party/reindeer.toml
@@ -5,8 +5,3 @@
 generated_file_header = """
 # \u0040generated by `reindeer buckify`
 """
-buckfile_imports = """
-load("//tools/buck:third_party.bzl", "third_party_rust_library")
-load("@prelude//rust:cargo_buildscript.bzl", "buildscript_run")
-"""
-rust_library = "third_party_rust_library"
diff --git a/tools/buck/prelude b/tools/buck/prelude
index 8c6024d..b21e358 160000
--- a/tools/buck/prelude
+++ b/tools/buck/prelude
@@ -1 +1 @@
-Subproject commit 8c6024dc786bab9ac15967cfefdd94c0b0a45eb7
+Subproject commit b21e3586138a9fe672da8ca3b18361d78d46d695
diff --git a/tools/buck/third_party.bzl b/tools/buck/third_party.bzl
deleted file mode 100644
index 84e5ca8..0000000
--- a/tools/buck/third_party.bzl
+++ /dev/null
@@ -1,5 +0,0 @@
-def third_party_rust_library(**kwargs):
-    native.rust_library(
-        doctests = False,
-        **kwargs
-    )