In this post we’ll walk through creating a custom JavaScript runtime. Let’s call it runjs. Think of it as building a (much) simplified version of deno itself. A goal of this post is to create a CLI that can execute local JavaScript files, read a file, write a file, remove a file and has simplified console API. Let’s get started. Update 2022-12-04: updated the code samples to the latest version of
![Roll your own JavaScript runtime](https://cdn-ak-scissors.b.st-hatena.com/image/square/ba4a2933a67c4289a8338709bcb8ebd4861f09ce/height=288;version=1;width=512/https%3A%2F%2Fdeno.com%2Fblog%2Froll-your-own-javascript-runtime%2Fheader.png)