<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>elebihan.com (Posts about embedded linux)</title><link>http://elebihan.com/</link><description></description><atom:link href="http://elebihan.com/categories/embedded-linux.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2023 &lt;a href="mailto:eric !at! elebihan !dot! com"&gt;Eric Le Bihan&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-NC-SA"
style="border-width:0; margin-bottom:12px;"
src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Mon, 27 Feb 2023 20:55:17 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>How to add a Buildroot package for a Cargo crate</title><link>http://elebihan.com/posts/how-to-add-a-buildroot-package-for-a-cargo-crate.html</link><dc:creator>Eric Le Bihan</dc:creator><description>&lt;div&gt;&lt;p&gt;Proper support for Rust and Cargo in Buildroot is available in the
"feature/rust" branch of &lt;a class="reference external" href="https://github.com/elebihan/buildroot/tree/feature/rust"&gt;this (personal) Buildroot repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this article, we will explain how to add a Buildroot package for a Cargo
crate (namely "hello-rust"). A Cargo package infrastructure may be added in the
future, to make the package development easier.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://elebihan.com/posts/how-to-add-a-buildroot-package-for-a-cargo-crate.html"&gt;Read more…&lt;/a&gt; (2 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>buildroot</category><category>embedded linux</category><category>rust</category><guid>http://elebihan.com/posts/how-to-add-a-buildroot-package-for-a-cargo-crate.html</guid><pubDate>Sat, 23 Apr 2016 14:04:22 GMT</pubDate></item><item><title>Generating Dynamically Linked Programs with Cargo</title><link>http://elebihan.com/posts/generating-dynamically-linked-programs-with-cargo.html</link><dc:creator>Eric Le Bihan</dc:creator><description>&lt;section id="big-statically-linked-programs"&gt;
&lt;h2&gt;Big, Statically Linked Programs&lt;/h2&gt;
&lt;p&gt;In a &lt;a class="reference external" href="http://elebihan.com/posts/using-cargo-with-buildroot-full-build.html"&gt;previous article&lt;/a&gt;, a Rust program was generated using Cargo:
&lt;cite&gt;hello-rust&lt;/cite&gt;.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_69dea470732e404cb059436458b691d2-1" name="rest_code_69dea470732e404cb059436458b691d2-1" href="http://elebihan.com/posts/generating-dynamically-linked-programs-with-cargo.html#rest_code_69dea470732e404cb059436458b691d2-1"&gt;&lt;/a&gt;$ cd $HOME/src/hello-rust
&lt;a id="rest_code_69dea470732e404cb059436458b691d2-2" name="rest_code_69dea470732e404cb059436458b691d2-2" href="http://elebihan.com/posts/generating-dynamically-linked-programs-with-cargo.html#rest_code_69dea470732e404cb059436458b691d2-2"&gt;&lt;/a&gt;$ stat -c "%s" target/arm-buildroot-linux-gnueabihf/release/hello-rust
&lt;a id="rest_code_69dea470732e404cb059436458b691d2-3" name="rest_code_69dea470732e404cb059436458b691d2-3" href="http://elebihan.com/posts/generating-dynamically-linked-programs-with-cargo.html#rest_code_69dea470732e404cb059436458b691d2-3"&gt;&lt;/a&gt;218732
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The size of the binary file generated is 213 KB. Stripped, it will go down to
115 KB. This is indeed a big "Hello World"! Due to the architecture of the
runtime, all I/O handling code is included in any statically linked binary,
which is the default for &lt;cite&gt;rustc&lt;/cite&gt; (running &lt;cite&gt;strings&lt;/cite&gt; on the file ends up with a
scary result).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://elebihan.com/posts/generating-dynamically-linked-programs-with-cargo.html"&gt;Read more…&lt;/a&gt; (4 min remaining to read)&lt;/p&gt;&lt;/section&gt;</description><category>buildroot</category><category>embedded linux</category><category>rust</category><guid>http://elebihan.com/posts/generating-dynamically-linked-programs-with-cargo.html</guid><pubDate>Sat, 02 Apr 2016 18:42:22 GMT</pubDate></item><item><title>Using Cargo with Buildroot (full build)</title><link>http://elebihan.com/posts/using-cargo-with-buildroot-full-build.html</link><dc:creator>Eric Le Bihan</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/rust-lang/cargo/"&gt;Cargo&lt;/a&gt; is the official Rust package manager. It will fetch the dependencies of
a Rust project and compile everything. Adding support for Cargo in Buildroot
will allow the end user to to easily cross-compile programs for an embedded
system.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://elebihan.com/posts/using-cargo-with-buildroot-full-build.html"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>buildroot</category><category>embedded linux</category><category>rust</category><guid>http://elebihan.com/posts/using-cargo-with-buildroot-full-build.html</guid><pubDate>Thu, 31 Mar 2016 18:50:01 GMT</pubDate></item><item><title>Using Rust with Buildroot (full build)</title><link>http://elebihan.com/posts/using-rust-with-buildroot-full-build.html</link><dc:creator>Eric Le Bihan</dc:creator><description>&lt;div&gt;&lt;p&gt;In a &lt;a class="reference external" href="http://elebihan.com/posts/using-rust-with-buildroot-pre-built-binaries.html"&gt;previous article&lt;/a&gt;,  we've seen how to add support for the Rust
programming language in Buildroot, using the pre-built binaries.&lt;/p&gt;
&lt;p&gt;This time, we will add support for Rust by building a cross-compiler in the
Buildroot environment. We will use the same example as previously, based on a
QEMU ARM Versatile Express system.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://elebihan.com/posts/using-rust-with-buildroot-full-build.html"&gt;Read more…&lt;/a&gt; (4 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>buildroot</category><category>embedded linux</category><category>rust</category><guid>http://elebihan.com/posts/using-rust-with-buildroot-full-build.html</guid><pubDate>Tue, 29 Mar 2016 15:58:11 GMT</pubDate></item><item><title>Using Rust with Buildroot (pre-built binaries)</title><link>http://elebihan.com/posts/using-rust-with-buildroot-pre-built-binaries.html</link><dc:creator>Eric Le Bihan</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;a class="reference external" href="https://www.rust-lang.org"&gt;Rust&lt;/a&gt; is a modern, compiled, programming language, oriented towards safety,
memory control and concurrency. Its performances are comparable to C++.&lt;/p&gt;
&lt;p&gt;Rust's features make it a good candidate for writing programs for embedded
systems.&lt;/p&gt;
&lt;p&gt;In this article, we will build a system for QEMU ARM Vexpress using &lt;a class="reference external" href="https://buildroot.org"&gt;Buildroot&lt;/a&gt;,
then add support for Rust by installing the pre-built toolchain in the Buildroot
environment. Finally, we will write a test program in Rust, compile it and run
it from the generated system.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://elebihan.com/posts/using-rust-with-buildroot-pre-built-binaries.html"&gt;Read more…&lt;/a&gt; (2 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>buildroot</category><category>embedded linux</category><category>rust</category><guid>http://elebihan.com/posts/using-rust-with-buildroot-pre-built-binaries.html</guid><pubDate>Sat, 19 Mar 2016 16:34:51 GMT</pubDate></item></channel></rss>