Homepage
Sign inGet started

Iridium VM

A register-based VM in Rust

  • About
  • Subnet Zero Blog
  • Go to the profile of Fletcher Haynes
    Fletcher Haynes
    Aug 26

    So You Want to Build a Language VM in Rust — Part 12

    Strings: Their Secret Agenda

    So You Want to Build a Language VM — Part 12

    What are Strings?

    Read more…
    Go to the profile of Fletcher Haynes
    Fletcher Haynes
    Aug 26

    So You Want to Build a Language VM in Rust — Part 11

    Memory

    Intro

    Right now, we have one place to store data: registers. These are great, but we only have 32 of them, and they only store i32s. What if we want to store, say, strings…

    Read more…
    Go to the profile of Fletcher Haynes
    Fletcher Haynes
    Aug 26

    So You Want to Build a Language VM in Rust — Part 10

    Assembler 3: Assemble Harder

    Improving the Assembler

    Our assembler right now can recognize one opcode, load. We need to teach it to recognize all the…

    Read more…
    Go to the profile of Fletcher Haynes
    Fletcher Haynes
    Aug 22

    So You Want to Build a Language VM in Rust — Part 09

    Assembler 2: Cruise Control

    Megazord…ACTIVATE!!!

    We’ve written basic parsers. Now we can take a step up on the abstraction ladder and create a parser that…

    Read more…
    Go to the profile of Fletcher Haynes
    Fletcher Haynes
    Aug 17

    So You Want to Build a Language VM in Rust — Part 07

    REPL and Code Execution

    A More Advanced REPL

    Our current REPL doesn’t do a ton, so let’s fix that. In this post, we’ll be adding some commands to look at the…

    Read more…
    Go to the profile of Fletcher Haynes
    Fletcher Haynes
    Aug 17

    So You Want to Build a Language VM in Rust — Part 08

    Assembler: The Beginning

    Instructions…Assemble!

    We could torture ourselves by writing all our programs in hex, and if that’s your thing, this section is…

    Read more…
    Go to the profile of Fletcher Haynes
    Fletcher Haynes
    Aug 17

    So You Want to Build a Language VM in Rust — Part 06

    The REPL

    REPL stands for Read, Evaluate, and Print Loop. It is also referred to as the interactive interpreter for a language. For example, if you open up Terminal or iTerm, we can look at Python’s REPL:

    Read more…
    Go to the profile of Fletcher Haynes
    Fletcher Haynes
    Aug 17

    So You Want to Build a Language VM in Rust — Part 05

    Equality Checks

    Hey, you’ve made it this far! Congrats! I wish I could say we’re near the end to give you some hope, but, well…sorry. =)

    Read more…
    Go to the profile of Fletcher Haynes
    Fletcher Haynes
    Aug 17

    So You Want to Build a Language VM in Rust — Part 03

    More Basic Opcodes

    Right now, our VM can do one thing: halt. An important feature to be sure, but we should probably add in more opcodes to do things like, oh, load, add, multiple, etc.

    Read more…
    Go to the profile of Fletcher Haynes
    Fletcher Haynes
    Aug 17

    So You Want to Build a Language VM in Rust — Part 02

    Basic Opcodes

    Opcodes

    When we last left our intrepid reader (that’s you), they had gotten to the point of writing an opcode. Let’s pick up from there.

    Read more…
    About Iridium VMLatest StoriesArchiveAbout MediumTermsPrivacy