mirror of
https://github.com/oxalica/rust-overlay.git
synced 2025-10-06 00:02:40 +02:00
{rust-bin,example}: remove WASI target workaround and fix example
The un-versioned `wasm32-wasi` target is removed in favor of `wasm32-wasip?` since Rust 1.84. Examples are updated. The nixpkgs patch for WASI target name remapping is merged in 24.11. We can also safely remove the workaround.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
toRustTarget,
|
||||
manifests,
|
||||
nightly,
|
||||
}:
|
||||
@@ -23,21 +22,15 @@ let
|
||||
(filter (name: set.${name} == null)
|
||||
(attrNames set));
|
||||
|
||||
# FIXME: https://github.com/NixOS/nixpkgs/pull/146274
|
||||
toRustTarget' = platform:
|
||||
if platform.isWasi then
|
||||
"${platform.parsed.cpu.name}-wasi"
|
||||
else
|
||||
platform.rust.rustcTarget or (toRustTarget platform);
|
||||
toRustTarget = platform: platform.rust.rustcTarget;
|
||||
|
||||
# The platform where `rustc` is running.
|
||||
rustHostPlatform = toRustTarget' stdenv.hostPlatform;
|
||||
rustHostPlatform = toRustTarget stdenv.hostPlatform;
|
||||
# The platform of binary which `rustc` produces.
|
||||
rustTargetPlatform = toRustTarget' stdenv.targetPlatform;
|
||||
rustTargetPlatform = toRustTarget stdenv.targetPlatform;
|
||||
|
||||
mkComponentSet = callPackage ./mk-component-set.nix {
|
||||
inherit removeNulls;
|
||||
toRustTarget = toRustTarget';
|
||||
inherit removeNulls toRustTarget;
|
||||
};
|
||||
|
||||
mkAggregated = callPackage ./mk-aggregated.nix {};
|
||||
|
Reference in New Issue
Block a user