Setting up Rust Lang on Alpine is relatively straight-forward. You get the dependencies that includes clang and lld from the apk repositories and curl to download and install the Rust Toolchain. 1. Getting the dependencies We will need a C compiler and a Linker. Actually only the linker will be used to link your binaries against the standard C library unless your Rust project is explicitly called C programs. I will be using the LLVM Project’s lld linker and clang compiler.
In my previous post I showed how you can build your own WSL distro from Alpine root image. If you followed along, and then proceded to use the resulting distro, you would have been very frusted….I apoligize. The first attempt at installing any real language like Go or Rust or NodeJS would have resulted in another explosion of packages. I chose Alpine thinking that since this is used so heavily to package apps into docker images, it really must have been silm and dependency free.
Setting up Clang was probably the most involved process in this series. Ironically, creating a C programming environment without any GNU utilities is a lot harder than setting up a plain Go Lang environment setup or even Rust. But that’s my goal here. To create an environment for C programming that doesn’t involve me having to rely on GNU utilities. I am using Alpine Linux which immediately eliminates the glibc dependency, the rest of the article will cover how to minimize other GNU dependencies.
Recently, I got quite frustrated with the bloated WSL Distros that are shipped by Canonical and Debian Team. It comes preinstalled with Systemd, a horribly old version of Python and for some reason insists that vim depends on sound drivers and sound themes from freedesktop.org Having no intention of trusting Microsoft store again, I create my own WSL distro in 3 simple setups: Get the latest minirootfs for your architecture from Alpine Downloads Page.
2020 is the Year of Structure for me. This means organizing, planning and filing things in a way that frees up my mind to be actually productive. It doesn’t have to be perfect, but it needs to be portable, and distraction free. After I completed my WSL 1 setup with a proper persistent SSH agent, I immediately ran into another limitation. GitHub accounts… One of the ways I segregate my life is by having different accounts for different purposes.
I like to use Windows 10 for gaming and other purposes. I like using Linux/BSDs in the cloud, however they don’t interoperate very well. Until such time comes when I can buy a MacBook Pro (the only UNIX that works on Desktop) I have decided to use WSL v1 on my Windows host for all of my Unix related workload. WSL v1 allows me to use all of my CPU cores, works well with VS Code and does 90% of all I need from it.
One of my frustrations with technology, and life in general, is how difficult it is to keep track of things. Recently, I decided to sign up for Netlify and build a simple static site for myself. Upon signing up, I realized that I can’t link my GitHub account with it because I had already signed up for the service earlier, and I don’t recollect when or why. No way to know when or where it was done, I signed up with an old email, and reset the password, and checked if it had my GitHub account linked.
A project that I was recently working on was asked me to automate the creation of a LAMP stack and WordPress. Having worked with a ton of Cloud services, my mind immediately snapped onto tools like Ansible, Cloud-Init, etc. All of them are really convienent to setup, but have a Rube Goldberg like quality to them. I wanted something that was truly stand-alone. So I decided to use shell script instead.
I created this website to write and think about mathematics, physics, computation and the interface between these three disciplines. I am an engineer by trade, but lately I am getting more and more worried about the direction towards which this Industry is heading. This is what I call “Computers for computer’s sake”. When you see a culture where computer programming is treated like an “Art” more than rigid Science, things are ripe for battle.
I started my new job, a few months ago as a server operator. This has been a really positive change in my life. The firm I work at is a VPS provider and my job has all the things that excite me about server-side computing. There’s no more illusions being made about ‘cloud computing’ I can see the virtualization (we use both KVM and containers) happening right in front of me.
I have blogged about Cloud Technologies for over a year now. Everything from VMs to containers and storage stack to networking. Although my perception of applications running on the cloud is still immature and, more dangerously, incomplete. I believe its high time I make a checklist of things I desire for my applications and of my applications. I want the architecture to be simple enough that a new comer to the team can understand it as soon as humanely possible.
Over the last decade cloud computing has grown from a simple virtual machine to containers, object store and Functions. Developers and software architects have taken complete advantage of this shift. Rising tide has lifted quite a few boat. Anyone can sign up for AWS, GCE or Azure and host their service on thier super optimized cloud with low bills, reduced downtime and still lower latencies. But here I am, still insisting that the Industry is probably headed in a wrong direction.