diff --git a/.gitignore b/.gitignore index 266b95a424a85..f9fa32b7a6b1b 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,17 @@ venv .clangd new.info +# Cargo drops lock files in projects to capture resolved dependencies. +# We don't want to record these. +Cargo.lock + +# Cargo encourages a .cargo/config.toml file to symlink to a generated file. Don't save these. +.cargo/ + +# Normal west builds will place the Rust target directory under the build directory. However, +# sometimes IDEs and such will litter these target directories as well. +target/ + # CI output compliance.xml _error.types diff --git a/MAINTAINERS.yml b/MAINTAINERS.yml index 1c72bfe707b0b..0d59bcee7b455 100644 --- a/MAINTAINERS.yml +++ b/MAINTAINERS.yml @@ -4831,6 +4831,14 @@ West: labels: - "platform: Intel" +"West project: zephyr-lang-rust": + status: maintained + maintainers: + - d3zd3z + files: [] + labels: + - "area: Rust" + "West project: libmetal": status: odd fixes collaborators: diff --git a/include/zephyr/arch/arm/cortex_m/scripts/linker.ld b/include/zephyr/arch/arm/cortex_m/scripts/linker.ld index fb26e91cf6144..9e123b120de7c 100644 --- a/include/zephyr/arch/arm/cortex_m/scripts/linker.ld +++ b/include/zephyr/arch/arm/cortex_m/scripts/linker.ld @@ -174,7 +174,7 @@ SECTIONS __text_region_end = .; -#if defined (CONFIG_CPP) +#if defined (CONFIG_CPP) || defined(CONFIG_RUST) SECTION_PROLOGUE(.ARM.extab,,) { /* diff --git a/modules/Kconfig b/modules/Kconfig index 9d5abd1f4b049..21ccad7ff2f70 100644 --- a/modules/Kconfig +++ b/modules/Kconfig @@ -29,6 +29,7 @@ source "modules/Kconfig.open-amp" source "modules/Kconfig.picolibc" source "modules/Kconfig.nxp_s32" source "modules/Kconfig.renesas_fsp" +source "modules/Kconfig.rust" source "modules/Kconfig.silabs" source "modules/Kconfig.simplelink" source "modules/Kconfig.sof" diff --git a/modules/Kconfig.rust b/modules/Kconfig.rust new file mode 100644 index 0000000000000..97596ab49b891 --- /dev/null +++ b/modules/Kconfig.rust @@ -0,0 +1,5 @@ +# Copyright (c) 2024 Linaro LTD +# SPDX-License-Identifier: Apache-2.0 + +config RUST + bool diff --git a/submanifests/optional.yaml b/submanifests/optional.yaml index f6e0bd8cdfd22..2830d5650397e 100644 --- a/submanifests/optional.yaml +++ b/submanifests/optional.yaml @@ -33,6 +33,12 @@ manifest: remote: upstream groups: - optional + - name: zephyr-lang-rust + revision: d2734f48d3ab1dbf584a936b2a05ece7bf0904f5 + path: modules/lang/rust + remote: upstream + groups: + - optional - name: sof revision: 0e4c4efcaae858036027607e88406d59bd2a31d8 path: modules/audio/sof