<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Rust Nigeria</title>
    <description>The latest articles on Forem by Rust Nigeria (@rustnigeria).</description>
    <link>https://forem.com/rustnigeria</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F5118%2Fcc0b9461-0f41-4245-9b1e-2307e2eda441.png</url>
      <title>Forem: Rust Nigeria</title>
      <link>https://forem.com/rustnigeria</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/rustnigeria"/>
    <language>en</language>
    <item>
      <title>Rust: An odyssey of passion</title>
      <dc:creator>bolubee101</dc:creator>
      <pubDate>Sun, 04 Dec 2022 23:49:30 +0000</pubDate>
      <link>https://forem.com/rustnigeria/rust-an-odyssey-of-passion-4lln</link>
      <guid>https://forem.com/rustnigeria/rust-an-odyssey-of-passion-4lln</guid>
      <description>&lt;p&gt;He just kept going. From one Rust topic to one programming concept, Akin didn’t run out of things to say. It was almost laughable that I had been worried about how the interview would go. A back story is in order. When it comes to rust stories, Akin usually handled the interviews while I put them into writing. As an experienced Engineer and the most fierce Rust Lang advocate to ever grace the surface of the earth, he knew the right questions to ask to set a conversation going on for hours. There was no one better for the job. But now, he was to be interviewed, big shoes to fill. So I asked the most important question in any tech interview - “How did you get into tech?”&lt;/p&gt;

&lt;p&gt;“Back in the days of 2go, a Naruto-themed chat room I was a part of held a competition to see who knew the most Naruto trivia”. Rooms were more or less the Whatsapp group chat equivalent on 2go. “The competition was something I heavily participated in. However, I wanted to find out the top players in this Naruto trivia game so, I had this idea to build a website, a leaderboard of sorts on which the participants would be ranked. This Idea led me to research how to build a website. I explored drag and drop no code tools then eventually HTML, CSS and JavaScript. I remember the first time I saw Javascript being used - it was to turn a light bulb on a webpage on or off. While it was just switching between two images, one representing the light being on and the other off, it still felt like magic to me. I ended up not only creating the leaderboard, but also adding a few extra features to my project. People were able to download games and other media. I built the platform using a popular java phone at the time. I was proud of my project until I made a mistake and accidentally deleted the home page HTML code without having a backup. I didn't have version control set up, so I lost my entire project. Although I was disappointed, my passion for coding continued to thrive. I kept learning and exploring on my own, mostly for fun. I even started building a 2D game with Unity and C# with some friends at one point. Most of my learning until then had been done in isolation. But in 2018, I discovered developer communities in school and then things got a whole lot more interesting. Every chance I got, I wrote code. It was fun and exciting. I discovered Rust in… ”.&lt;/p&gt;

&lt;p&gt;“So, how did you discover Rust?” Akin was about to answer the next question I was about to ask, So I interrupted him. That’s the problem with passionate people, they don’t need prompts.&lt;/p&gt;

&lt;p&gt;“I discovered Rust in 2019. I can't really remember how I found out about it, but I think I was doing some research on the limits of web performance and how to push them at the time. WebAssembly was a common topic in my research, and its cool name aside, the idea of executing binary code on the web really fascinated me (and still does). Yup, that’s how I found Rust. Not only was it fast becoming the go-to language for web assembly, but it was also the most loved language in a StackOverflow survey. At this point, it’s important for me to say something about myself. I’m ultra-passionate. I run on passion. If there is something I don’t have an interest in, it would be almost impossible to see me doing that thing. But if the flames of passion ignite in my heart concerning anything, it spurs me on indefinitely. I can spend hours on whatever it is. Rust was that thing. It was beautiful. I didn’t have any prior systems programming experience, so Rust took me to a world I hadn’t been used to. Memory management, ownership rules, etc were all shiny things. When people talk about how unforgiving the compiler is with the error it throws, while I do understand, I feel like they are missing the point. The Rust compiler is like a guide in a foreign land giving you a tour of all the landmarks which pulls you back when you are about to break a law. It always feels like I’m learning something new.” At this point, I was already pulled into the conversation. Akin is like that…passionate people are like that. They live in their own world and pull unexpecting bystanders into it. This world was intriguing. “What kind of projects did you work on while learning ?” I asked.&lt;/p&gt;

&lt;p&gt;“My first project was the game of life from “the rust book.” The second one was an attempt to implement the Huffman compression algorithm in Rust. I had just watched the Silicon Valley TV series in which their main product was a compression algorithm. That got me curious about compression algorithms, and the Huffman algorithm is the basics of the basics when learning compression. It made me learn a lot. Like box pointers. Anyway, I was curious, Rust was this new toy available for me to play with, and it was beautiful. I love Rust.”&lt;/p&gt;

&lt;p&gt;“Rust’s popularity hasn’t always been this high. How did you stay dedicated to learning it?” I asked. I was curious. Very few people would stick to learning something that didn’t seem to offer any immediate reward.&lt;/p&gt;

&lt;p&gt;“I created a community. Okay, not intentionally. But looking back now, that’s what happened. As you know, I didn’t write Rust at work at the time. I worked as a front-end developer, and Rust was not included among the tools we used at work. All my learning was solely for my personal gain. Learning rust impacted my outlook on software engineering, and it flowed into how I wrote my code for work, and it also flowed into my conversations. I was already involved in other communities, and I talked about Rust so much that I was becoming an annoyance. I didn’t care much though. I just wanted to talk about Rust. Then one day in March 2020, I came across an article on WebGL in Rust Web assembly. It was so well written and easy to understand. When I checked who the author was, I realized he was a Nigerian. Chinedu Francis. He was the first Nigerian I knew who wrote Rust. I stalked him quite a bit. When I say stalk, I meant I watched his talks on youtube and visited his GitHub page. I just wanted to know who this awesome developer was. Eventually, I sent him mail.”&lt;/p&gt;

&lt;p&gt;“Wow, did he reply?” I asked.&lt;/p&gt;

&lt;p&gt;“He did. &lt;a href="https://github.com/chinedufn"&gt;Chinedu&lt;/a&gt; was really cool. We exchanged a couple of emails for a while till one day he organized a call. It even became a bit frequent. He would talk about what he was working on and I would try to make sense of it. The funny thing I could see was that he knew I didn’t understand all he was saying, so he would explain things very high level using terms and words I could easily grasp. It was so much fun seeing him talk about his work. Seeing someone even more passionate than me was awesome. I was mind blown by his knowledge. Now to the community creation part of my story. On a group chat, during one of my Rust episodes, someone mentioned that they had a friend that had built some cool projects in Rust. I hounded the guy, and he sent me his friend’s number, &lt;a href="https://dev.to/rustnigeria/my-rust-book-language-for-the-next-40-years-5ba7"&gt;Miraculous&lt;/a&gt;’ number. I messaged Miraculous one day, and we talked for hours. It was beautiful. A while later, another friend of mine introduced me to a friend of his that contributed to Deno lint, &lt;a href="https://dev.to/rustnigeria/rust-rewriting-experiences-2e74"&gt;Eze&lt;/a&gt;. I was ecstatic to be able to talk to more than two people about Rust. I wanted to share this joy, so I created a group chat called Rustaceans for the three of us. We would discuss Rust for hours. It was a haven. Then we began to grow. Miraculous would add someone who wrote or was interested in writing Rust, and Eze too would add someone too. One of the reasons I wanted the group was to have people with whom I could discuss the troubles of learning Rust in the current developer landscape in a country like Nigeria. Software development was very lucrative. But Rust jobs weren’t as much. So it was hard justifying learning a language that didn’t seem to have financial perks. So I needed people with like minds to help encourage each other.”&lt;/p&gt;

&lt;p&gt;“All this was online, right?”&lt;/p&gt;

&lt;p&gt;“Yes. With the pandemic in place, that was the only option. But that changed in 2021. We met for the first time. And guess what? Chinedu was around. It was our first “meetup”. We booked a hall for our event, an event without a schedule. But it was the most beautiful event I’ve ever been to. We sat there and just talked endlessly - what we love about it, what we are building with it, etc. Then, I didn’t write as much Rust as most Rust developers due to the fact that I’m a front-end developer, but I was happy with Rust being the plaything I write to escape the stress of work. It hurts when you get errors, but it’s fun to write and meeting more people who write it is breathtaking. Everyone was ecstatic. Meeting other people that were equally as passionate was beautiful. I treat the Rust community as more than just a community. I care about it. Just seeing Rust developers Interact was a sight to behold. After the event, I created a Twitter account and that’s how the Rust Nigeria community was born I guess. It’s been fun. We even have a newsletter. One thing that has been consistent in the group is passion. When we were 3, it was there, now we are over 200 and it’s still there, growing. On a side note, in the early days of the chat room, I would often have one-on-one conversations with people before they joined. This wasn't a requirement for joining, but rather a way for me to learn more about them and their passion for Rust. I quickly realized that Rust developers are incredibly passionate about their work, and if you sit down and talk to them about a project they're working on, you could be there for hours listening to their stories. This is why I love the Rust Stories idea - a way to share the passion and excitement of Rust developers with the world.”&lt;/p&gt;

&lt;p&gt;“As a frontend developer, how does Rust fit into the list of tools you use?”&lt;/p&gt;

&lt;p&gt;“Rust was originally designed as a systems programming language, similar to C/C++. However, it can also be used for front-end development. One way I have used Rust on the front-end is through WebAssembly. I previously worked on a project that involved building a fluid simulation in the browser. This involved implementing physics and mathematical equations. However, in order to create a visually coherent simulation, many iterations with different values needed to be performed. I initially implemented the simulation in JavaScript, and it worked well. However, I decided to try implementing it in Rust to see how it would compare in terms of performance. The difference was significant - the Rust version was able to perform more iterations in a fraction of the time it took the JavaScript version. Here's a &lt;a href="https://github.com/AkinAguda/fluid-simulation-rust"&gt;link &lt;/a&gt;to the fluid simulation I built using &lt;a href="https://github.com/chinedufn/percy"&gt;Percy&lt;/a&gt;, a framework created by Chinedu that enables the use of Webassembly and Rust for building frontend applications. Chinedu's contribution to my Rust journey has been unquantifiable. I currently have the privilege of working with him.”&lt;/p&gt;

&lt;p&gt;“I see, in the near future, what do you see yourself doing with Rust, and what would you like for the Rust Nigeria community?”&lt;/p&gt;

&lt;p&gt;“In the near future, I see myself continuing to use Rust for a variety of projects and tasks. I am particularly interested in exploring its potential for building high-performance web applications. Working with Chinedu would afford me that. As for the Rust Nigeria community, It’s going to keep growing and thriving, fueled by the passion and dedication of its members.”&lt;/p&gt;

&lt;p&gt;This story is based on &lt;a href="https://github.com/AkinAguda"&gt;Akin's&lt;/a&gt; experience with Rust.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>story</category>
      <category>frontend</category>
      <category>developer</category>
    </item>
    <item>
      <title>Rust's Defender</title>
      <dc:creator>bolubee101</dc:creator>
      <pubDate>Fri, 05 Aug 2022 11:55:40 +0000</pubDate>
      <link>https://forem.com/rustnigeria/rusts-defender-4o5h</link>
      <guid>https://forem.com/rustnigeria/rusts-defender-4o5h</guid>
      <description>&lt;p&gt;I was first exposed to computer programming in 2015. But please, try not to attach my programming experience to that time. It was through a movie, an Indian movie, I can’t seem to ever remember its title. One of the characters - the bad guy actually - caught my attention. He was a lot of things: a traitor, genius, good looker, and hacker…a hacker. The amount of power he had was ridiculous. With just his laptop, he was able to turn the tide of the entire operation in his favour. There was one problem though, I didn’t have a laptop. Sometimes I used my dad’s laptop but not frequently. My saving grace was “&lt;a href="http://xeushack.com/"&gt;Xeus hack&lt;/a&gt;”, a mobile application I installed on my phone. It came with lots of articles -  bash programming, zip bombs, etc. My “Hacker career” went along fine till I got to a certain chapter. A line read, “what differentiates a “script kiddie”  from an actual hacker was programming experience”. I had no programming experience. Lucky for me, at the end of the article, there was a list of programming languages, and at the bottom of the list were Python and Ruby. I randomly chose Python. I still didn’t have a laptop at that time, so I used a mobile application, “Q python”, to write my python scripts. The moment I wrote and ran my first line of python was the last time I thought about hacking. A world of possibility opened up to me. &lt;/p&gt;

&lt;p&gt;At first, I didn’t know anyone else into programming when I was in school so I learnt to keep myself motivated. Eventually, I met other people. In 2018, I got my PC, started learning web dev, hated javascript, and learnt Django. 2018 would be what I term the start of my programming journey. 2019 specifically was a turning point for me. I wanted to build my first web project, so I immersed myself in learning. I like hands-on learning and I guess the challenge at hand spurs me on… see what I did there? One more - and idle hand is the devil’s workshop. Around this time, I met this guy at school, the University of Abuja -  Segun. He kept going on about typescript and Go. As the reasonable man I was, I decided not to learn Go. For some reason, his enthusiasm built an internal resistance in me towards the tools. I am not proud of the man I was. Anyway, I googled ‘alternative to Go’. There were a couple of results but one stood out, “The most loved programming language”. At that point, I knew I was going to write Rust. It was even more loved than Go. I found Rust's syntax appealing, it drew me in. I even thought it had a similar syntax to python…I was young and naive. The tears came, eventually. In 2020 I had already gotten a bit used to Rust, but my learning was on and off. My love for it remained. I championed it in every group I was in and tried to answer as many questions as possible. I even managed to push Rust in once or twice into this weekly meeting I used to host. In 2021, Rust seemed to have grown in popularity and people seemed more susceptible to my prompts for them to learn Rust. There’s this javascript group I was on where I became popular because of my shouts for Rust though I didn’t know much about it. Lucky for me, there were a couple of people with more Rust experience than I. &lt;a href="https://dev.to/rustnigeria/fun-with-rust-1aab"&gt;Appcypher&lt;/a&gt;was one of them. So they were there to help when prompts came and it was about that time I found out about Rust Nigeria. &lt;/p&gt;

&lt;p&gt;In all my evangelism, a major question that people seemed to ask was ‘can you make money with Rust?’ People didn’t find it prospective. ‘You haven’t made any money in Rust’ and I sort of agreed…well not entirely. I had written an article on rust, a paid article. I kept trying to get them to understand that if you write code solely for making money, you might not be able to like rust or a couple of other languages and tools. Its learning curve is steep but the fact remains that Rust gave so much power. Who wouldn’t want that? At the end of 2021, people started writing year-in-review. I noticed a trend -  ‘...I plan to learn Rust next year.’ This year, 2022, Rust's popularity exploded. It caught on. Its job availability went up and the antagonising about it went down. In fact, if anyone ever spoke against it in groups I was in, I didn’t have to defend it. There were others who would do that. Backend, Frontend, everyone started learning it.&lt;/p&gt;

&lt;p&gt;So far, I’ve been reading the book “Zero to Production”, and I’ve had lots of fun working on the projects in it. I’ve also collaborated with other Rust developers on projects like &lt;a href="https://github.com/Lord-sarcastic/lazerpay-rust-sdk"&gt;Lazer Pay’s Rust SDK&lt;/a&gt;. I worked with &lt;a href="https://github.com/ECJ222"&gt;Enoch&lt;/a&gt;who I met on the Rust Nigeria group chat. In fact, if the Rust Nigeria community hadn’t been created, I probably would have created it myself.  A personal favourite of mine is the &lt;a href="https://github.com/Lord-sarcastic/Thanos.rs"&gt;Thanos Project&lt;/a&gt; - a program that randomly deletes exactly half the number of files in a folder and I still have a couple of features I intend to add soon. That project taught me how to work with Rust’s documentation and I developed the notion, one I still hold, that all documentation should be like Rust’s. Another thing about Rust that makes me an unrepentant champion is the Rust philosophy, the philosophy that went into its design. The philosophy of “no breaking changes”, the compiler design, Just genius. I am not saying somewhere along the line we could not find something wrong, but, right now, it’s the closest thing to perfection in my opinion.&lt;/p&gt;

&lt;p&gt;My goal for Rust in the future is to write more Rust. To slip it into as many projects as possible that I can, to give talks on it, and more. Like a donkey baited with a carrot, the fun of battling my way through tons of red lines and compiler error messages appeals to me. Rust has opened me up to meeting new people and having new experiences, so you can be sure that I’d always defend it at any chance I get.&lt;/p&gt;

&lt;p&gt;This Rust story is based on &lt;a href="https://github.com/Lord-sarcastic"&gt;Ayodeji Adeoti’s&lt;/a&gt; experience learning and using Rust.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>thanos</category>
      <category>learning</category>
      <category>story</category>
    </item>
    <item>
      <title>Building Nocode with Rustlang.</title>
      <dc:creator>bolubee101</dc:creator>
      <pubDate>Sun, 05 Jun 2022 05:27:20 +0000</pubDate>
      <link>https://forem.com/rustnigeria/fun-with-rust-1aab</link>
      <guid>https://forem.com/rustnigeria/fun-with-rust-1aab</guid>
      <description>&lt;p&gt;I’ve known about Rust for a very long time, as far back as 2015. It was just a brief encounter. When I say brief, I mean, I installed it on my laptop, and never opened it again. The concepts went over my head a bit. So, I focused on other things. And boy did I have a variety of interests. First, I wanted to build my own software for creating visual effects like Adobe or something like that. Then I tried android programming, then game programming, and maybe one or two more things along the way. But, they didn’t work out. I think the reason why they didn’t work out was that I was trying to build things from scratch without leveraging some of the tools that were already available. Building things from scratch, straight from my IDE, seemed fun. Eventually, after some thinking, I decided to focus on web development, as a full-stack JavaScript developer, and with that, I also got into &lt;a href="https://andela.com/"&gt;Andela&lt;/a&gt;, a software developer placement network. &lt;/p&gt;

&lt;p&gt;While waiting for placement at Andela, I started something. I wanted to create a community of developers who had already worked on WebAssembly projects in the past. A bit of a back story is in order now. During my exploratory phase before I settled for web development, Web Assembly was announced. So on a whim, I created a &lt;a href="https://github.com/appcypher/awesome-wasm-langs"&gt;Repo &lt;/a&gt;to keep track of languages that compile to web assembly. The repo ended up getting over three thousand stars. I honestly didn’t expect it to blow up as much as it did, but it did. That feat fueled my interest in Web Assembly. As I was saying, I wanted to gather Web Assembly developers together for a purpose - to create a common web assembly runtime, a canonical runtime. My attempt at community building didn’t go so well. I sent a couple of emails, and DMs to no avail, or so I thought. It was during this time that &lt;a href="https://github.com/syrusakbary"&gt;Syrus Akbary&lt;/a&gt; reached out to me, he pitched the idea he had to build an awesome web assembly runtime, &lt;a href="https://wasmer.io/"&gt;Wasmer&lt;/a&gt;, and that he would want me to be involved. He was really excited, and so was I. The only thing was that he said he had to lay down some of the groundwork first. So he worked on it for about a month. Now that I think about it, I should have stuck to him while he laid down the work because when he showed me the progress he had made, I was awe-stricken, but also disadvantaged. A lot of work had been done. Here we were trying to build the web assembly runtime that would take the world by storm, but my knowledge of Rust was meager. Keeping up was hard. Eventually, I had to leave the project, he was incorporating Wasmer as a company, so relocation was being discussed but I wasn’t interested in going to the US. But I think the major deciding factor for me was that I didn’t really align with the management of the project.&lt;/p&gt;

&lt;p&gt;I stayed off Rust in a professional capacity for a while but contributed to some open source projects during that time, I even started some of my own, one of them being &lt;a href="https://github.com/gigamono"&gt;Gigamono &lt;/a&gt;- The most comprehensive no-code platform you’ve never seen. Yeah, never seen. Right now, due to the intensity of my job, I am not actively working on most of Gigamono. The parts of it that still have my attention are: The web assembly runtime, and a programming language that goes with it.&lt;/p&gt;

&lt;p&gt;Currently, I work at &lt;a href="https://fission.codes/"&gt;fission.codes&lt;/a&gt;, and I have to say, it’s right up my alley. I wasn’t expecting to get the job. In fact, I didn’t really take the application seriously. But to my surprise, the CEO reached out to me to schedule a call, which I missed. I was really tired that day, so I slept off. I reached out to the CEO apologizing for missing the call, and trying to reschedule. Thankfully, he did. The interview went smoothly, and I got the job. &lt;/p&gt;

&lt;p&gt;At Fission, I’m the only Rust developer, and I love the kind of things we are building. Something we are working on is a web-native file system built on top of IPFS (Interplanetary File system). It is essentially, decentralized file storage. Another thing we are working on is decentralized authentication and decentralized identity. We want to give users total control of their identities. The server wouldn’t need to control anything about the user. From their browser, they can sign the things they send to the server or encrypt it without the server really having any idea of what is going on. I’m really working on the fun stuff, cutting edge. We take research really seriously. What we work on is not something that can be done half-heartedly. I even had to put the development of Gigamono on temporary hiatus.&lt;/p&gt;

&lt;p&gt;Despite being on hiatus, I think Gigamono is the future of no code, and in part, serverless. But the thing is it’s too grand an idea to take on as a broke person. With that said, there are parts of it that I still make out time to develop - the web assembly runtime. Gartner, the analytic company, forecast that by 2027, 67 percent of software would be built by nontechnical developers. So, I have no doubt that in the near future the no-code development space will blow past its “twitter bubble”.&lt;/p&gt;

&lt;p&gt;My plan with Rust is to get into decentralized identity, I have to say Web3 is really fascinating. I would also be looking at Zero-knowledge-proof. I might not actively participate in it, but I will definitely be keeping my eyes on it. On the low-level side of things, I want to build a programming Language - Racoon to be used in conjunction with my Web assembly runtime. Far into the future, I am going to be deeply involved in no-code AI. I’ve always loved doing low level things, that’s what made web assembly attractive to me, and in recent times because of how much power it gives you when you go low level, Rust. In the near future, most of my projects will be in Rust, and maybe Racoon. The journey so far has really been fun and I'm really excited for the things to come!&lt;/p&gt;

&lt;p&gt;This story is based on &lt;a href="https://github.com/appcypher"&gt;Appcypher's&lt;/a&gt; experience with Rust.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>fun</category>
      <category>story</category>
      <category>developer</category>
    </item>
    <item>
      <title>Rust-Time Communication.</title>
      <dc:creator>bolubee101</dc:creator>
      <pubDate>Wed, 04 May 2022 23:16:33 +0000</pubDate>
      <link>https://forem.com/rustnigeria/rust-time-communication-2hfe</link>
      <guid>https://forem.com/rustnigeria/rust-time-communication-2hfe</guid>
      <description>&lt;p&gt;The final year in school is a trying time for a lot of people, and I was not an exception. I was working on my final year project, a chatting application for my school, the University of Lagos. My goal was to include text chat, video calls, and voice calls into the application which I intended to write in Golang. I did that, and it worked. It was done…or so I thought. During the testing phase, I had a couple of classmates, about 20 or so, connect to my server to test my application out. It lagged and was pretty much unusable. I had to look for an alternative. Then suddenly, the ASUU strike hit, and there was time to rewrite my project 10-50 times, as many times as I wanted. ASUU, Academic Staff Union of Universities, is the body to whom all university lecturers report, and its members went on an indefinite strike. The reason? The government had some unpaid dues or something. Anyway, a strike meant no classes, no classes meant no school, no school meant more time…plenty of time. &lt;/p&gt;

&lt;p&gt;I had known about Rust before, and I had done a bit of research myself. A couple of things stood out to me. Its low-level access, the absence of a garbage collector, and its famous speed. It ticked all the boxes I wanted. Also, implementing my project in Rust potentially meant lower costs. Rust is really low level, so it makes the most of the resources available. That meant that I didn’t have to get a powerful server to cater to my project’s needs. So I started learning Rust. &lt;/p&gt;

&lt;p&gt;With the strike in session, I had a lot of time on my hands to learn what I needed to learn, and things went on smoothly till I hit a brick wall. I couldn’t find a &lt;a href="https://webrtc.org/"&gt;Web RTC&lt;/a&gt; implementation in Rust. Web RTC is a framework that allows browsers and web-based applications to communicate in real-time.  It is important to know that while Rust has made a lot of waves in recent times, it is still relatively new compared to other languages and development technology. There were still things that had not fully been abstracted to the level where regular developers could easily access the functionalities without having a deep understanding of how they worked. Web RTC was one of them. Now that I think of it, I found one, but it was basically just C embedded in Rust. While that sort of worked, It wasn’t what I wanted. I searched around a bit more, then I found someone, &lt;a href="%E2%80%8B%E2%80%8Bhttps://github.com/rainliu"&gt;Rainliu&lt;/a&gt; working on a &lt;a href="https://github.com/webrtc-rs/webrtc"&gt;Web RTC implementation in Rust&lt;/a&gt;. It was in its early stages though, in fact, all that had been done was a collated list of frameworks that would allow Web RTC to work in Rust. I decided to help out, or at least try to help. There I was, a few weeks into learning Rust, and I wanted to help build a library. &lt;/p&gt;

&lt;p&gt;The idea was to port &lt;a href="https://github.com/pion/webrtc"&gt;Pion&lt;/a&gt;, the web RTC library in Go to Rust, and I played a major role in the early days of the project. I was involved in the RTP library, SRTP, and the Multicast DNS. I put in a lot of time, a commodity the strike ensured I had a lot of, and we made a lot of progress. In fact, a lot of people rallied behind the project making it worthy of the title Open source. It currently has almost 2000 stars on Github.&lt;/p&gt;

&lt;p&gt;At my current workplace, &lt;a href="//ockam.io"&gt;Ockam&lt;/a&gt;, we work with many languages and stacks. I work in DevOps but Rust plays a major role in it. Amazingly enough, I learned about the job as a result of the massive publicity for the first event hosted by Rust Nigeria in 2020. Ockam put out a recruitment post under one of the publicity tweets. After checking out their website, I was interested so I applied. Ockam deals majorly with IT security, so a lot of their products deal with security issues. In preparation for my interview, I decided to use one of their Rust implementations to secure an application I had made before, particularly my MDNS implementation. There is a known security flaw in MDNS in which in basic terms, identity could be impersonated so I used an Ockam toolkit to secure it. I presented a demo of this for my interview and I got the job. &lt;/p&gt;

&lt;p&gt;I cannot imagine ever leaving Rust and I don’t believe anyone who starts with Rust will ever want to go back. The idea that you have the compiler on your side is such an assurance. There are some mistakes that I’d make and the compiler would calm you down, then school you. There are mistakes impossible to take into production if you follow the rules and regulations of the compiler. For example, unless you use unsafe code, memory corruption is not something you’d worry about in production. &lt;/p&gt;

&lt;p&gt;My experience with Rust since 2020 has been invaluable. With COVID and the rise in the need for video and voice communication services, the drive to get my project running was at an all-time high. Rust made it easy for me to keep working on what I wanted to, and this led me to open source, and with open source came experience and connections.&lt;/p&gt;

&lt;p&gt;This story is based on &lt;a href="https://github.com/metaclips"&gt;Micheal Uti's&lt;/a&gt; journey with Rust.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>developer</category>
      <category>story</category>
      <category>rtc</category>
    </item>
    <item>
      <title>The Chronicles of a Web3 philosopher.</title>
      <dc:creator>bolubee101</dc:creator>
      <pubDate>Tue, 05 Apr 2022 08:55:48 +0000</pubDate>
      <link>https://forem.com/rustnigeria/the-chronicles-of-a-web3-philosopher-3a43</link>
      <guid>https://forem.com/rustnigeria/the-chronicles-of-a-web3-philosopher-3a43</guid>
      <description>&lt;p&gt;For me, Rust is not about the language, but what you can do with it. One of its coolest applications at the time I started Rust was in blockchain development. Most blockchain clients were written in C, C++, or Go. But Rust was new and used for mainstream blockchain development, so I felt this was the best combination. It was also around that time I started contributing to Rust-based open source projects. I had read and studied a lot of Rust code in 2017, but 2018 was my time writing the actual code. I was exploring the blockchain with Rust and was trying to build a payment system. Its idea was basically what &lt;a href="https://www.lazerpay.finance/"&gt;Lazerpay &lt;/a&gt;does now, I called it Paysquare back then. The platform was built on Ethereum to collect Ethereum payments. To achieve this, a library called Web3 built by the developers at Ethereum existed. The only problem was that it was only written in Javascript. One of the engineers at Parity, where I later worked, who I would later get to know was pretty big in Blockchain and Rust had a &lt;a href="https://github.com/tomusdrw/rust-web3"&gt;Rust implementation&lt;/a&gt; on his Github, but it was unmaintained. Because of what I was building, I had to take over the project and contribute to it, along with other open-source Rust projects. During that period, my portfolio grew quite a bit. I contributed to a lot of open-source projects. Anyway, Paysquare didn’t work out, I think I lost motivation while building it. &lt;/p&gt;

&lt;p&gt;In August 2018 or so, I was on the Rust Subreddit, and this company called &lt;a href="https://www.parity.io/"&gt;Parity&lt;/a&gt; was hiring and I was interested. I had been writing Rust a lot during that period, so I was pretty confident in my skills. I applied. After a month, and a really weird interview process, I got in. The interview process I went through was not regular as I was not tested technically, rather my open-source contribution spoke for me. That's probably why when given the chance, I always advise new software developers to try contributing to open-source projects no matter how hard it might seem. Like Nike, just do it. &lt;/p&gt;

&lt;p&gt;Anyway, My experience at Parity was a mixed one. On one hand, I got to work with really smart people. On the other hand, I was not getting a firm grasp of blockchain concepts like I would have liked to. It’s only now that I’m no longer with them, that I can look upon my time there and appreciate all that I learned. But while I was in the middle of it, I was stressed a lot of the time. I had imposter syndrome too. I was working with people way smarter than me. Anyway, I was there from September 2018 to July 2021. I wanted something new. After working at Parity and being exposed to the inner workings of a blockchain, I felt that I wanted to do something on the application layer. I knew working on the application layer of a blockchain product would bring the things I worked on at Parity into context. I currently work with a Polkadot parachain project called &lt;a href="https://www.composable.finance/"&gt;composable&lt;/a&gt;. They essentially use the substrate framework I had been working on for the past three years and use the Polkadot network security. So you can imagine the depth of understanding I have concerning the project.&lt;/p&gt;

&lt;p&gt;I run an organization called &lt;a href="https://github.com/polytope-labs"&gt;Polytope labs&lt;/a&gt;. It’s an environment, a community of people who want to grow - people who want to take their software engineering career to the next level. Personally, I chose software engineering because out of all careers that exist, it was the only one in which you are in control of your trajectory. You don’t need to have a degree, and it’s entirely merit-based. There’s no signaling you have to do apart from the work you already do. I started coding with PHP in 2018, doing gigs on Nairaland, but at some point, I decided it was time to move to the next level. I learned mobile engineering to get to a certain point, then after that, I learned Rust to get to another. The plan has always been to move to the next level by taking on the harder stuff. That’s why I started Polytope labs - to help people advance their careers by taking on the harder stuff. We are currently focused on Web3, but really, we would make use of any field that moves our agenda forward. &lt;/p&gt;

&lt;p&gt;As for my career plans, omo, I think my Rust journey will come to an end soon. I feel like I have more affinity towards designing systems rather than implementing them, "being in the trenches" and fighting with the Rust compiler. I think it would be a good experience for people just beginning their careers though. So in the future, I would probably focus on designing systems and growing the developer talent in Nigeria. A healthy goal for me would be to get at least a thousand developers employed in the Web3 space from Polytope labs in potentially the next two years. I know it will take a while, but I’m here for the long haul. This would enable us to build Web3 products for Africa. And really, it wouldn’t be bad if we have the developers building these web3 products to be people you know, people you helped to grow.&lt;/p&gt;

&lt;p&gt;This story is based on &lt;a href="https://github.com/seunlanlege"&gt;Seun Lalenge's&lt;/a&gt; experience using Rust.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>story</category>
      <category>developer</category>
      <category>web3</category>
    </item>
    <item>
      <title>I wrote my way up</title>
      <dc:creator>bolubee101</dc:creator>
      <pubDate>Fri, 04 Mar 2022 20:45:54 +0000</pubDate>
      <link>https://forem.com/rustnigeria/i-wrote-my-way-up-5ga0</link>
      <guid>https://forem.com/rustnigeria/i-wrote-my-way-up-5ga0</guid>
      <description>&lt;p&gt;My encounter with Rust was, in summary, fate smiling upon me. I used to write mainly on JavaScript-related technologies, Vue and Node to be precise, on &lt;a href="https://blog.logrocket.com/"&gt;LogRocket&lt;/a&gt;, a technical article blog. LogRocket allowed its writers to suggest (pitch) article topic ideas, which would get vetted, and if approved, the writers get to write on. They also have a pool of topics for writers to pick from. Due to its popularity, JavaScript had a lot of articles written on it, and at some point, I found myself without any unique topic to write on. The suggestion board didn't have any JavaScript topic at the time, so I had to explore other technologies. One of the available suggestions was a Rust-related article topic idea. It had been sitting there, unpicked way longer than other articles usually sat. Apparently, there weren't many Rust writers on the platform. After some contemplation, I thought, "why not?". My thought process was, there was google, the documentation, other articles, etc. I was pretty confident in my research skills and since there was really nothing stopping me, I picked two Rust articles and wrote on them.&lt;/p&gt;

&lt;p&gt;One of the articles I picked was on &lt;a href="https://blog.logrocket.com/rust-cryptography-libraries-a-comprehensive-list/"&gt;Cryptography in Rust&lt;/a&gt;. I remember the day I started writing it. I was sitting outside at home writing and researching my article, and I thought, "this is easy". I found the style of writing Rust intriguing. Like I said earlier, I used to write JavaScript, so comparing that new Rust experience to JavaScript, where packages would generally be installed with NPM, I found just writing your dependencies in cargo.tml more instinctual so I wrote the article and submitted it. It was reviewed, accepted, and published. It was the regular "all in a day's work" until the feedback came in. My article was really liked, and apparently, it helped people understand cryptography better. This spurred me to write the &lt;a href="https://blog.logrocket.com/19-awesome-web-utilities-for-rust/"&gt;second one&lt;/a&gt;, then I paused, there weren't anymore Rust topic suggestions. During my break, I learned a bit more about Rust and wrote more on my personal blog.&lt;/p&gt;

&lt;p&gt;A while later, an organization put out a call for developers to submit proposals for a talk. I was interested, so I applied. My submission was one of the Rust articles I had written before. "Ownership in Rust", and it got accepted. I gave the talk, and the feedback was overwhelming. It was then I decided to really immerse myself in Rust. I had realized that because the Rust ecosystem hadn't been explored as deeply as other technologies, when I wrote, traffic was enormous.&lt;/p&gt;

&lt;p&gt;During my exploration, I discovered two crates - Ether.rs and Web3.rs. I wrote on the differences between the two and shared my &lt;a href="https://hannydevelop.hashnode.dev/building-defi-with-rust-and-ethereum-providers-and-signers-ckppk54ic08fwwhs1edi7h8h1"&gt;article &lt;/a&gt;on Twitter. That's when someone reached out to me. He said he loved my article and hoped we could have a conversation. I agreed, I'm glad I did. During our conversation, he brought up an open role in his company that he hoped I could fill. Of course, I had lots of questions which I asked. After a while, he asked me to search for him on the internet. He turned out to be the former CEO of Tendermint. I was excited and mind blown. I mean, before that day, I had chopped plenty of "rejection breakfast" with regards to job applications, so this was a welcome surprise. After I had calmed down, we scheduled something like an interview call for the next day.&lt;/p&gt;

&lt;p&gt;Hehe, I almost missed my interview. I forgot to take the time zone difference into consideration while preparing for the interview. I first argued that the call wasn't due for another 1 hour 30 minutes before my attention was drawn to the time difference. I was not ready. I mean, I still had my hair net on and was still in my PJs. Anyway, I had my interview like that. At the end of the interview, the interviewer said he was seeking to hire a junior Rust developer, and he thought I was a perfect fit. He then asked what my expected remuneration would be. I laughed; that was new, hadn't been asked that before. I reflected on the question a bit then asked what they wanted to pay. That turned out to be one of the best questions I've ever asked before. He mentioned what they had planned, and when I did my calculations, I could barely contain my excitement.&lt;/p&gt;

&lt;p&gt;The company I work for is Sommelier. We help users and market makers to invest their funds to increase the chances of making a profit. At work, I write Rust as a Protocol Engineer. My job is basically to write applications for the Blockchain, managing how contracts behave. Work has been really interesting, and I've had the opportunity to grow. The fact that we are writing Rust has played quite a role in this. We have this thing when a person is working on a feature, we allow the person to work on it from start to finish. We don't have to worry much about code quality amongst the different developers. Rust's opinionated style forces everyone to conform to a single style, allowing for code uniformity among features even if they were written by different developers. The opportunity to handle a feature alone has contributed to my growth.&lt;/p&gt;

&lt;p&gt;When I think of my journey so far, I have to admit I was fortunate to have encountered Rust. When I got my job, I was just in my final year of university; it was my first role. I did not expect such good fortune. I was just doing my thing, writing articles, Rust articles, and it happened. I've been here for 8 months now, and it has been awesome.&lt;/p&gt;

&lt;p&gt;This story is based on &lt;a href="https://twitter.com/hannydevelop"&gt;Ugochi Ukpai's&lt;/a&gt; experience.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>writing</category>
      <category>journey</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>Deploying Your Rust Apps in the Cloud</title>
      <dc:creator>Austin Aigbe</dc:creator>
      <pubDate>Fri, 04 Mar 2022 05:13:48 +0000</pubDate>
      <link>https://forem.com/rustnigeria/deploying-your-rust-apps-in-the-cloud-7cg</link>
      <guid>https://forem.com/rustnigeria/deploying-your-rust-apps-in-the-cloud-7cg</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this article, I provide a step-by-step guide on how you can easily deploy your Rust application in the cloud with &lt;a href="https://aws.amazon.com/ec2/" rel="noopener noreferrer"&gt;Amazon AWS EC2&lt;/a&gt;. Depending on your system requirements, you can deploy your application in the cloud to save you the hassle of managing the hardware infrastructure yourself so you can focus on what matters - your application and the customers they serve.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;I am assuming you already have an AWS account, if not please create one and login as root user. We will be using the AWS EC2 Free Tier &lt;em&gt;t3.micro&lt;/em&gt; compute, as our virtual server in the cloud.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1
&lt;/h2&gt;

&lt;p&gt;After logging in as root to your AWS account, switch to the new view and nagivate to EC2 as shown in the screenshot below. Select &lt;code&gt;Services&lt;/code&gt;, &lt;code&gt;Compute&lt;/code&gt; and then click on &lt;code&gt;EC2&lt;/code&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FY1pffNX.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FY1pffNX.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2
&lt;/h2&gt;

&lt;p&gt;Click on &lt;code&gt;Launch instances&lt;/code&gt; as shown below.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F40nqhzZ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F40nqhzZ.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3
&lt;/h2&gt;

&lt;p&gt;Under choose AMI, first check the &lt;code&gt;Free tier only&lt;/code&gt; box on the left side of the window and then select any image. I selected &lt;code&gt;Ubuntu Server 20.04 LTS&lt;/code&gt; image. You can experiment with any of the images.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FkD3zs7B.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FkD3zs7B.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4
&lt;/h2&gt;

&lt;p&gt;Make sure you select the t3.micro (it is the &lt;code&gt;free tier&lt;/code&gt; instance type) and then click on &lt;code&gt;Review and Launch&lt;/code&gt; then &lt;code&gt;Launch&lt;/code&gt;. This will display a window asking you to select or create a key pair. Select the applicable option and then click on &lt;code&gt;Launch Instance&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F2b2UzFh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F2b2UzFh.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5
&lt;/h2&gt;

&lt;p&gt;Give your virtual server a name. Mine is named &lt;code&gt;server-01&lt;/code&gt;. Wait for your server to change &lt;code&gt;Instance state&lt;/code&gt; to &lt;code&gt;Running&lt;/code&gt; before you connect to it.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FSE9bQwx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FSE9bQwx.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6
&lt;/h2&gt;

&lt;p&gt;Now, you can connect to your virtual server using &lt;a href="https://www.putty.org/" rel="noopener noreferrer"&gt;PuTTy&lt;/a&gt;, Powershell, Bash (if you are using Linux), CMD or any client application that supports &lt;code&gt;SSH&lt;/code&gt;. I am using PuTTy. To connect to the &lt;code&gt;compute&lt;/code&gt; or virtual server, ssh to the &lt;code&gt;Public IPv4 DNS&lt;/code&gt; address specified under the &lt;code&gt;Details&lt;/code&gt; tab.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FU4QAbAw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FU4QAbAw.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7
&lt;/h2&gt;

&lt;p&gt;The user name is &lt;code&gt;ubuntu&lt;/code&gt;. The virtual server has access to the internet and you can install any package you need. Now, let's install the Rust compiler.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F0yt7Dy8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F0yt7Dy8.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 8
&lt;/h2&gt;

&lt;p&gt;Install Rust and &lt;code&gt;buid-essential&lt;/code&gt; (sudo apt install build-essential).&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F1i1tawo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F1i1tawo.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 9
&lt;/h2&gt;

&lt;p&gt;We will be deploying two types of application on the virtual server - a telecoms application (a &lt;a href="https://en.wikipedia.org/wiki/GPRS_Tunnelling_Protocol" rel="noopener noreferrer"&gt;GTPv2-C&lt;/a&gt; server) and a web application based on the &lt;a href="https://github.com/seanmonstar/warp" rel="noopener noreferrer"&gt;warp&lt;/a&gt; crate. GTPv2C protocol is used in the &lt;a href="https://www.3gpp.org/" rel="noopener noreferrer"&gt;3GPP&lt;/a&gt; based 3G, 4G and 5G networks for signaling and it uses port 2123 and the &lt;a href="https://en.wikipedia.org/wiki/User_Datagram_Protocol" rel="noopener noreferrer"&gt;UDP&lt;/a&gt; transport protocol. We will configure our Rust GTP server to listen on UDP port 2123 in compilance with the &lt;a href="https://www.arib.or.jp/english/html/overview/doc/STD-T63v9_60/5_Appendix/Rel8/29/29274-8b0.pdf" rel="noopener noreferrer"&gt;3GPP TS 29.274&lt;/a&gt; (GTPv2-C) standard.&lt;/p&gt;

&lt;p&gt;The web server will listen on TCP port 3030.&lt;/p&gt;

&lt;p&gt;Configure the &lt;code&gt;Inbound rules&lt;/code&gt; as shown below. AWS EC2 will apply these rules to our virtual server and it will allow our Rust applications to send and receive messages using these rules.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FsBnezgP.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FsBnezgP.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 10
&lt;/h2&gt;

&lt;p&gt;Create your web server application using &lt;code&gt;cargo new web_server&lt;/code&gt; and edit with nano as shown below. The original code is available here:&lt;a href="https://github.com/seanmonstar/warp" rel="noopener noreferrer"&gt;https://github.com/seanmonstar/warp&lt;/a&gt; and it has been slightly modified for this tutorial. Run the web server with &lt;code&gt;cargo run&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;After this step, you will have two Rust applications running in the cloud. You can use the &lt;code&gt;ps aux | grep target&lt;/code&gt; to check the two processes running (&lt;code&gt;gtp&lt;/code&gt; and &lt;code&gt;web_server&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FrP0uJb2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FrP0uJb2.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 11
&lt;/h2&gt;

&lt;p&gt;Open another PuTTy session and connect to the virtual server. Clone the GTPv2-C server from  &lt;a href="https://github.com/eshikafe/ngc" rel="noopener noreferrer"&gt;https://github.com/eshikafe/ngc&lt;/a&gt; and edit the &lt;code&gt;ngc/common/gtp/src/main.rs&lt;/code&gt; so that the server listens and accepts conections from any IP address (i.e &lt;code&gt;0.0.0.0&lt;/code&gt;) as shown below. Run the application with &lt;code&gt;cargo run&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FbS1uYtr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FbS1uYtr.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the screen shot below, a simple &lt;code&gt;Python&lt;/code&gt; script (the client) sends a message to the gtp server application using the &lt;code&gt;Public IP address&lt;/code&gt; and port 2123. The script sends a GTPv2-C &lt;code&gt;Create Session Request&lt;/code&gt; message from my Windows PC, through the internet, to the Rust GTPv2-C server application running in the cloud. This implies that you can deploy a telecom application (based on Rust) in the cloud to serve multiple devices concurrently and efficiently. The sample gtp application uses the &lt;a href="https://tokio.rs/" rel="noopener noreferrer"&gt;tokio&lt;/a&gt; crate to achieve concurrency. Concurrency is a key requirement for a 4G/5G telecom server application.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F3RaFT6J.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F3RaFT6J.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 12
&lt;/h2&gt;

&lt;p&gt;Lastly, open a web browser and paste the following URL in the address bar:&lt;code&gt;{Public IPv4 DNS}:3030/hello/Rustacean&lt;/code&gt;. Replace &lt;code&gt;Public IPv4 DNS&lt;/code&gt; with the domain assigned to your compute. You should see the message below.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FqIlyhO4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FqIlyhO4.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also use curl to test your web server as shown below.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FSfZwGE3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FSfZwGE3.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To deploy your applications securely in the cloud, you need to understand how the &lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html" rel="noopener noreferrer"&gt;AWS EC2 security group&lt;/a&gt; works. Please read the AWS EC2 security group documentation before you deploy your application as a production system in the cloud.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=7mgBvbqUVgw&amp;amp;t=1267s" rel="noopener noreferrer"&gt;AWS Tutorial for Beginners - Full Crash Course | Neal Davis&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>telecoms</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Rust-y Memory. How Safe?</title>
      <dc:creator>Austin Aigbe</dc:creator>
      <pubDate>Fri, 04 Feb 2022 20:03:34 +0000</pubDate>
      <link>https://forem.com/rustnigeria/rust-y-memory-how-safe-p6g</link>
      <guid>https://forem.com/rustnigeria/rust-y-memory-how-safe-p6g</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jj4EkXgt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5whsu4epptijauzz3vry.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jj4EkXgt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5whsu4epptijauzz3vry.jpg" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;By &lt;a href="https://www.linkedin.com/in/austin-aigbe-1ba59b50/"&gt;Austin Aigbe&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://www.rust-lang.org/"&gt;Rust&lt;/a&gt; programming language is said to be memory-safe but how does it achieve this? Why should we even care about memory safety? It turns out that the major cause of security vulnerabilities in modern day software systems (including Desktop and mobile applications) is due to memory safety issues and to address this, there is a general consensus, which I personally agree to, that a memory-safe systems programming language like &lt;code&gt;Rust&lt;/code&gt; is required. This is one of the reasons big tech companies have decided to &lt;a href="https://foundation.rust-lang.org/members/"&gt;invest in Rust&lt;/a&gt; and re-engineer some of their key products and services with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does &lt;code&gt;Rust&lt;/code&gt; Achieve Memory Safety?
&lt;/h2&gt;

&lt;p&gt;Memory safety is achieved through three key concepts: &lt;code&gt;ownership&lt;/code&gt; (a language feature the compiler uses to free and allocate memory based on the scope of a variable binding), &lt;code&gt;borrow checking&lt;/code&gt; and &lt;code&gt;lifetimes&lt;/code&gt;. All these analyses are done during compile-time.&lt;/p&gt;

&lt;p&gt;For simplicity, I will focus more on the &lt;code&gt;ownership&lt;/code&gt; concept and show us how the compiler guarantees memory safety at compile-time using the scope of a variable binding to determine when to allocate and deallocate memory on the stack. &lt;/p&gt;

&lt;p&gt;Before we proceed, let's review how our code is analyzed by the Rust compiler (&lt;code&gt;rustc&lt;/code&gt;) for memory safety.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Compilation With Memory Management
&lt;/h2&gt;

&lt;p&gt;In simple terms, a &lt;code&gt;memory&lt;/code&gt; is a storage space (e.g &lt;code&gt;RAM&lt;/code&gt;) on your computer where instructions to be executed by the computer's CPU are stored. These instructions are the lines of Rust code you have written and compiled with &lt;code&gt;rustc&lt;/code&gt; (the Rust compiler) or &lt;code&gt;cargo&lt;/code&gt; into a machine executable file (e.g &lt;a href="https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#ms-dos-stub-image-only"&gt;&lt;code&gt;.exe&lt;/code&gt;&lt;/a&gt; file format on Windows and &lt;a href="https://refspecs.linuxfoundation.org/"&gt;&lt;code&gt;elf&lt;/code&gt;&lt;/a&gt; on Linux). The executable file tells the Operating System how to load your &lt;code&gt;Rust&lt;/code&gt; program into &lt;code&gt;memory&lt;/code&gt; for execution by the CPU.&lt;/p&gt;

&lt;p&gt;Now, let's compile a very simple &lt;code&gt;Rust&lt;/code&gt; program with &lt;code&gt;rustc&lt;/code&gt; and examine how memory management (&lt;code&gt;ownership&lt;/code&gt;) works in Rust.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// hello.rs&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;rust_edition&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2021&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Hello, Rust"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{message} {rust_edition}!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compiling the above code with &lt;code&gt;rustc .\hello.rs&lt;/code&gt; on Windows will produce an executable file,&lt;code&gt;hello.exe&lt;/code&gt; (about 148KB in size), in the same directory as the .rs file.&lt;/p&gt;

&lt;p&gt;Next, let's see how the &lt;code&gt;hello.exe&lt;/code&gt; was produced by &lt;code&gt;rustc&lt;/code&gt; and how the memory-safety checks were done.&lt;/p&gt;

&lt;p&gt;The Rust compiler, &lt;code&gt;rustc&lt;/code&gt;, performed several analyses on the &lt;code&gt;hello.rs&lt;/code&gt; file before it produced the &lt;code&gt;hello.exe&lt;/code&gt; executable file. I will give a high-level overview of this process so we understand how memory safety is achieved by the compiler and at what phase of the compilation process it is done.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DZWailFL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/72SEKSw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DZWailFL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/72SEKSw.png" alt="" width="880" height="341"&gt;&lt;/a&gt;&lt;br&gt;
Figure 1: An simplified view of &lt;code&gt;rustc&lt;/code&gt; compilation process &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 1&lt;/strong&gt;: &lt;code&gt;hello.rs&lt;/code&gt; was translated to basic tokens using the &lt;code&gt;rustc_lexer&lt;/code&gt; crate and then to Rust &lt;code&gt;tokens&lt;/code&gt; using the &lt;code&gt;rustc_parser&lt;/code&gt; crate. Tokens are easier for the compiler to work with than the text format of your .rs file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 2&lt;/strong&gt;:&lt;code&gt;Tokens&lt;/code&gt; were translated to &lt;code&gt;AST&lt;/code&gt; (Abstract Syntax Tree) format. Syntax analysis is done here. Use &lt;code&gt;cargo inspect --unpretty=ast-tree .\hello.rs&lt;/code&gt; to examine the AST output.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SVSYyVLx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/wHwJRPz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SVSYyVLx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/wHwJRPz.png" alt="" width="880" height="567"&gt;&lt;/a&gt;&lt;br&gt;
Figure 2: AST tree of &lt;code&gt;hello.rs&lt;/code&gt; with &lt;code&gt;cargo-inspect&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 3&lt;/strong&gt; The &lt;code&gt;println!&lt;/code&gt; macro was refined (or desugared) to a &lt;code&gt;std::io::_print&lt;/code&gt; statement and &lt;code&gt;core::fmt::Arguments&lt;/code&gt; function calls.The data type of our expressions were inferred and checked. We can say that type safety is guarateed at this phase of the code compilation. The HIR (High-Level Intermediate Representation) is the output of this stage. You can use &lt;code&gt;crago inspect --unpretty=hir .\hello.rs&lt;/code&gt; to view the HIR representation of your Rust code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3EWL3pHu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/kSPdFvv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3EWL3pHu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/kSPdFvv.png" alt="" width="851" height="461"&gt;&lt;/a&gt;&lt;br&gt;
Figure 3:&lt;code&gt;println!&lt;/code&gt; macro desugared in the HIR. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 4&lt;/strong&gt; HIR was converted to MIR (Mid-level Intermediate Representation). Ownership, borrow-checking and optimizations are done here. In fact, the MIR shows the scope of each variable and helps the compiler know at what point a variable binding (or ownership) is out of scope and when to dellocate memory from the stack. How the compiler tracks the scope of each variable is indicated in the screenshot below. In fact, the assembly code generated by &lt;a href="https://llvm.org/"&gt;LLVM&lt;/a&gt; (in phase 6) is the machine representation of the MIR (after the ownership, borrow checking and optimizations have been done). In the next phase, the &lt;code&gt;asm&lt;/code&gt; .S file is examined to see how the variables are allocated on the &lt;code&gt;Stack&lt;/code&gt; when they are in scope and how they are deallocated when they are out of scope. In this phase, memory safety is guaranteed by the compiler.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zxdhu2iF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/9BSWZ32.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zxdhu2iF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/9BSWZ32.png" alt="" width="880" height="648"&gt;&lt;/a&gt;&lt;br&gt;
Figure 4: MIR representation of &lt;code&gt;hello.rs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 5 and 6&lt;/strong&gt; This is the code generation phase - LLVM was used to generate the final executable file &lt;code&gt;hello.exe&lt;/code&gt; from the optimized and memory-safe MIR representation. Further optimizations can also be done by LLVM. &lt;/p&gt;

&lt;p&gt;Let's briefly examine the assembly code (.S file) generated by LLVM. You can use &lt;code&gt;rustc --emit asm .\hello.rs&lt;/code&gt; to generate the file. To keep things simple, I will only examine how the &lt;code&gt;ownership&lt;/code&gt; memory-safety feature was achieved by the allocation and deallocation of memory on the stack.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OKe2x8Ax--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/E1VoudA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OKe2x8Ax--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/E1VoudA.png" alt="" width="880" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 5: A simplified memory layout of the stack from the perspective of the compiler generated &lt;code&gt;main&lt;/code&gt; function.&lt;/p&gt;

&lt;p&gt;The assembly code for the &lt;code&gt;main&lt;/code&gt; function is shown above (in Figure 5). The entry point is not our &lt;code&gt;hello::main&lt;/code&gt; function. As we will see later, Rust has a runtime (&lt;code&gt;std::rt::lang_start_internal&lt;/code&gt;). This runtime handles a lot of complexities for us that we don't need to bother about when writing our Rust code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Line 516: The compiler generated main function is the entry point for our program.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Line 518: 40 bytes of memory is allocated on the stack.&lt;code&gt;rsp&lt;/code&gt; is the 64-bit stack pointer register for x86_64. It always points to the top the stack.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Line 523: &lt;code&gt;_ZN5hello4main17h0767239aa2b5c6caE&lt;/code&gt; is the mangled symbol for our &lt;code&gt;hello.rs&lt;/code&gt; &lt;code&gt;main()&lt;/code&gt; function. The address of our &lt;code&gt;hello::main&lt;/code&gt; function is stored in %rcx and then passed to the runtime function as a reference in line 103.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Line 524: This line calls the Rust runtime function &lt;code&gt;std::rt::lang_start&lt;/code&gt; (defined in line 94) and subsequently, the internal runtime function &lt;code&gt;std::rt::lang_start_internal&lt;/code&gt; (defined in line 104). Rust has a runtime that executes our &lt;code&gt;hello.rs main()&lt;/code&gt; function.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xFB3fJl6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/gx2fnqx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xFB3fJl6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/gx2fnqx.png" alt="" width="880" height="469"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Figure 6: Rust runtime function executes our hello::main function&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0Lq7MTeF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/hSGodss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0Lq7MTeF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/hSGodss.png" alt="" width="880" height="447"&gt;&lt;/a&gt;&lt;br&gt;
Figure 7: Execution of &lt;code&gt;hello::main&lt;/code&gt; (part 1)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RRW4B4m7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/oWxVc3T.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RRW4B4m7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/oWxVc3T.png" alt="" width="880" height="552"&gt;&lt;/a&gt;&lt;br&gt;
Figure 8: Execution of &lt;code&gt;hello::main&lt;/code&gt; (part 2)&lt;/p&gt;

&lt;p&gt;Figures 7 and 8 show how sufficient memory (200 bytes) was first allocated on the stack by the compiler before allocating memory to the two local variables &lt;code&gt;rust_edition&lt;/code&gt; (an &lt;code&gt;i32&lt;/code&gt;), and &lt;code&gt;message&lt;/code&gt; (a &lt;code&gt;&amp;amp;str&lt;/code&gt;). Before returning from the &lt;code&gt;hello::main&lt;/code&gt; function, the compiler deallocates memory on the stack and frees up resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We have seen how Rust guarantees memory safety during compile-time by examining the compilation phases and how memory is allocated and deallocated on the stack in assembly code. A very simple Rust program (&lt;code&gt;hello.rs&lt;/code&gt;) was used to examine the output of each compilation phase and the memory management of the stack in assembly code.&lt;/p&gt;

&lt;p&gt;We also learnt that the Rust compiler generates a &lt;code&gt;main&lt;/code&gt; function for us as the entry point of our program. This main function uses the Rust runtime to execute the main function of our Rust program.&lt;/p&gt;

&lt;p&gt;In summary, Rust tries to guaranty memory safety during compile time and it does a pretty good job in ensuring this.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://rustc-dev-guide.rust-lang.org/overview.html"&gt;Overview of the Compiler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://doc.rust-lang.org/1.8.0/book/ownership.html"&gt;Ownership&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://doc.rust-lang.org/1.8.0/book/references-and-borrowing.html"&gt;References and Borrowing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.oracle.com/cd/E19253-01/817-5477/817-5477.pdf"&gt;x86 Assembly Language Reference Manual&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.cs.princeton.edu/courses/archive/spr16/cos217/lectures/15_AssemblyFunctions.pdf"&gt;Assembly Language: Function Calls&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cs.brown.edu/courses/cs033/docs/guides/x64_cheatsheet.pdf"&gt;x64 Cheat Sheet&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://courses.cs.washington.edu/courses/cse351/17au/lectures/11/CSE351-L11-procedures-I_17au-ink.pdf"&gt;The Stack &amp;amp; Procedures&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>rust</category>
      <category>rustc</category>
      <category>llvm</category>
      <category>memory</category>
    </item>
    <item>
      <title>My Rust Book: Language for the next 40 years</title>
      <dc:creator>bolubee101</dc:creator>
      <pubDate>Wed, 02 Feb 2022 13:03:55 +0000</pubDate>
      <link>https://forem.com/rustnigeria/my-rust-book-language-for-the-next-40-years-5ba7</link>
      <guid>https://forem.com/rustnigeria/my-rust-book-language-for-the-next-40-years-5ba7</guid>
      <description>&lt;h3&gt;
  
  
  Chapter 1: Discovery
&lt;/h3&gt;

&lt;p&gt;My Rust story started when a 17-year-old me found some articles about it on Stack Overflow. Rust had built a bit of a reputation, that prompted me to do some research on it even though I had no use for it at the time.&lt;/p&gt;

&lt;p&gt;A bit of a back story. Before Rust, I was working on &lt;a href="https://github.com/miraclx/ByteStash-Dev"&gt;Byte Stash&lt;/a&gt;, a decentralized file system. The plan was to write a Proof of concept in JavaScript, then write the actual program in an ahead-of-time compiled language. The thing is I didn't know what language to use. Of course, C/C++ was the first option that came to mind, but the second thing that came to mind was the possible pitfalls that one could encounter while using it. So, I decided to search for another option. &lt;/p&gt;

&lt;p&gt;Whenever I discover a new programming language, there’s this thing I do with it, it’s probably not the best way to judge a language, but when I see a “-.lang” website, I go in and try to reason about the semantics. If I find it intuitive I can say I am already a fan of it, and if I don't find it intuitive then, hehe. That’s the problem I had with Golang and its walrus assignment operator at the time, its use just wasn’t as intuitive to me as I’d have wanted it to be.&lt;/p&gt;

&lt;p&gt;That didn’t mean Rust was without qualms. Rust is beautiful, and things make sense as you learn. But in the early learning phase, when writing it, it can be hard to follow. With the static type system, the compile-time optimizations, it’s possible to lose track of what you’re actually working on. When you get the hang of it though, the feeling is ecstatic. In the Rust book, there was this exercise, “12 days of Christmas” I rewrote that particular piece of code over and over again. The aim was to write it in as few lines as possible, eliminating all the default scaffolding code. When I was done, “beautiful” was what I’d describe the end result as. I took a screenshot and kept it on my Whatsapp status for like 3 days (even though I didn’t think anyone cared to see it).&lt;/p&gt;

&lt;h3&gt;
  
  
  Chapter 2: The Holy grail
&lt;/h3&gt;

&lt;p&gt;Back to why I learnt Rust, byte stash. I put the project aside. Hold on, hear me out. After building the proof of concept in Javascript, my search for the ahead-of-time compiled language for the main project began, then I found Rust. In the time I took to learn rust, and finish up on the proof of concept, I burnt out and took a break from writing code. So I decided to put it aside till I had other people pitch in. Instead, I started rewriting my JS libraries in Rust. &lt;a href="https://github.com/miraclx/xbytes-rs"&gt;Xbyte &lt;/a&gt;is one of them. Xbyte was a tool I made to convert bytes into human-readable sizes and vice versa. For instance, &lt;code&gt;4747 → ('4.75 KB')&lt;/code&gt;. When I built this in Javascript, it was relatively easy. But in Rust, it was another ball game. I didn’t need a 64-bit integer, or a 128-bit integer so I invented my 91-bit integer. I spent a lot of time on it, reading what was in the standard library and adapting it to my 91-bit integer. I did abandon it later though and go with the 128-bit integer. But I learnt a lot while working on it. When you are not used to working with core primitives, and you get to touch the holy grail, you feel like you have to advocate for the holy grail. I hadn’t spent much time optimizing for performance previously, but when I started writing Rust, I got to think about optimization, the feeling was exhilarating, a bit frustrating, but definitely exciting. For instance, in javascript, everything is on the heap, you don’t think about it. But with Rust, you are conscious of what you are doing. That’s what I love about Rust. Even if you don’t go to MIT to learn about how computers work, you can’t help but think about some of these things. Not because if you don’t things would go bad, but because these concepts are baked into the type system. &lt;/p&gt;

&lt;h3&gt;
  
  
  Chapter 3: The expression of knowledge, and possibilities.
&lt;/h3&gt;

&lt;p&gt;In 2019, I scoured YouTube for every video on Rust, watching conferences, and tutorials. At some point, I doubt there was any video content on Rust I had not watched. It was fun. But there is one thing I found out. The more knowledge you have in your artillery, the more you’d be able to express yourself while writing code. As you learn more about a language like Rust, what you can do, how you can do it expands. And it slipped into how I did everything, including writing my documentation.&lt;/p&gt;

&lt;p&gt;Around that time, I started working on &lt;a href="https://github.com/miraclx/freyr-js"&gt;Freya&lt;/a&gt;, a software that would pull all the metadata from various music providers. You paste a link it would grab the metadata of the track, playlist, or album and present it to you so that you'd be able to do anything with it. It was written in Nodejs, but I wanted to write it Rust, or at least create a GUI in Rust. I created a &lt;a href="https://github.com/miraclx/freyr-gui"&gt;UI component library&lt;/a&gt; for it, but didn’t get to using it, I burnt out. But after taking a brief break from coding, I went back to learning Rust. I kept building things, not because I had to, but because it was an idea, and it was possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chapter 4: Near
&lt;/h3&gt;

&lt;p&gt;January 2020, I was on my way to computer village (A place where gadgets could be bought or repaired), when I received an email from a recruiter from Near on LinkedIn who had seen some of what I had been working on and wanted to get more information about me. He explained the whole thing and brought up the issue of work, and I was interested. A couple of interviews were set up, and I did research on who my interviewers were. Guy, one of them was a professor. I started to wonder what I brought to the table. All I had were some CLIs and some libraries. It was later I found out from one of my interviewers that one of the things that drew them was how I wrote my documentation which when I thought about it made sense. I spent a lot of time on the Nodejs documentation, so I wrote mine in a similar way. Near builds and maintains a blockchain, something I had no experience about when I joined. This is something I have to talk about. A lot of people think you have to be a blockchain god to join a blockchain company, well I wasn’t, and neither were a lot of the people who work at Near. We were all just a bunch of good engineers from different fields who would just bring their expertise to the table. The blockchain side of things is just something they picked up when they join.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chapter 5: Different and good.
&lt;/h3&gt;

&lt;p&gt;At NEAR, one of the things I was excited about was the kind of people I work with. &lt;a href="https://github.com/matklad"&gt;Aleksey Kladov&lt;/a&gt;, the author of Rust analyzer, and the person who reviewed his first PR code work at my company. In the time I’ve worked with them, I have come to realize that they both write Rust differently yet, they maintain almost the same level of aesthetically pleasing elegance in their code. Another thing I’ve come to realize is that there are people that have such a deep understanding of how the language works that even before running the code, they know what assembly output would be, how it would work, the possible errors the rust compiler would flag. It’s crazy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chapter 6: Change and letting go.
&lt;/h3&gt;

&lt;p&gt;Change is good. At some point in my journey, I realized due to my interests, my language set wasn’t what was going to get me hired. Most people were interested in Backend, Frontend, etc. But building system things was what I was interested in. There were times I just put aside my fascinations to just get the job done, but those experiences were not rewarding. So for me, moving to Rust was the logical thing to do. While I had to learn the language and all, my focus didn’t really change. In my initial days, there were times I wrote Rust like JavaScript, but there were times Rust wouldn’t even let me. I had to have a lot of shifts in my programming paradigms. For instance, as JS devs, we learn a lot about Object-Oriented Programming. But when you start writing Rust, Structs and traits take over. I found that it's harder to leave things you have learnt for new things even if they are more convenient. But dread it, run from it, change still arrives. &lt;/p&gt;

&lt;h3&gt;
  
  
  Chapter 7: Language for the next 40 years.
&lt;/h3&gt;

&lt;p&gt;Rust really is an amazing language. I bet at some point in the life of any Rust developer the statement, “Rust has taught me to write better X” has been made, where X is any other programming language. The paradigm shift when writing Rust is amazing and its benefits cut across the board. Rust has practically changed my life, and I don’t see myself really writing any other language for the next 40 years the way I see myself writing Rust.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>journey</category>
      <category>languageforthenext40years</category>
      <category>programming</category>
    </item>
    <item>
      <title>The Beloved Crab</title>
      <dc:creator>bolubee101</dc:creator>
      <pubDate>Mon, 03 Jan 2022 13:08:09 +0000</pubDate>
      <link>https://forem.com/rustnigeria/the-beloved-crab-46fp</link>
      <guid>https://forem.com/rustnigeria/the-beloved-crab-46fp</guid>
      <description>&lt;p&gt;I had seen an error message before. I mean, I had been coding for well over 2 years, but what I saw that day was no error message. It was a guide, a tutorial, a lifeline. &lt;/p&gt;

&lt;p&gt;Take this example below gotten from “the rust book”(Probably one of the best documentation in existence). With just the basic knowledge of the programming language, it is quite easy to figure out what the problem is from the message. I mean, I’m not pointing fingers, but I’ve seen JavaScript's error messages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu3wqdw3odssjc36hnn7g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu3wqdw3odssjc36hnn7g.png" alt="Image description"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;The Rust compiler error message was something I had never encountered before. It reminded me of the Youtuber, Mosh’s explanations. I write a lot of JavaScript, so I learnt a lot from him. The Rust error messages were comparable to Mosh fleshing out a JavaScript error message. No wonder Rust has topped the stack overflow survey for most loved language almost six years in a row.  &lt;/p&gt;

&lt;p&gt;A bit of a backstory. I found a Stack Overflow survey on the most loved programming languages, and Rust topped the list. I did a bit more digging and got an understanding of why Rust is loved. No programming language that user-friendly should have that much power. At that point, my interest in Rust and its associated technology had almost consumed me. The finishing blow was when I saw the average salary of a rust developer, and well, here we are, I’m telling my Rust story.&lt;/p&gt;

&lt;p&gt;I’ve been actively learning Rust for about two months now, a combination of books, videos, and help from the Rust community. Rust developers are easy to spot on Twitter, just watch out for crabs - the red emoji with two pincers raised, and a species of users called Rustaceans. Example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxoe2lk2g62jumsh6zbt.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxoe2lk2g62jumsh6zbt.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9iq82strih8ybrq6099v.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9iq82strih8ybrq6099v.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvsui1l4ebvd8dvcq9ury.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvsui1l4ebvd8dvcq9ury.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;They are everywhere and are the most accommodating set of people you’d ever meet. Also, I find that they - and when I say “they”, I mean, “we”, at this point - always have something to say about Rust. The community is really passionate. I’d say I feel really passionate about Rust too. I mean, I spend about 12 hours a day actively learning. I intend to become a Rust beast. I’d probably soon go on a break from writing other languages to immerse myself fully in learning Rust.&lt;/p&gt;

&lt;p&gt;I see C/C++ people(developers) as wizards, making magic with complicated spells. A forbidden terrain for the simple. But with Rust, I have the power to create magic with simple things (simple compared to C, and when fully understood at least). Simple(semi simple) syntax, simple error messages, and guides like memory safety features, safe concurrency, and memory management,  that protect you from the complications that could arise when building applications with C. The thrill of learning something new is still very much with me. &lt;/p&gt;

&lt;p&gt;I don’t know what the future holds, but I bet there’s a red crab in it.&lt;/p&gt;

&lt;p&gt;This story is based on &lt;a href="//github.com/dark-vinci"&gt;Ademola Tomiwa's&lt;/a&gt; experience with Rust.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>developer</category>
      <category>story</category>
      <category>rustnigeria</category>
    </item>
    <item>
      <title>Rust: Rewriting Experiences</title>
      <dc:creator>bolubee101</dc:creator>
      <pubDate>Mon, 03 Jan 2022 07:42:20 +0000</pubDate>
      <link>https://forem.com/rustnigeria/rust-rewriting-experiences-2e74</link>
      <guid>https://forem.com/rustnigeria/rust-rewriting-experiences-2e74</guid>
      <description>&lt;p&gt;Before I begin, let me get one thing out of the way. &lt;a href="https://www.rust-lang.org/"&gt;Rust&lt;/a&gt; isn't a programming language, it is an experience. Okay, it is a language, but who doesn’t like an epic intro?&lt;/p&gt;

&lt;p&gt;Two years ago, Eze came across Deno. Don’t worry, this is still a Rust story. What caught his attention was that Deno, originally written in Go, was rewritten in Rust. &lt;/p&gt;

&lt;p&gt;Why? How? Go, supposedly one of the “big boys”, was replaced. He did some research and thought:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;heck, everything should be rewritten in Rust &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A quest he seems to have taken upon himself to begin.&lt;/p&gt;

&lt;p&gt;He set time apart to learn Rust, and in the process realized the potential of what he could eventually do with it was endless. His first real contribution with Rust was to &lt;a href="https://github.com/denoland/deno"&gt;Deno&lt;/a&gt;, then &lt;a href="https://github.com/denoland/deno_lint"&gt;Deno-lint&lt;/a&gt;. He did get some help though.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It wasn’t easy at first honestly. Finding what I could contribute to, then even contributing to it. I couldn’t have done it without the help of one of Deno-lint's main contributors, &lt;a href="https://github.com/bartlomieju"&gt;Bartlomieju&lt;/a&gt;, who put me through.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Along the line, Eze joined Hasura, and a mission in the quest to rewrite everything in Rust opened up. The mission was to rewrite the Hasura Graphql engine currently written in Haskell with Rust. A friend of his started the project, and he joined in on it. Although he said right now it’s just on the side, it has the potential to become a really large scale. The experience so far?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One thing is for sure though, writing it in Rust makes me feel like superpowers have been bestowed upon me. Really, compared to other languages I have written, no experience comes close.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;His case in point - Eze was on an adventure in December, an adventure of code (advent of code). 5 programming languages - Kotlin, Rust, F#, Clojure, Haskell -  and a pool of algorithmic exercises. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;My experience during advent of code further increased my love for the programming language. For a relatively new programming language, it’s amazing how many resources there are on the internet. The rust community keeps churning out resources at unbelievable rates. When you search for the solution to a problem, you’re almost sure of finding the required solution in the first 3 results of the search. Run into an issue in Clojure…only the heavens would be able to save you.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Apart from the power, and possibility with Rust, there was something else that stood out to Eze - the community. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I am about to say something that might sound cringe, but writing Rust and engaging in the rust community has made me a better person, a more considerate person.  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;According to Eze, the community is full of nice, and passionate people, always ready to help. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Chances are the nicest developers around you, have come in contact with Rust.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Also, for the optimal Rust experience, there are coding practices and patterns that are ingrained into the language that makes you think of how the piece of code you are writing would hold in the larger scheme of things. How it would affect other contributors, and code refactoring if need be. &lt;/p&gt;

&lt;p&gt;Then there’s the confidence boost. While working on the Graphql engine in Rust, Eze, and his team mate, had had to refactor quite a number of times. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Remember how I said Rust makes you conform to some patterns, they are for our own good. Refactoring has never been easier. You are almost certain that after a proper refactor, following Rust patterns, as long as it compiles, your code will do what it is supposed to do. That kind of experience does a thing to a man…It sends your confidence through the roof.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You know what, I reiterate what I said at the beginning. Rust isn't just a programming language, It's an experience.&lt;/p&gt;

&lt;p&gt;This story is based on &lt;a href="https://github.com/iykekings"&gt;Eze's&lt;/a&gt; journey with Rust.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>developer</category>
      <category>story</category>
      <category>rustnigeria</category>
    </item>
  </channel>
</rss>
