diff --git a/configs/qemu-riscv64_defconfig b/configs/qemu-riscv64_defconfig
index 4423d36b782..d30b017169e 100644
--- a/configs/qemu-riscv64_defconfig
+++ b/configs/qemu-riscv64_defconfig
@@ -24,3 +24,4 @@ CONFIG_UTHREAD=y
 CONFIG_UNIT_TEST=y
 CONFIG_ULIB=y
 CONFIG_EXAMPLES=y
+CONFIG_RUST_EXAMPLES=y
diff --git a/scripts/Makefile.ulib-example b/scripts/Makefile.ulib-example
index a398f3e9621..ae3f75b33fb 100644
--- a/scripts/Makefile.ulib-example
+++ b/scripts/Makefile.ulib-example
@@ -25,6 +25,8 @@ RUST_TARGET_x86 := i686-unknown-linux-gnu
 RUST_TARGET_x86_64 := x86_64-unknown-none
 RUST_FLAGS_x86 := -C panic=abort -C relocation-model=static
 RUST_FLAGS_x86_64 :=
+RUST_TARGET_riscv := riscv64gc-unknown-none-elf
+RUST_FLAGS_riscv :=
 
 ifdef CONFIG_X86_64
 RUST_TARGET := $(RUST_TARGET_$(EXAMPLE_ARCH)_64)
