Home

Awesome

Join the chat at https://gitter.im/copy/v86 or #v86 on irc.libera.chat

v86 emulates an x86-compatible CPU and hardware. Machine code is translated to WebAssembly modules at runtime in order to achieve decent performance. Here's a list of emulated hardware:

Demos

9frontArch LinuxAndroid-x86 1.6-r2Android-x86 4.4-r2BasicLinuxBuildroot LinuxDamn Small LinuxELKSFreeDOSFreeBSDFiwixOSHaikuSkiffOSReactOSWindows 2000Windows 98Windows 95Windows 1.01MS-DOS 6.22OpenBSDOberonKolibriOSSkiftOSQNX

Documentation

How it worksNetworkingAlpine Linux guest setupArch Linux guest setupWindows 2000/XP guest setup9p filesystemLinux rootfs on 9pProfilingCPU Idling

Compatibility

Here's an overview of the operating systems supported in v86:

You can get some information on the disk images here: https://github.com/copy/images.

How to build, run and embed?

You need:

See tools/docker/test-image/Dockerfile for a full setup on Debian or WSL.

Alternatively, to build using Docker

Running via Dev Container

Testing

The disk images for testing are not included in this repository. You can download them directly from the website using:

wget -P images/ https://i.copy.sh/{linux3.iso,linux.iso,linux4.iso,buildroot-bzimage.bin,openbsd-floppy.img,kolibri.img,windows101.img,os8.img,freedos722.img}

Run integration tests: make tests

Run all tests: make jshint rustfmt kvm-unit-test nasmtests nasmtests-force-jit expect-tests jitpagingtests qemutests rust-test tests

See tests/Readme.md for more information.

API examples

Using v86 for your own purposes is as easy as:

var emulator = new V86({
    screen_container: document.getElementById("screen_container"),
    bios: {
        url: "../../bios/seabios.bin",
    },
    vga_bios: {
        url: "../../bios/vgabios.bin",
    },
    cdrom: {
        url: "../../images/linux.iso",
    },
    autostart: true,
});

See starter.js.

License

v86 is distributed under the terms of the Simplified BSD License, see LICENSE. The following third-party dependencies are included in the repository under their own licenses:

Credits

More questions?

Shoot me an email to copy@copy.sh. Please report bugs on GitHub.

Author

Fabian Hemmer (https://copy.sh/, copy@copy.sh)