Skip to content

Add module for Applicaions in Rust support #78303

@d3zd3z

Description

@d3zd3z

Origin

This is code created by the Zephyr project (there isn't an issue type for this).

Purpose

This module adds support for developers to create applications written in Rust that run on top of Zephyr.

Mode of integration

Propose placing this under modules/lang/rust, the repo itself will be called zephyrproject-rtos/zephyr-lang-rust. This will be a new git repo, with development happening on this git repo.

Maintainership

The code is being developed by d3zd3z.

Pull Request

The code is at https://github.com/d3zd3z/zephyr-lang-rust, this can be placed under modules/lang/rust, and the Zephyr tree's west.yml given an entry for it, and the sample will then build.

Description

This is not third party code. After the 2024-09-11 TSC discussion, we discussed placing the current code from the collab-rust branch into a module. This is a proposal based on that suggestion.

Dependencies

The rust code will be build using the conventional tools used by the Rust ecosystem, which includes the cargo tool. Cargo manages downloading and compiling dependencies within the Rust code. This module contains a CMakeLists.txt file that adds a cmake helper function that an application can use to write an application in Rust. See the sample contained within the repo.

Revision

https://github.com/d3zd3z/zephyr-lang-rust main would be the initial version.
#78306 is a PR to bring this into the zephyr. This includes the Rust support (optionally), and demonstrates that the CI samples and tests from the module are run. Figuring out how to include documentation from the module is ongoing.

License

SPDX-License-Identifier: Apache-2.0

It could also be possible to use "Apache-2.0 or MIT" if we want better cohesion with the rust ecosystem, which typically uses that license, but I believe adding new code to Zephyr under different license terms would be a board decision.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TSCTopics that need TSC discussionarea: RustIssues affecting Rust support in Zephyr

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions