Bedrock is an 8-bit virtual computer system that can run programs anywhere.
This project was discussed on news.ycombinator.com and lobste.rs.

Overview
Bedrock is an 8-bit virtual computer system that can be used to write useful, graphical programs that will run anywhere and last forever. Let’s break that down a bit:
- 8-bit
Bedrock functionally resembles the home computers of the 8-bit era. It uses a 16-bit address space and can perform operations on 16-bit values (passed around as pairs of bytes), but the native word size is 8 bits. - virtual computer system
Bedrock isn’t a physical computer that can be purchased from a store. Instead, the system is intended to be used as a thin emulator on top of any existing computer or handheld device, with good performance even on older devices. - write useful, graphical programs
Bedrock is designed to be used for real work. It includes interfaces for reading from a keyboard/mouse/gamepad, for drawing to the screen, and for interacting with the clock, filesystem, clipboard, and network (as either a client or server). - that will run anywhere
The design of Bedrock was driven by practicality, not nostalgia. By dialling back the system requirements, Bedrock is able to run on devices that would be seen as completely unusable by modern standards. - and last forever
Bedrock exists first and foremost as a specification. If all of the existing implementations disappeared tomorrow, the only things you’d need for getting a Bedrock program to run are a copy of the specification, a computer or microcontroller, the means to program them, and a bit of gumption. 
Once a Bedrock emulator has been implemented for a platform, you’ll be able to use it to run any Bedrock program that has ever been written. Implementing a new emulator is a straightforward task for a confident programmer: the core system can be written from scratch in the span of a day, and the device interfaces can be implemented and tacked on as needed.
At the current stage of the project, programs have to be written using the Bedrock assembly language. This language is higher-level and more flexible than traditional assembly languages, but might not provide as comfortable a development experience for people who are coming from languages like Python or JavaScript. A high-level dynamic language that runs natively on Bedrock is planned for the future.
Programs can currently run on Windows, Linux, the web, and the Nintendo DS. See the live demonstrations section at the bottom of this page for examples of the kinds of programs that can run on Bedrock.
Tutorials
- Bedrock: Printing a string
A hands-on tutorial that shows how to print a string to the terminal. It assumes no former knowledge about Bedrock, and almost no former knowledge about programming in general. 
Documentation
- User manual
The user manual is aimed at people who are learning about or writing programs for the Bedrock system. It contains examples as runnable code snippets. - Specification
The specification is aimed at people who are implementing the system from scratch, or who want a deeper understanding of how the system is put together. 
- Examples
Implementations of some popular algorithms as runnable programs. - Example: Microwave clock
Full editable source code for the microwave clock program. 
Implementations
To write and run a program using Bedrock you’ll need an assembler and an emulator. An assembler is used for converting program source code into a Bedrock program, and an emulator is used for running any Bedrock program on your chosen system:
- bedrock-pc
An assembler and emulator for Windows and Linux computers, written in Rust. - bedrock-js
An assembler and emulator that can be embedded in a webpage, written in JavaScript and WebAssembly. - bedrock-nds
An emulator for the Nintendo DS, written in C usinglibnds. 
Partial implementations
- bedrock-c++
An emulator written in C++17. - bedrock-dos
An emulator for DOS computers, written in Turbo Pascal version 4. 
Background
Bedrock originated as a fork of the Uxn virtual machine and Varvara computing stack, with the aim of improving performance on extremely resource-constrained systems. It has since diverged in many significant ways, most notably by restricting the interfaces between components and by stripping down the assembler and the instruction set. See Bedrock: Differences from Uxn for more details.
The name Bedrock comes from the concept of a ‘bedrock abstraction’ coined by this blog post, though it takes a different approach to the one advocated for in the post. Bedrock achieves habitability not by producing a higher-level instruction set, but by reducing the complexity of the program environment.
Live demonstrations
The following programs are all running using the bedrock-js emulator.
Cobalt
- cobalt-demo.br (47690 bytes)
A full-featured pixel art drawing program, with brushes, textures, and undo history. 
Snake
- snake.br (1133 bytes)
A graphics demo showing a coloured stream of letters that follow the mouse cursor. 
Microwave clock
- clock.br (393 bytes)
A clock in the style of an old microwave oven display. 
System information
- sysinfo.br (4918 bytes)
Shows information about the Bedrock implementation being used. 
On-screen keyboard
- keyboard.br (2774 bytes)
An on-screen keyboard, designed to be used as the keyboard for Bedrock on the Nintendo DS.