Enable support for rust_upb_proto_library and rust_cc_proto_library within the same build

PiperOrigin-RevId: 520314976
diff --git a/rust/BUILD b/rust/BUILD
index fc086c9..ff47fcc 100644
--- a/rust/BUILD
+++ b/rust/BUILD
@@ -37,11 +37,16 @@
 
 # TODO(b/270125787): Move to the right location once rust_proto_library is no longer experimental.
 proto_lang_toolchain(
-    name = "proto_lang_toolchain",
-    command_line = "--rust_out=experimental-codegen=enabled,kernel=" + select({
-        ":use_upb_kernel": "upb",
-        "//conditions:default": "cpp",
-    }) + ":$(OUT)",
+    name = "proto_rust_upb_toolchain",
+    command_line = "--rust_out=experimental-codegen=enabled,kernel=upb:$(OUT)",
+    progress_message = "Generating Rust proto_library %{label}",
+    runtime = ":protobuf",
+    visibility = ["//visibility:public"],
+)
+
+proto_lang_toolchain(
+    name = "proto_rust_cpp_toolchain",
+    command_line = "--rust_out=experimental-codegen=enabled,kernel=cpp:$(OUT)",
     progress_message = "Generating Rust proto_library %{label}",
     runtime = ":protobuf",
     visibility = ["//visibility:public"],