<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Lucio Franco</title>
    <subtitle>Don&#x27;t panic</subtitle>
    <link rel="self" type="application/atom+xml" href="https://luciofranco.com/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://luciofranco.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-05-19T10:00:00-04:00</updated>
    <id>https://luciofranco.com/atom.xml</id>
    <entry xml:lang="en">
        <title>Tonic is joining the gRPC project</title>
        <published>2026-05-19T10:00:00-04:00</published>
        <updated>2026-05-19T10:00:00-04:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://luciofranco.com/blog/tonic-joins-grpc/"/>
        <id>https://luciofranco.com/blog/tonic-joins-grpc/</id>
        
        <content type="html" xml:base="https://luciofranco.com/blog/tonic-joins-grpc/">&lt;p&gt;Over the next week &lt;code&gt;hyperium&#x2F;tonic&lt;&#x2F;code&gt; will become &lt;code&gt;grpc&#x2F;grpc-rust&lt;&#x2F;code&gt; and we will publish a preview release of the new &lt;code&gt;grpc&lt;&#x2F;code&gt; crate. This marks a significant next step for the &lt;code&gt;tonic&lt;&#x2F;code&gt; project and for all &lt;code&gt;gRPC&lt;&#x2F;code&gt; users in Rust as it will be upstreamed to the official &lt;a href=&quot;https:&#x2F;&#x2F;grpc.io&#x2F;&quot;&gt;gRPC project&lt;&#x2F;a&gt;. The gRPC project is a part of the Cloud Native Computing Foundation (&lt;a href=&quot;https:&#x2F;&#x2F;www.cncf.io&#x2F;&quot;&gt;CNCF&lt;&#x2F;a&gt;), a division of The Linux Foundation.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-tonic-got-here&quot;&gt;How tonic got here&lt;&#x2F;h2&gt;
&lt;p&gt;Before we get into the details, I would like to first give a little summary of the history of &lt;code&gt;tonic&lt;&#x2F;code&gt;. I created the project summer of 2019 mostly because I wanted to write some distributed systems in Rust. Originally, Carl Lerche had written &lt;code&gt;tower-grpc&lt;&#x2F;code&gt; that was being used at Buoyant at the time which provided the perfect initial framework to get started writing a real gRPC library for Rust. This was all around the time async&#x2F;await was about to release so I had set myself up a target to create the first production ready async&#x2F;await Rust library. I spent all of my free time building the project trying to get it out the door. Finally in the fall of 2019 I made the first 0.1 release. From that point on the rest is history and the project has now amassed more than 12k stars on github and is being used in many large engineering organizations.&lt;&#x2F;p&gt;
&lt;p&gt;While I am very appreciative of the growth and support the project has brought the community and myself, it has gotten quite hard to maintain. Building new features requires significant time investment and reviewing new changes had become unsustainable with the amount of maintenance resources available to the project. On top of this, the &lt;code&gt;prost&lt;&#x2F;code&gt; project had gone unmaintained and we &lt;code&gt;tonic&lt;&#x2F;code&gt; maintainers had no choice but to adopt it into our family since it was a core dependency. This brought the maintenance burden up significantly. As the years passed and my life changed I started to lose the time needed to fully maintain the project and I was struggling to find maintainers that would stick around. This is a very normal process for large OSS projects and this is a common theme in the OSS community. This has all lead to the project not accepting new features and only really addressing high&#x2F;urgent priority bugs and most importantly security issues.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what-s-changing&quot;&gt;What&#x27;s changing&lt;&#x2F;h2&gt;
&lt;p&gt;Fast forward to the start of 2024, I had gotten an email from Doug Fawley from the gRPC team at Google. He had reached out asking if we would be open to collaborating and that he was going to be working on gRPC-Rust and did not want to fracture the ecosystem in an unnecessary way. This was the beginning of gRPC-Rust, since then we have been meeting every week and I have been dedicating my time to helping them figure out how we can best position their needs and the needs of the &lt;code&gt;tonic&lt;&#x2F;code&gt; community.&lt;&#x2F;p&gt;
&lt;p&gt;Over these last two years the team at Google has been working on gRPC-Rust as a new crate that will include many new optimizations and in general bring the gRPC implementation up to the quality bar that the other gRPC implementations are already at. To support this though, there is a new fresh implementation that leverages a new API to support things like controlling allocations, etc. While this is great, there are still a lot of users that use tonic and would not be able to rewrite their code base easily to this new structure. To support our original core tenet of supporting the current community we have also designed any new transport features (non user code gen) to be compatible with &lt;code&gt;tonic&lt;&#x2F;code&gt;&#x27;s codegen. This means all the new load balancer and thick client features that will be coming to the new transports will be available to current &lt;code&gt;tonic&lt;&#x2F;code&gt; users by changing their channel. This likely means that we will eventually deprecate the old tonic transport to make &lt;code&gt;tonic&lt;&#x2F;code&gt; lighter and transition it to becoming a more ergonomic rusty implementation while still gaining tons of benefits of the new work. We are still working through the details here, and the preview release that will be coming out soon will actually still be based on the tonic transport, but we will be going in this direction as we continue to implement the new client and server in grpc-rust.&lt;&#x2F;p&gt;
&lt;p&gt;One of the benefits of creating this working group has been our ability to find other companies that are interested in contributing. Here is where the folks at LinkedIn have stepped in to contribute one of the most requested and difficult features to implement: xDS. If you do not already know xDS is a discovery service that provides gRPC clients detailed information on how to reach and load balance across a service. It is used as the core protocol for service mesh products like Envoy. It is extremely complex and something that we never had the resources to build in tonic. Thanks to the work that the folks at LinkedIn have done we will be shipping a new &lt;code&gt;tonic-xds&lt;&#x2F;code&gt; crate and then will be reusing the internal machinery to also provide an implementation for the new &lt;code&gt;grpc&lt;&#x2F;code&gt; crate as well.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;joining-the-cncf&quot;&gt;Joining the CNCF&lt;&#x2F;h2&gt;
&lt;p&gt;With all of this work that the working group has done it has finally reached a point where we are ready to upstream the &lt;code&gt;tonic&lt;&#x2F;code&gt; project into the CNCF owned &lt;code&gt;grpc&lt;&#x2F;code&gt; org. I will continue to be a core maintainer of the project but we will be welcoming engineers from Google, LinkedIn and Datadog to help maintain the new and old projects. This is &lt;code&gt;tonic&lt;&#x2F;code&gt; reaching its adulthood and finally reaching for the next level. Rust users can expect a very good and solid production-ready implementation from the gRPC-Rust team over the next year. As we continue with this transition, I encourage everyone to speak up and provide feedback as we continue to forge a path for the old and new.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Tonic: 0.2 with the future in mind!</title>
        <published>2020-04-01T10:00:00-04:00</published>
        <updated>2020-04-01T10:00:00-04:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://luciofranco.com/blog/tonic-0-2-release/"/>
        <id>https://luciofranco.com/blog/tonic-0-2-release/</id>
        
        <content type="html" xml:base="https://luciofranco.com/blog/tonic-0-2-release/">&lt;h1 id=&quot;tonic-0-2-release-with-the-future-in-mind&quot;&gt;Tonic: 0.2 release with the future in mind!&lt;&#x2F;h1&gt;
&lt;p&gt;After a few months of work we finally have released &lt;code&gt;tonic&lt;&#x2F;code&gt; 0.2. This
release marks the start of a new path for &lt;code&gt;tonic&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;generic-encoding&quot;&gt;Generic encoding&lt;&#x2F;h2&gt;
&lt;p&gt;Originally, &lt;code&gt;tonic&lt;&#x2F;code&gt; was a wrapper around &lt;code&gt;hyper&lt;&#x2F;code&gt;, &lt;code&gt;tower&lt;&#x2F;code&gt; and &lt;code&gt;prost&lt;&#x2F;code&gt; providing a
good out of the box experience for protobuf based gRPC services. With 0.2 &lt;code&gt;tonic&lt;&#x2F;code&gt;
&lt;em&gt;still&lt;&#x2F;em&gt; provides a great out of box experience for protobuf but now also
supports other encoding formats! &lt;code&gt;tonic&lt;&#x2F;code&gt; has always supported custom codecs
via the &lt;code&gt;tonic::codec::Codec&lt;&#x2F;code&gt; trait but codegen would always tie directly to
&lt;code&gt;prost&lt;&#x2F;code&gt;. Which means that if you wanted to write a custom codec you would have
to manually replicate what &lt;code&gt;tonic-build&lt;&#x2F;code&gt; does. This is no longer true as we now
have traits that can be implemented within &lt;code&gt;tonic-build&lt;&#x2F;code&gt; to guide codegen in the
correct direction.&lt;&#x2F;p&gt;
&lt;p&gt;In the future, &lt;code&gt;tonic&lt;&#x2F;code&gt; will also provide support for flatbuffers via the new
work in-progress &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;butte-rs&#x2F;butte&quot;&gt;&lt;code&gt;butte&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; crate! &lt;code&gt;tonic&lt;&#x2F;code&gt; 0.2 supports the groundwork for this
and we will create an accompanying crate that will provide all the types you need
in the future.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;healthchecks&quot;&gt;Healthchecks&lt;&#x2F;h2&gt;
&lt;p&gt;Another common feature request has been providing a way to support gRPC
healthchecks. After some work &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;jen20&quot;&gt;@jen20&lt;&#x2F;a&gt; has implemented the &lt;code&gt;tonic-health&lt;&#x2F;code&gt;
crate which provides support for server side health reporting.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;let &lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;mut&lt;&#x2F;span&gt;&lt;span&gt; health_reporter, health_service) = tonic_health::server::health_reporter();
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;&#x2F;&#x2F; Set our Greeter service to serving.
&lt;&#x2F;span&gt;&lt;span&gt;health_reporter
&lt;&#x2F;span&gt;&lt;span&gt;        .set_serving::&amp;lt;GreeterServer&amp;lt;MyGreeter&amp;gt;&amp;gt;()
&lt;&#x2F;span&gt;&lt;span&gt;        .await;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;&#x2F;&#x2F; Add healthcheck service to our router
&lt;&#x2F;span&gt;&lt;span&gt;Server::builder()
&lt;&#x2F;span&gt;&lt;span&gt;    .&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;add_service&lt;&#x2F;span&gt;&lt;span&gt;(health_service)
&lt;&#x2F;span&gt;&lt;span&gt;    .&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;add_service&lt;&#x2F;span&gt;&lt;span&gt;(GreeterServer::new(greeter))
&lt;&#x2F;span&gt;&lt;span&gt;    .&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;serve&lt;&#x2F;span&gt;&lt;span&gt;(addr)
&lt;&#x2F;span&gt;&lt;span&gt;    .await?;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example can be found &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;blob&#x2F;master&#x2F;examples&#x2F;src&#x2F;health&#x2F;server.rs&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;v0-2-0&quot;&gt;v0.2.0&lt;&#x2F;h2&gt;
&lt;p&gt;Thanks to all the wonderful contributors for helping get this release over the finish
line. As always, there is a  &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;blob&#x2F;master&#x2F;CHANGELOG.md&quot;&gt;changelog&lt;&#x2F;a&gt; and
an &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;issues&quot;&gt;issue&lt;&#x2F;a&gt; tracker if you run into any issues. Please, feel welcome to also join us on &lt;a href=&quot;https:&#x2F;&#x2F;discord.gg&#x2F;tokio&quot;&gt;discord&lt;&#x2F;a&gt;
if you need any help!&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Tonic: 0.1 has arrived!</title>
        <published>2020-01-14T10:00:00-04:00</published>
        <updated>2020-01-14T10:00:00-04:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://luciofranco.com/blog/announce-tonic-0-1/"/>
        <id>https://luciofranco.com/blog/announce-tonic-0-1/</id>
        
        <content type="html" xml:base="https://luciofranco.com/blog/announce-tonic-0-1/">&lt;h1 id=&quot;tonic-0-1-has-arrived&quot;&gt;Tonic: 0.1 has arrived!&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&quot;&gt;&lt;code&gt;tonic&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; is a gRPC over HTTP&#x2F;2 implementation focused on high performance,
interoperability, and flexibility.
It has been a few months since I originally released the &lt;code&gt;0.1.0-alpha.1&lt;&#x2F;code&gt; version. Since then there has been a ton of growth and improvements. We&#x27;ve seen 32 new &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;graphs&#x2F;contributors&quot;&gt;&lt;code&gt;contributors&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;, two new
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;blob&#x2F;master&#x2F;examples&quot;&gt;&lt;code&gt;guides&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;, 8 more &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;tree&#x2F;master&#x2F;examples&#x2F;src&quot;&gt;&lt;code&gt;examples&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; and 5  &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;releases&quot;&gt;&lt;code&gt;releases&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;. Not only have we seen a lot of growth internally but we&#x27;ve also seen a large amount of adoption.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;changes&quot;&gt;Changes&lt;&#x2F;h2&gt;
&lt;p&gt;Since the first &lt;code&gt;0.1.0-alpha.1&lt;&#x2F;code&gt; release, Tonic made several ergonomic changes.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;upgrades-everywhere&quot;&gt;Upgrades EVERYWHERE&lt;&#x2F;h3&gt;
&lt;p&gt;Tonic was originally released as an alpha because a majority of the crates it depended on were also alphas. &lt;code&gt;0.1&lt;&#x2F;code&gt; signifies that all our dependencies are as lean
as possible.
For instance: &lt;code&gt;syn&lt;&#x2F;code&gt; and &lt;code&gt;quote&lt;&#x2F;code&gt; are at 1.0,  &lt;code&gt;bytes&lt;&#x2F;code&gt;  is set to 0.5 and &lt;code&gt;hyper&lt;&#x2F;code&gt; is at 0.13
Thanks to all the maintainers for helping push out all these releases! Also, I would like to note that &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;EmbarkStudios&#x2F;cargo-deny&quot;&gt;&lt;code&gt;cargo-deny&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; has been very helpful in ensuring that we have no duplicate
dependencies!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;goodbye-openssl-hello-rustls&quot;&gt;Goodbye openssl, hello rustls&lt;&#x2F;h3&gt;
&lt;p&gt;The build-in transport module no longer supports &lt;code&gt;openssl&lt;&#x2F;code&gt;. Instead, Tonic defaults to &lt;code&gt;rustls&lt;&#x2F;code&gt;, which should simplify building Tonic-based applications and libraries. However, I recognize that Tonic users might want to use a different TLS library, so Tonic supports customization via &lt;a href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;tonic&#x2F;0.1.0&#x2F;tonic&#x2F;transport&#x2F;struct.Endpoint.html#method.connect_with_connector&quot;&gt;constructor client&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;tonic&#x2F;0.1.0&#x2F;tonic&#x2F;transport&#x2F;server&#x2F;struct.Router.html#method.serve_with_incoming&quot;&gt;constructor server&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;interceptors&quot;&gt;Interceptors&lt;&#x2F;h3&gt;
&lt;p&gt;Tonic also supports gRPC interceptors (non-gRPC ecosystems might refer to “interceptors” as “middleware”). Like the name suggests, interceptors allow clients and servers to intercept a request and perform an arbitrary action, like adding headers to sign a request or logging a request. See the example below:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;#[&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;tokio&lt;&#x2F;span&gt;&lt;span&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;main&lt;&#x2F;span&gt;&lt;span&gt;]
&lt;&#x2F;span&gt;&lt;span&gt;async &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;fn &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fa1b3;&quot;&gt;main&lt;&#x2F;span&gt;&lt;span&gt;() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; channel = Endpoint::from_static(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;http:&#x2F;&#x2F;[::1]:50051&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;)
&lt;&#x2F;span&gt;&lt;span&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;connect&lt;&#x2F;span&gt;&lt;span&gt;()
&lt;&#x2F;span&gt;&lt;span&gt;        .await?;
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;let mut&lt;&#x2F;span&gt;&lt;span&gt; client = GreeterClient::with_interceptor(channel, intercept);
&lt;&#x2F;span&gt;&lt;span&gt;   &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;&#x2F;&#x2F; snip
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;&#x2F;&#x2F;&#x2F; This function will get called on each outbound request. Returning a
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;&#x2F;&#x2F;&#x2F; `Status` here will cancel the request and have that status returned to
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;&#x2F;&#x2F;&#x2F; the client.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;fn &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fa1b3;&quot;&gt;intercept&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;req&lt;&#x2F;span&gt;&lt;span&gt;: Request&amp;lt;()&amp;gt;) -&amp;gt; Result&amp;lt;Request&amp;lt;()&amp;gt;, Status&amp;gt; {
&lt;&#x2F;span&gt;&lt;span&gt;    println!(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;Intercepting request: &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;{:?}&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;, req);
&lt;&#x2F;span&gt;&lt;span&gt;    Ok(req)
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;One key thing to note here is that these interceptors are transport agnostic. They are pure gRPC, it does
not matter where you get the request from, it could be via &lt;code&gt;grpc-web&lt;&#x2F;code&gt; or &lt;code&gt;http2&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;More examples of this usage can be found &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;tree&#x2F;master&#x2F;examples&#x2F;src&#x2F;interceptor&quot;&gt;&lt;code&gt;here&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;v0-1-0&quot;&gt;v0.1.0&lt;&#x2F;h2&gt;
&lt;p&gt;I&#x27;d like to give a special shoutout to all those that helped the project grow by opening issues, trying
Tonic out and opening PRs.&lt;&#x2F;p&gt;
&lt;p&gt;That said, I am super happy to finally release the &lt;code&gt;0.1&lt;&#x2F;code&gt; release of &lt;code&gt;tonic&lt;&#x2F;code&gt;. This is the first stepping
stone in a great ecosystem built on top of &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tower-rs&#x2F;tower&quot;&gt;&lt;code&gt;tower&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;. As always, there is a  &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;blob&#x2F;master&#x2F;CHANGELOG.md&quot;&gt;changelog&lt;&#x2F;a&gt; and
an &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;issues&quot;&gt;issue&lt;&#x2F;a&gt; tracker if you run into any issues. Please, feel welcome to also join us on &lt;a href=&quot;https:&#x2F;&#x2F;discord.gg&#x2F;tokio&quot;&gt;discord&lt;&#x2F;a&gt;
if you need any help!&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Tonic: gRPC has come to async&#x2F;await!</title>
        <published>2019-10-02T10:00:00-04:00</published>
        <updated>2019-10-02T10:00:00-04:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://luciofranco.com/blog/tonic-grpc-has-come-to-async-await/"/>
        <id>https://luciofranco.com/blog/tonic-grpc-has-come-to-async-await/</id>
        
        <content type="html" xml:base="https://luciofranco.com/blog/tonic-grpc-has-come-to-async-await/">&lt;h1 id=&quot;tonic-grpc-has-come-to-async-await&quot;&gt;Tonic: gRPC has come to async&#x2F;await!&lt;&#x2F;h1&gt;
&lt;p&gt;I am pleased to finally announce a crate that I have been working very hard on for the
past few months. &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&quot;&gt;&lt;code&gt;tonic&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; has finally hit the initial &lt;a href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;tonic&#x2F;0.1.0-alpha.1&quot;&gt;&lt;code&gt;0.1.0-alpha.1&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; release! Stable
releases will follow in the coming months.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;what-is-tonic&quot;&gt;What is Tonic?&lt;&#x2F;h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Tonic is a gRPC-over-HTTP&#x2F;2 implementation focused on high performance, interoperability, and flexibility. This library was created to have first class support of async&#x2F;await and to act as a core building block for production systems written in Rust.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Tonic began its life as  &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tower-rs&#x2F;tower-grpc&quot;&gt;&lt;code&gt;tower-grpc&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;, which was built to satisfy &lt;a href=&quot;https:&#x2F;&#x2F;linkerd.io&#x2F;&quot;&gt;linkerd&lt;&#x2F;a&gt;&#x27;s need for a production-ready gRPC implementation. &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tower-rs&#x2F;tower-grpc&quot;&gt;&lt;code&gt;tower-grpc&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; was based upon &lt;code&gt;futures 0.1&lt;&#x2F;code&gt; and built ontop of the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tower-rs&#x2F;tower&quot;&gt;&lt;code&gt;tower&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; library, which has production uses in systems such as the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;linkerd&#x2F;linkerd2-proxy&quot;&gt;&lt;code&gt;linkerd-proxy&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;, &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;timberio&#x2F;vector&quot;&gt;&lt;code&gt;vector&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;, and the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;mit-pdos&#x2F;noria&quot;&gt;&lt;code&gt;noria&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; database at MIT. The &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tower-rs&#x2F;tower&quot;&gt;&lt;code&gt;tower&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; library has also seen usage in additional libraries such as  &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;seanmonstar&#x2F;warp&quot;&gt;&lt;code&gt;warp&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;, &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;carllerche&#x2F;tower-web&quot;&gt;&lt;code&gt;tower-web&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;, and &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;actix&#x2F;actix-net&quot;&gt;&lt;code&gt;actix-net&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;With async&#x2F;await’s forthcoming stabilization, we created Tonic to support the new syntax natively. This means clients will support async&#x2F;await out of the box and server
implementations can be defined via &lt;a href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;async-trait&quot;&gt;&lt;code&gt;async_trait&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;s. This provides an unparalleled experience for
writing async services quickly and efficiently. Not only does Tonic provide a fully featured gRPC implementation but it also comes with a fully featured, batteries-included, HTTP&#x2F;2 client and server built
around &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;hyper&quot;&gt;&lt;code&gt;hyper&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;, &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tokio-rs&#x2F;tokio&quot;&gt;&lt;code&gt;tokio&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tower-rs&#x2F;tower&quot;&gt;&lt;code&gt;tower&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;. Both the client and server implementation provide TLS backed by
either &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;sfackler&#x2F;rust-openssl&quot;&gt;&lt;code&gt;openssl&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; or &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ctz&#x2F;rustls&quot;&gt;&lt;code&gt;rustls&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;. The client provides load balancing, interceptors (middleware), timeouts, rate limiting, concurrency control and more!&lt;&#x2F;p&gt;
&lt;p&gt;Tonic also boasts strong interoperability and correctness. Every commit is checked that it passes
the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;grpc&#x2F;grpc&#x2F;blob&#x2F;master&#x2F;doc&#x2F;interop-test-descriptions.md&quot;&gt;gRPC interop test cases&lt;&#x2F;a&gt; against the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;grpc&#x2F;grpc-go&quot;&gt;&lt;code&gt;grpc-go&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; implementation. Hopefully, more
languages can be added in the future.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;features&quot;&gt;Features&lt;&#x2F;h3&gt;
&lt;p&gt;Tonic&#x27;s goal is to provide a good batteries-included experience. It already
supports many features, with many more planned! Here is a list of features:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Implemented in pure Rust (minus &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;sfackler&#x2F;rust-openssl&quot;&gt;&lt;code&gt;openssl&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; which is optional)&lt;&#x2F;li&gt;
&lt;li&gt;Interoperability tested via &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;tree&#x2F;master&#x2F;tonic-interop&quot;&gt;&lt;code&gt;tonic-interop&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Bi-directional streaming&lt;&#x2F;li&gt;
&lt;li&gt;Custom metadata&lt;&#x2F;li&gt;
&lt;li&gt;Trailing metadata&lt;&#x2F;li&gt;
&lt;li&gt;Codegen via &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;danburkert&#x2F;prost&quot;&gt;&lt;code&gt;prost&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Exposes &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tokio-rs&#x2F;tracing&quot;&gt;&lt;code&gt;tracing&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; diagnostics&lt;&#x2F;li&gt;
&lt;li&gt;Fully featured HTTP&#x2F;2 client and server based on &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;hyper&quot;&gt;&lt;code&gt;hyper&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;TLS backed by either &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;sfackler&#x2F;rust-openssl&quot;&gt;&lt;code&gt;openssl&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; or &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ctz&#x2F;rustls&quot;&gt;&lt;code&gt;rustls&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Load balancing powered by &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tower-rs&#x2F;tower&quot;&gt;&lt;code&gt;tower&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Reliability features such as timeouts, rate limiting, concurrency control, and more&lt;&#x2F;li&gt;
&lt;li&gt;gRPC interceptors&lt;&#x2F;li&gt;
&lt;li&gt;And much more to come&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;overview&quot;&gt;Overview&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;em&gt;helloworld &lt;strong&gt;client&lt;&#x2F;strong&gt; example:&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;let mut&lt;&#x2F;span&gt;&lt;span&gt; client = GreeterClient::connect(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;http:&#x2F;&#x2F;[::1]:50051&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;)?;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; request = Request::new(HelloRequest {
&lt;&#x2F;span&gt;&lt;span&gt;    name: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;hello&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;into&lt;&#x2F;span&gt;&lt;span&gt;(),
&lt;&#x2F;span&gt;&lt;span&gt;});
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; response = client.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;say_hello&lt;&#x2F;span&gt;&lt;span&gt;(request).await?;
&lt;&#x2F;span&gt;&lt;span&gt;println!(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;RESPONSE=&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;{:?}&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;, response);
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This shows how easy it is to build a simple gRPC client using code generated by the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;tree&#x2F;master&#x2F;tonic-build&quot;&gt;&lt;code&gt;tonic-build&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; crate.  Internally, &lt;code&gt;connect&lt;&#x2F;code&gt; will create the most basic &quot;channel&#x2F;client&quot; but it is possible to configure this to support TLS, load balancing, timeouts and more.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;helloworld &lt;strong&gt;server&lt;&#x2F;strong&gt; example:&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;rust&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-rust &quot;&gt;&lt;code class=&quot;language-rust&quot; data-lang=&quot;rust&quot;&gt;&lt;span&gt;#[&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;tonic&lt;&#x2F;span&gt;&lt;span&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;async_trait&lt;&#x2F;span&gt;&lt;span&gt;]
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;impl &lt;&#x2F;span&gt;&lt;span&gt;Greeter &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;for &lt;&#x2F;span&gt;&lt;span&gt;MyGreeter {
&lt;&#x2F;span&gt;&lt;span&gt;    async &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;fn &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fa1b3;&quot;&gt;say_hello&lt;&#x2F;span&gt;&lt;span&gt;(&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;req&lt;&#x2F;span&gt;&lt;span&gt;: Request&amp;lt;HelloRequest&amp;gt;)
&lt;&#x2F;span&gt;&lt;span&gt;        -&amp;gt; Result&amp;lt;Response&amp;lt;HelloReply&amp;gt;, Status&amp;gt;
&lt;&#x2F;span&gt;&lt;span&gt;    {
&lt;&#x2F;span&gt;&lt;span&gt;        println!(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;Got a request: &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;{:?}&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;, req);
&lt;&#x2F;span&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; reply = HelloReply {
&lt;&#x2F;span&gt;&lt;span&gt;            message: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;Zomg, it works!&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;into&lt;&#x2F;span&gt;&lt;span&gt;(),
&lt;&#x2F;span&gt;&lt;span&gt;        };
&lt;&#x2F;span&gt;&lt;span&gt;        Ok(Response::new(reply))
&lt;&#x2F;span&gt;&lt;span&gt;    }
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Servers are simple to implement using &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;dtolnay&quot;&gt;&lt;code&gt;dtolnay&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&#x27;s amazing &lt;a href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;async-trait&quot;&gt;&lt;code&gt;async_trait&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; crate,
which allow server implementations to use &lt;code&gt;async fn&lt;&#x2F;code&gt; for their implementation. The &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;tree&#x2F;master&#x2F;tonic-examples&quot;&gt;&lt;code&gt;tonic-examples&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;
crate demonstrates more advanced cases with TLS, authentication, load balancing, streaming and more.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;moving-forward&quot;&gt;Moving forward&lt;&#x2F;h3&gt;
&lt;p&gt;Today marks Tonic&#x27;s first alpha release, and over the next few months we will be working hard
to ensure that Tonic is ready for production usage. A lot of the implementation has already
been proven in production environments via &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tower-rs&#x2F;tower-grpc&quot;&gt;&lt;code&gt;tower-grpc&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;. Over the next few months as &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tokio-rs&#x2F;tokio&quot;&gt;&lt;code&gt;tokio&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; 0.2
comes closer to a full stable release, Tonic will follow with its own stable releases.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&quot;&gt;&lt;code&gt;tonic&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; is now available! There is &lt;a href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;tonic&#x2F;0.1.0-alpha.1&#x2F;tonic&#x2F;&quot;&gt;documentation&lt;&#x2F;a&gt;, &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;tree&#x2F;master&#x2F;tonic-examples&quot;&gt;examples&lt;&#x2F;a&gt; and
an &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;hyperium&#x2F;tonic&#x2F;issues&#x2F;new&quot;&gt;issue&lt;&#x2F;a&gt; tracker! Please provide any feedback, as we would love to improve this library
any way we can!&lt;&#x2F;p&gt;
&lt;p&gt;Thank you to all the super awesome contributors that have helped over the past few months! Your
feedback has been immensely important and valuable!&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Amethyst: The Gem in the Rust</title>
        <published>2018-10-28T13:00:00-04:00</published>
        <updated>2018-10-28T13:00:00-04:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://luciofranco.com/blog/amethyst-rust-nyc-october-2018/"/>
        <id>https://luciofranco.com/blog/amethyst-rust-nyc-october-2018/</id>
        
        <content type="html" xml:base="https://luciofranco.com/blog/amethyst-rust-nyc-october-2018/">&lt;h1 id=&quot;amethyst-the-gem-in-the-rust&quot;&gt;Amethyst: The Gem in the Rust&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;em&gt;I originally wrote this all up in preparation for the talk I gave at the Rust NYC October Meetup in 2018. The slides are available
&lt;a href=&quot;https:&#x2F;&#x2F;www.slideshare.net&#x2F;LucioFranco&#x2F;amethyst-the-gem-in-the-rust-120999299&quot;&gt;here&lt;&#x2F;a&gt;. This is just a translation of what I said but in blog form&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what-is-a-game-engine&quot;&gt;What is a Game Engine?&lt;&#x2F;h2&gt;
&lt;p&gt;A game engine is usually just a collection of libraries that are glued together to provide easy utilities to build a game. This includes things like asset loading (think PNG files and 3D models), render utilities (think of things that allow you to draw stuff without thinking of the lower level code), input capturing, and UI Components. Game engines usually become very large code bases. They can grow very quickly which makes it hard to maintain a uniform API and verify consistency across the whole project. Engine components are usually very tightly coupled, meaning that the dependency graph can get &lt;em&gt;CRAZY&lt;&#x2F;em&gt;. This part relies on that part which relies back on that part. It gets hectic! Because of this coupling, it creates issues with parallelization and memory safety.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what-is-amethyst&quot;&gt;What is Amethyst?&lt;&#x2F;h2&gt;
&lt;p&gt;Amethyst is, you guessed right, a game engine! It is built up of many small modular components (crates) that can be used independently from each other or can be used together glued by the &lt;code&gt;amethyst&lt;&#x2F;code&gt; crate. The backbone of the project is an Entity Component System or ECS. An Entity Component System is a method to describe the game state. It follows the pattern of composition over inheritance. This pattern fits rusts trait system extremely well. The ECS setup allows the engine to be data-oriented and data-driven. Both of these combined allows the engine to have parallelism at its core. Using composition also allows the user to focus on reusability and clean interfaces.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;history&quot;&gt;History&lt;&#x2F;h2&gt;
&lt;p&gt;The project was originally created as a hobby game engine by &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ebkalderon&quot;&gt;Eyal&lt;&#x2F;a&gt; in early 2016. It soon started to grow and required a movement to an organization. From this organization and its members, &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;slide-rs&#x2F;specs&quot;&gt;Specs&lt;&#x2F;a&gt; was born. Specs is the ECS library that amethyst is built off of. From this library, libraries such as &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;slide-rs&#x2F;shred&quot;&gt;Shred&lt;&#x2F;a&gt; were born to provide utilities on top of specs to take advantage of the parallel and data-oriented nature.&lt;&#x2F;p&gt;
&lt;p&gt;Now, Amethyst is growing as a top choice for an all-purpose rust game engine. There are other similar libraries but none of them attempt to achieve what Amethyst is trying to do. Currently, the repository sits at 35.7K (as of October 2018) lines of code. Not that this means too much but more a measure of the scale of the project. This size is only the engine and does not include its external dependencies. We have a book that is growing day by day. It includes almost fully featured pong tutorial and other useful insights. We have 22 examples from hello world to advanced gLTF loading. Amethyst, currently fully supports all three main operating systems with a future goal of supporting iOS, Android and WASM.&lt;&#x2F;p&gt;
&lt;p&gt;The list of features is HUGE, we have modular rendering system built from gfx, which is a multi-backend graphics API. Meaning, it can support OpenGL, Metal, Vulkan, and DirectX based APIs. There is support for gamepads and controllers. Multiplayer, User interfaces, animations, ECS, Inputs, Configuration loading via Rust object notation, think JSON but for Rust. Asset loading and an advanced state manager.&lt;&#x2F;p&gt;
&lt;p&gt;The future holds a lot for the engine, we are currently, working on a new renderer that will take advantage of the new modern rendering APIs such as Vulkan and Metal. Better networking, this is the area that I focus on, there is work going into a semi-reliable UDP protocol for game networking. Editors, scripting, future support for WASM and WebGL, (write your game in rust that runs anywhere a browser can!). Mobile support and a REPL.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-does-rust-help&quot;&gt;How does Rust Help?&lt;&#x2F;h2&gt;
&lt;p&gt;Now, why use rust for this project, and why is this the future of game development. Rust supports awesome parallelization primitives in the standard library. Such as RwLocks, AtomicPtr, and others. It also has great libraries for this stuff including crossbeam and rayon. This allows specs and the ECS system to be really fast. Not only does it help with speed but it also lets us take advantage of the new rendering APIs that are no longer single-thread based. Meaning that we can dispatch render calls from any thread. Easy to build and support rendering optimizations such as frame graphs. More writing code and less tracing data races and segfaults, but I&#x27;m sure you all have heard this enough.&lt;&#x2F;p&gt;
&lt;p&gt;The compiler is your best friend in Rust after you learn to properly use the borrow checker. The type safety and checking provide ease of use when it comes to producing high-quality code that WORKS. Trait composition fits very nicely into the ECS model. Type inference allows you to focus on the contracts that functions provide and reduce the amount of typing needed to accomplish something. Bugs, the compiler just stops you from producing a whole class of bugs. This is a sanity check for game developers who want to release a game and sleep at night.&lt;&#x2F;p&gt;
&lt;p&gt;Cargo is my favorite package manager, it&#x27;s simple, easy to use and does a great job. It allows us to build, run and test our whole project incredibly easily. We can run benchmarks to find regressions or just see how fast our code is. Built-in documentation allows us to provide a documentation first perspective. Instead of approaching new people with &quot;get good&quot; we can approach it all by saying, we should add this to the docs. This promotes a great community atmosphere but also improves the docs for future users. Cargo also does a great job at dependency management and making sure our code doesn&#x27;t get broken. These are just a few of the improvements a rust game engine has over say a C++ one.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;getting-started&quot;&gt;Getting started!&lt;&#x2F;h2&gt;
&lt;p&gt;Check out the &lt;a href=&quot;https:&#x2F;&#x2F;amethyst.rs&quot;&gt;Amethyst&lt;&#x2F;a&gt; website. Come join us on discord!&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>About</title>
        <published>2018-10-02T22:56:31-04:00</published>
        <updated>2018-10-02T22:56:31-04:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://luciofranco.com/about/"/>
        <id>https://luciofranco.com/about/</id>
        
        <content type="html" xml:base="https://luciofranco.com/about/">&lt;p&gt;I am a West coast based software engineer who maintains open source projects and works in Rust.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
