# Rust support for embedded devices

**URL:** <https://discourse.openrobotics.org/t/rust-support-for-embedded-devices/22263>\
**Category:** ROS General\
**Tags:** rust\
**Created:** [September 13, 2021, 7:30am UTC](https://discourse.openrobotics.org/t/rust-support-for-embedded-devices/22263 "2021-09-13T07:30:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JanStaschulat](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/janstaschulat/32/16498_2.png) [@JanStaschulat](https://discourse.openrobotics.org/u/JanStaschulat)\
**Post date:** [September 13, 2021, 7:30am UTC](https://discourse.openrobotics.org/t/rust-support-for-embedded-devices/22263/1 "2021-09-13T07:30:47Z")

</div>

@gbiggs  
Hi, we have developed the rclc-library ([GitHub - ros2/rclc: ROS Client Library for the C language.](https://github.com/ros2/rclc)) for micro-ROS, which puts ROS 2 on micro-controllers ([https://micro.ros.org/](https://micro.ros.org/)). Looking at [ros2\_rust/rclrs/src/node at main · ros2-rust/ros2\_rust · GitHub](https://github.com/ros2-rust/ros2_rust/tree/master/rclrs/src/node), Rust supports currently only subscribers and publishers using rcl. We have developed a C-API in the rclc-library, which comes with full ROS 2 feature support (subscribers, publisher, services, guard\_conditions, executor, parameters, actions etc. ) that can be used for Linux or on embedded devices, as it is fully based on rcl.

Would you be interested in using rclc as Rust interface to ROS 2? The benefit for Rust developers: they could program in Rust with all ROS 2 features, such as services, parameters, actions and the executor comes with static memory allocation. There is no dynamic memory allocation at run-time. This C-API can be used for Linux-supported processors as well as on embedded devices. The benefit for embedded-devices, you could program in Rust on the micro-controllers using micro-ROS stack.

The last Rust Working Group was in April 2021([Rust working group meeting - 2021/04/28 - ROS General - Open Robotics Discourse](http://discourse.ros.org/t/rust-working-group-meeting-2021-04-28/20056)). Therefore I created this post. Where would be the best way to ask this question to Rust - ROS2 enthusiasts?

---

<div class="post-metadata">

**Author:** ![esteve](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/esteve/32/12_2.png) [@esteve](https://discourse.openrobotics.org/u/esteve)\
**Post date:** [September 13, 2021, 8:37am UTC](https://discourse.openrobotics.org/t/rust-support-for-embedded-devices/22263/2 "2021-09-13T08:37:04Z")

</div>

> @gbiggs

Not sure why this is addressed to @gbiggs, but I’m the author of rclrs 🙂

> Would you be interested in using rclc as Rust interface to ROS 2?

That’d be an interesting approach, but the reason we created the rmw/rcl/client\_libraries layers in ROS2 is so that client libraries would have the freedom to choose whatever threading and memory models feel more natural to languages. For example, with Rust we can control the life cycle of objects to ensure there aren’t memory issues.

---

<div class="post-metadata">

**Author:** ![JanStaschulat](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/janstaschulat/32/16498_2.png) [@JanStaschulat](https://discourse.openrobotics.org/u/JanStaschulat)\
**Post date:** [September 13, 2021, 9:36am UTC](https://discourse.openrobotics.org/t/rust-support-for-embedded-devices/22263/3 "2021-09-13T09:36:18Z")

</div>

Thank you for your comment. gbiggs posted the last rust working group meeting. Therefore I addressed him directly.

Let’s continue the discussion in this thread: [Release: rust ROS2 library r2r - ROS General - Open Robotics Discourse](http://discourse.ros.org/t/release-rust-ros2-library-r2r/22180)

---

<div class="post-metadata">

**Author:** ![aposhian](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/aposhian/32/10388_2.png) [@aposhian](https://discourse.openrobotics.org/u/aposhian)\
**Post date:** [September 28, 2021, 3:53pm UTC](https://discourse.openrobotics.org/t/rust-support-for-embedded-devices/22263/4 "2021-09-28T15:53:38Z")

</div>

Is the ROS Rust working group meeting regularly? I know I would be interested in participating.

---

<div class="post-metadata">

**Author:** ![esteve](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/esteve/32/12_2.png) [@esteve](https://discourse.openrobotics.org/u/esteve)\
**Post date:** [September 29, 2021, 9:20am UTC](https://discourse.openrobotics.org/t/rust-support-for-embedded-devices/22263/5 "2021-09-29T09:20:57Z")

</div>

We haven’t met in a while, but we’re getting more contributions lately, so maybe it’s about time. I’ve scheduled a meeting on October 4th at 14:00 UTC, I’ll announce it on the Rust section shortly

@aposhian Any topic you’d be interested in?

---

<div class="post-metadata">

**Author:** ![esteve](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/esteve/32/12_2.png) [@esteve](https://discourse.openrobotics.org/u/esteve)\
**Post date:** [September 29, 2021, 9:25am UTC](https://discourse.openrobotics.org/t/rust-support-for-embedded-devices/22263/6 "2021-09-29T09:25:45Z")

</div>

Done [CANCELED - Rust working group meeting 2021/10/04 - ROS General - Open Robotics Discourse](http://discourse.ros.org/t/rust-working-group-meeting-2021-10-04/22483)
