Skip to content

Commit 3496844

Browse files
committed
rust: Initial config option
Add the `CONFIG_RUST` Kconfig. This can be set to indicate that an application wishes to use Rust support. Adds `CONFIG_RUST_SUPPORTED` to indicate what platforms Rust is known to work on. This is set to the targets that are supported by subsequent commits. Signed-off-by: David Brown <[email protected]>
1 parent 5cbb204 commit 3496844

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

lib/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ source "lib/posix/Kconfig"
2121

2222
source "lib/open-amp/Kconfig"
2323

24+
source "lib/rust/Kconfig"
25+
2426
source "lib/smf/Kconfig"
2527

2628
source "lib/acpi/Kconfig"

lib/rust/Kconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Rust configuration options
2+
#
3+
# Copyright (c) 2024 Linaro LTD
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
menu "Rust Language Support"
7+
8+
config RUST_SUPPORTED
9+
bool
10+
default y if (CPU_CORTEX_M || \
11+
(RISCV && !RISCV_ISA_RV32E && !RISCV_ISA_RV128I))
12+
help
13+
Selected for platforms that have support for Rust.
14+
15+
config RUST
16+
bool "Rust support for the application"
17+
depends on RUST_SUPPORTED
18+
select EXPERIMENTAL
19+
help
20+
This option enables the use of applications written in Rust.
21+
22+
endmenu

0 commit comments

Comments
 (0)