<?xml-stylesheet type="text/xsl" href="https://test-devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Rust bindings to nrf52 series</title><link>/nordic/nordic-blog/b/blog/posts/rust-bindings-to-nrf52-series</link><description>In mid-2017, I came across this project by James Munns. It essentially wraps the C SDK for nRF52 development boards, and provides bindings that can be called from Rust. James gave a talk to the Rust DC Meetup, remotely over video conference. This tal</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><item><title>RE: Rust bindings to nrf52 series</title><link>https://test-devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/rust-bindings-to-nrf52-series</link><pubDate>Sun, 16 Dec 2018 09:42:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:438eda9b-2fde-472f-b734-7415b34009d2</guid><dc:creator>user75307</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Manufacturer support? Ha! C++ has been a far better choice for embedded code for a very long time, but the industry still insists on C. I use C++ exclusively on &amp;Ccedil;ortex-M devices, and have benefited greatly in terms of development time, reliability, readability, maintainability, and so on. Rust is interesting, but immature. C programmers can segue into C++ much more easily and gain essentially all the same benefits.&lt;/p&gt;&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1152&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Rust bindings to nrf52 series</title><link>https://test-devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/rust-bindings-to-nrf52-series</link><pubDate>Wed, 14 Feb 2018 08:34:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:438eda9b-2fde-472f-b734-7415b34009d2</guid><dc:creator>user16174</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I was about to post in the forums asking for Rust support and found this. Let me add a data point: there are (many) of us who, while writing lots of code in C, appreciate recent advancements and would *love* to switch to Rust, at least for some of the code.&lt;/p&gt;&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1152&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Rust bindings to nrf52 series</title><link>https://test-devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/rust-bindings-to-nrf52-series</link><pubDate>Thu, 25 Jan 2018 06:24:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:438eda9b-2fde-472f-b734-7415b34009d2</guid><dc:creator>user24103</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Great to see, that already someone started this.
I thought about doing something like this when I took a first look at rust some years ago (I think I even tested something on a STM32).
I hope I can find some time in the future to contribute to this - until then - good luck and thumbs up! ;-)&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1152&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Rust bindings to nrf52 series</title><link>https://test-devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/rust-bindings-to-nrf52-series</link><pubDate>Wed, 17 Jan 2018 17:39:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:438eda9b-2fde-472f-b734-7415b34009d2</guid><dc:creator>user8025</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Rust targets the LLVM, which is the compilation toolchain used for industry standard languages such as C++, Obj-C and Swift and is very mature + highly optimized at this point, with support from companies such as Microsoft, Apple, etc.&lt;/p&gt;
&lt;p&gt;Rust ensures zero-cost abstractions, pattern matching, memory safety (no dangling pointers, etc), at compile time rather than at run-time.&lt;/p&gt;
&lt;p&gt;Rust&amp;#39;s procedural macro system is much more powerful than C macros, and enables you to create things like &amp;quot;futures&amp;quot; which can abstract away things like manually coded state machines. The closest thing in C I&amp;#39;ve found are &amp;quot;protothreads&amp;quot; which are still not &amp;quot;zero-cost&amp;quot;.&lt;/p&gt;
&lt;p&gt;If you need to drop down to manual memory manipulation and ignore Rust&amp;#39;s safety guarantees around memory and data races, they provide an escape hatch keyword called &amp;quot;unsafe&amp;quot;, which doesn&amp;#39;t tend to need to be used.&lt;/p&gt;
&lt;p&gt;I do agree, the tooling around Rust on the embedded side needs improvement, and James Munns&amp;#39;s wrapper around the nRF52 SDK needs another layer to abstract the unsafe calls, but I&amp;#39;d be very happy to use Rust to create useful libraries which I&amp;#39;d call into from C at this point, just not as the application level code as well. I&amp;#39;ve been experimenting with calling into cbindgen to build a no-std library to integrate with C code as Rust has a very good FFI thanks to it&amp;#39;s lack of a runtime.&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1152&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Rust bindings to nrf52 series</title><link>https://test-devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/rust-bindings-to-nrf52-series</link><pubDate>Sun, 14 Jan 2018 17:06:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:438eda9b-2fde-472f-b734-7415b34009d2</guid><dc:creator>user17652</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Is that the best 60-second pitch for rust that you can come up with?&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1152&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Rust bindings to nrf52 series</title><link>https://test-devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/rust-bindings-to-nrf52-series</link><pubDate>Sun, 14 Jan 2018 15:04:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:438eda9b-2fde-472f-b734-7415b34009d2</guid><dc:creator>user15402</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;If you are interested in this topic, also search for japaric, svd2rust, &amp;quot;tock os&amp;quot;, &amp;quot;embedded rust&amp;quot;, and &amp;quot;open source bluetooth stack&amp;quot;.  If you are open to omitting the Nordic SDK entirely, and want the benefits of Rust in lower layers.&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1152&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Rust bindings to nrf52 series</title><link>https://test-devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/rust-bindings-to-nrf52-series</link><pubDate>Sun, 14 Jan 2018 02:08:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:438eda9b-2fde-472f-b734-7415b34009d2</guid><dc:creator>user17652</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;In other words, yet another Java? Seriously, for a crotchety curmudgeon like yours truly who&amp;#39;s a diehard C advocate (fyi, 30 yeras back would be c, and 40 years back would be Lisp &amp;amp; Fortran), why should I go through the pain of picking up another language that feels (&amp;lt;---- you do know this is a subjective judgement, don&amp;#39;t you?) modern when there are tons of other modern languages to pick from, say Go for instance?&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1152&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Rust bindings to nrf52 series</title><link>https://test-devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/rust-bindings-to-nrf52-series</link><pubDate>Fri, 12 Jan 2018 22:34:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:438eda9b-2fde-472f-b734-7415b34009d2</guid><dc:creator>user67773</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Why Rust? Language designers have learned a lot in 40 years. Rust has:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Built in tooling for compilation against different targets. Managing toolchains for different targets is officially supported&lt;/li&gt;
&lt;li&gt;Built in, standard package manager&lt;/li&gt;
&lt;li&gt;A type system that gives you abstraction without necessarily requiring indirection or additional memory cost. It&amp;#39;s possible to get the compiler assurance of abstractions, but with zero-sized types.&lt;/li&gt;
&lt;li&gt;compile time checking of race conditions and dangling pointers (although less important in single-threaded/no-heap environments).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It&amp;#39;s true that C++ has most/all of the &amp;quot;features&amp;quot; Rust has, but there is a benefit to using a language with a design that feels modern, and with strong built in tooling.&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1152&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Rust bindings to nrf52 series</title><link>https://test-devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/rust-bindings-to-nrf52-series</link><pubDate>Fri, 12 Jan 2018 22:26:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:438eda9b-2fde-472f-b734-7415b34009d2</guid><dc:creator>user17652</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;What&amp;#39;s the advantage of using Rust instead of C?&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1152&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>