Skip to content

How to Compile v86 (Both for embedded use and with the GUI)

Fabian edited this page Mar 2, 2021 · 5 revisions

Building for GUI usage (making debug.html/index.html work)

See https://github.com/copy/v86#how-to-build-run-and-embed

Building for Embedded use

To build v86 for embedded use simply follow the instructions for building with a GUI up until the build command, at which point type make build/libv86.js instead.

Here's a sample usecase for the API to get you started:

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,
});