So You Want to Build a Language VM - Part 23 - SSH Server: Part 1
Covers the first part of adding an SSH server to the Iridium VM
Intro
So You Want to Build a Language VM - Part 22 - Parallelism: Part 1
Adds in setting the number of logical cores found on the host system
Intro
Hello! In this post, our focus is going to be on starting to add some parallelism to the Iridium VM.
So You Want to Build a Language VM - Part 21 - Header Offset
Adds in calculating the starting PC location based on how much read-only data there is
Intro
So You Want to Build a Language VM - Part 20 - Benchmarks
Adds in Criterion to do benchmarks
Doh
We’ve been having so much fun, we haven’t written any benchmarks! Though it isn’t the most exciting thing to write, they are important. == Benchmarks There’s two things to understand about benchmarks:
So You Want to Build a Language VM - Part 19 - Starting on Palladium
Begins building the higher level language and compiler
Introduction
If you’ve been following the development of Iridium, you know how heavily it uses Nom
to parse the assembly language. I hope you liked it, because we’re going to be using Nom
for this as well. =)
In this tutorial, we’re going to start creating a language called Palladium
that will compile down to the assembly code we’ve been using.
Before we get started, please remember…
So You Want to Build a Language VM - Part 18 - PIDs
Adding PIDs to the VM
Intro
Hey everyone! In this tutorial, we’ll add PID tracking to the Iridium VM. Please ensure you are starting from https://gitlab.com/subnetzero/iridium/tags/0.0.17. == PIDs There are two components we need to unique identify:
So You Want to Build a Language VM - Part 17 - Basic Threads
Adds executing a program in separate OS threads
Intro
Hey everyone! In this tutorial, we’re going to start adding in multithreading to the Iridium VM. Please make sure you are starting from this point in the code: https://gitlab.com/subnetzero/iridium/tags/0.0.16. Going forward, I’m going to make a tag per tutorial so that everyone starts from a common point. === A Note on Assumed Knowledge I write these tutorials target towards more advanced users. I sometimes skip small steps, such as "add in this line to file X".
So You Want to Build a Language VM - Part 16 - String Constants And More
Two-pass assembler, using and printing string constants, and other loose ends
Home Stretch
This is going to be a longer post. In it, we’ll wrap up our two-pass assembler, add a PRTS
opcode for printing, and tie up some other loose ends. At the end, we should have an interpreter with a good amount of functionality and a simple assembly language. We are, of course, far from done with the project. I want to work on a different tutorial series for a bit, then we’ll continue with Iridium.
=== Quick Change
Add the following dependencies in your Cargo.toml. We’ll need them later:
So You Want to Build a Language VM - Part 15 - Assembler CLI Improvements
Makes the CLI interface a bit more robust and useful
CLI Improvements
Having to start the interpreter, then type .load_file
, etc is cumbersome. Let’s change it so that the VM tries to execute the file given to it as an argument. There’s a super handy-dandy crate called clap
in Rust that will make this trivial. The behavior we want is:
If the user types
iridium
and nothing else, they will go directly to aREPL
If the user types
iridium /path/to/valid/*.iasm
, that is, they want to execute a file of code directly, it should do that then exitNoteSo You Want to Build a Language VM - Part 14 - Symbol Tables
Adds in a symbol table to our VM