WORKSPACE: update rules_rust and replace cargo-raze with crate_universe
cargo-raze is deprecated, unmaintained and doesn't build anymore.
create_universe reduces the clutter inside the repo and allows simpler
setup of rust requirements.
Change-Id: Iebe88902ae469a28c0378707447f7d97006d0479
Reviewed-on: https://review.monogon.dev/c/monogon/+/2749
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
Tested-by: Jenkins CI
diff --git a/third_party/rust-uefi-platform.patch b/third_party/rust-uefi-platform.patch
index e70f7f3..6ca627e 100644
--- a/third_party/rust-uefi-platform.patch
+++ b/third_party/rust-uefi-platform.patch
@@ -25,10 +25,9 @@
"x86_64-unknown-none",
+ "x86_64-unknown-uefi",
]
-
- SUPPORTED_PLATFORM_TRIPLES = SUPPORTED_T1_PLATFORM_TRIPLES + SUPPORTED_T2_PLATFORM_TRIPLES
+
@@ -97,6 +99,7 @@ _SYSTEM_TO_BUILTIN_SYS_SUFFIX = {
- "none": "none",
+ "nto": "qnx",
"openbsd": "openbsd",
"solaris": None,
+ "uefi": "uefi",
@@ -36,31 +35,31 @@
"wasi": None,
"windows": "windows",
@@ -113,6 +116,7 @@ _SYSTEM_TO_BINARY_EXT = {
- "ios": "",
- "linux": "",
+ "nixos": "",
"none": "",
+ "nto": "",
+ "uefi": ".efi",
# This is currently a hack allowing us to have the proper
# generated extension for the wasm target, similarly to the
# windows target
@@ -132,6 +136,7 @@ _SYSTEM_TO_STATICLIB_EXT = {
- "ios": ".a",
- "linux": ".a",
+ "nixos": ".a",
"none": ".a",
+ "nto": ".a",
+ "uefi": ".lib",
"unknown": "",
"wasi": "",
"windows": ".lib",
@@ -148,6 +153,7 @@ _SYSTEM_TO_DYLIB_EXT = {
- "ios": ".dylib",
- "linux": ".so",
+ "nixos": ".so",
"none": ".so",
+ "nto": ".a",
+ "uefi": "", # UEFI doesn't have dynamic linking
"unknown": ".wasm",
"wasi": ".wasm",
"windows": ".dll",
@@ -191,6 +197,7 @@ _SYSTEM_TO_STDLIB_LINKFLAGS = {
- "none": [],
+ "nto": [],
"openbsd": ["-lpthread"],
"solaris": ["-lsocket", "-lposix4", "-lpthread", "-lresolv"],
+ "uefi": [],