diff --git a/community/rust/APKBUILD b/community/rust/APKBUILD
index 29e9680a59734b8c761c601ac656e87cb80a80a3..73e50635000453553f16e10d1458fa8f7af1b128 100644
--- a/community/rust/APKBUILD
+++ b/community/rust/APKBUILD
@@ -348,7 +348,7 @@ sha512sums="
 2fa569ea83338af929f472abf68d39e889c93f0a0e07cba4017fc9da55ab40d4d598489b21cea688f9d9fe186f7a7207266bf3175bb226818f06934dfffd8e07  need-rpath.patch
 bc28e1edae88f48eb0368cd0905280c323d521c7e13b6fc2bb1fb6e57274fa418afdc9cb3342f4928842e309d0573b98e82976159541c88b35694dceaf7a82e4  need-ssp_nonshared.patch
 03a179e31c95f88a98fb1ba6b2fd0baaf9fe1a74ade76d3096fe45ddc5e453c25109355e667783d9be1bcc585445d07b7270cb3e6e403de971049714f2c6f91a  alpine-move-py-scripts-to-share.patch
-aa1681386c13a7ef103ca3083cc173bb5db0d37436f2579410233a542d71185be88a4478b9e2d90b848ffc5577f78bffef466cd5883786dfbf4e4a08d1007509  alpine-target.patch
+063469591de555f133339c8c9a3cf45bfc059a9b6bd57268068166bc065ef99fa1fb958a1bc42df4097eb59122d49d32e45bc31a44dc030ca3578d99fd39ff9e  alpine-target.patch
 7d59258d4462eba0207739a5c0c8baf1f19d9a396e5547bb4d59d700eb94d50ba6add2e523f3e94e29e993821018594625ea4ac86304fb58f7f8c82622a26ab0  install-template-shebang.patch
 c31fdfe8a9b3411576c75da46645cf0465b9053000a2ab49cf9b2f2733f679d6d33acbf236d67a20e14935d094a685453b7f1840180249f39d610fd0902c3125  check-rustc
 d5d3ccc5c3a73bf1816106ba00805346ea28f2e6337d960e9e9f776ba59d22abd8864382f163d32dd9a278df38c080949dafc70169728f44080ddc04f1e7f125  link-musl-dynamically.patch
diff --git a/community/rust/alpine-target.patch b/community/rust/alpine-target.patch
index 06a2aa9f88d96ee3ff2481b90a71fbe3499f4c1e..12f8d4a3f6f25c559e02fde321e9f99d2cd06ffc 100644
--- a/community/rust/alpine-target.patch
+++ b/community/rust/alpine-target.patch
@@ -140,7 +140,7 @@ and distribution-specific quirks instead of polluting the main musl target of
 +}
 --- rustc-1.48.0-src.orig/compiler/rustc_target/src/spec/mod.rs
 +++ rustc-1.48.0-src/compiler/rustc_target/src/spec/mod.rs
-@@ -490,6 +490,19 @@
+@@ -490,6 +490,20 @@
  }
  
  supported_targets! {
@@ -157,6 +157,7 @@ and distribution-specific quirks instead of polluting the main musl target of
 +    ("mipsel-alpine-linux-musl", mipsel_alpine_linux_musl),
 +    ("mips64-alpine-linux-musl", mips64_alpine_linux_musl),
 +    ("mips64el-alpine-linux-musl", mips64el_alpine_linux_musl),
++    ("riscv64-alpine-linux-musl", riscv64_alpine_linux_musl),
      ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
      ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
      ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
@@ -240,3 +241,19 @@ and distribution-specific quirks instead of polluting the main musl target of
 +
 +    base
 +}
+--- /dev/null
++++ rustc-1.52.1-src/compiler/rustc_target/src/spec/riscv64_alpine_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++    let mut base = super::riscv64gc_unknown_linux_musl::target();
++
++    base.llvm_target = "riscv64-alpine-linux-musl".to_string();
++    base.options.vendor = "alpine".to_string();
++    base.options.crt_static_default = false;
++    base.options.static_position_independent_executables = true;
++    base.options.need_rpath = true;
++
++    base
++}