<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>Steven Le Rouzic</title>
      <link>https://stevenlr.com</link>
      <description>Programming, graphics, and more</description>
      <generator>Zola</generator>
      <language>en</language>
      <atom:link href="https://stevenlr.com/rss.xml" rel="self" type="application/rss+xml"/>
      <lastBuildDate>Sat, 04 May 2019 00:00:00 +0000</lastBuildDate>
      <item>
          <title>Handmade Rust Part 4: Generating Vulkan bindings</title>
          <pubDate>Sat, 04 May 2019 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://stevenlr.com/blog/handmade-rust-4-vulkan-bindings/</link>
          <guid>https://stevenlr.com/blog/handmade-rust-4-vulkan-bindings/</guid>
          <description xml:base="https://stevenlr.com/blog/handmade-rust-4-vulkan-bindings/">&lt;p&gt;Vulkan is a C API so we’ll need some kind of bindings to be able to use it in Rust. The API is defined in a XML file distributed by Khronos. This file describes the structs, enums, constants, and functions for each version of the API, and all published extensions. The functions can then be loaded from the Vulkan dynamic library and other functions from the API.&lt;&#x2F;p&gt;</description>
      </item>
      <item>
          <title>Handmade Rust Part 3: Containers</title>
          <pubDate>Sat, 23 Mar 2019 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://stevenlr.com/blog/handmade-rust-3-containers/</link>
          <guid>https://stevenlr.com/blog/handmade-rust-3-containers/</guid>
          <description xml:base="https://stevenlr.com/blog/handmade-rust-3-containers/">&lt;p&gt;The most commonly used kinds of containers are arrays and maps. Pretty much any other container type can be built using those two, so that’s what we’ll build today!&lt;&#x2F;p&gt;
&lt;p&gt;The Rust standard library has &lt;code&gt;Vec&lt;&#x2F;code&gt; which is a dynamic array and &lt;code&gt;HashMap&lt;&#x2F;code&gt; and &lt;code&gt;BTreeMap&lt;&#x2F;code&gt; which are two kind of maps, the first one relying on the key being hashable, and the second one relying on the key being sortable.&lt;&#x2F;p&gt;
&lt;p&gt;The hash map has the cost of hashing the key but then lookup is constant time (in theory at least), whereas the ordered map only compares the keys, but lookup is logarithmic time. I chose to implement a hash map because it’s the one I find myself using most of the time, but ordered map are interesting as well.&lt;&#x2F;p&gt;
&lt;p&gt;Of course, just like for &lt;code&gt;Unq&lt;&#x2F;code&gt;, we won’t be making simple replacements, instead we’ll be making the most minimal containers necessary for now and add features later as needed, but we’ll be make them allocator aware.&lt;&#x2F;p&gt;
&lt;p&gt;As always, full source code is available at &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;stevenlr&#x2F;HandmadeRust&quot;&gt;github.com&#x2F;stevenlr&#x2F;HandmadeRust&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;</description>
      </item>
      <item>
          <title>Handmade Rust Part 2: Unq, an allocator-aware Box</title>
          <pubDate>Mon, 11 Feb 2019 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://stevenlr.com/blog/handmade-rust-2-unq/</link>
          <guid>https://stevenlr.com/blog/handmade-rust-2-unq/</guid>
          <description xml:base="https://stevenlr.com/blog/handmade-rust-2-unq/">&lt;p&gt;In the Rust standard library, &lt;code&gt;Box&lt;&#x2F;code&gt; is a RAII wrapper for an object on the heap. It’s actually a special type that’s not implemented purely in the library, but also use special features called lang items. It uses the global allocator to allocate its memory. We want a similar type that also has an allocator associated to it. We’ll call it &lt;code&gt;Unq&lt;&#x2F;code&gt;, which mirror C++’s &lt;code&gt;unique_ptr&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;</description>
      </item>
      <item>
          <title>Handmade Rust Part 1: Introduction &amp; Allocators</title>
          <pubDate>Sun, 10 Feb 2019 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://stevenlr.com/blog/handmade-rust-1-allocators/</link>
          <guid>https://stevenlr.com/blog/handmade-rust-1-allocators/</guid>
          <description xml:base="https://stevenlr.com/blog/handmade-rust-1-allocators/">&lt;p&gt;Welcome to Handmade Rust, a series (hopefully) where I will be developing a Vulkan rendering engine in Rust the Handmade way. By this, I mean using no external libraries, not even the Rust standard library, only the core lib. I am doing this mainly for my own enjoyment but also because I want to get better at writing Rust, and sometimes the best way to really understand something is to just do it yourself. The project will be available on GitHub at &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;stevenlr&#x2F;HandmadeRust&quot;&gt;stevenlr&#x2F;HandmadeRust&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;</description>
      </item>
    </channel>
</rss>
