Blockless WASI-v86 Extension is an emulated v86 machine inside the Blockless Runtime Environment.
$ curl -s https://raw.githubusercontent.com/blocklessnetwork/v86-wasi/main/download.sh|bash
$ curl -s https://raw.githubusercontent.com/blocklessnetwork/v86-wasi/main/download.sh|sudo bash
Use follow command start the network interface in the web terminal.
# /etc/init.d/network start
Use the following command to verify whether the interface has started.
# ifconfig
# ping 192.168.0.1
Use follow command start the telnetd service in the web terminal.
# /etc/init.d/telnetd start
After starting the telnetd service, please use the following command on the host to login to the VM
$ telnet 192.168.0.2
Use follow command stop the telnetd service in the web terminal.
# /etc/init.d/telnetd stop
Use follow command start the ftpd service in the web terminal.
# /etc/init.d/ftpd start
After starting the ftpd service, please use the following command on the host to login to the VM
$ ftp 192.168.0.2
Use follow command stop the ftpd service in the web terminal.
# /etc/init.d/ftpd stop
Build the applet in host.
$ export GOOS=linux
$ export GOARCH=386
$ go build svr_applet.go
install wasm-unknown-unknown
target
$ rustup target add wasm32-unknown-unknown
use the follow command to generate the wasm file.
$ make release
The follow is the configure file
{
"cdrom": "arch/blockless.iso",
"bios_file": "arch/seabios.bin",
"vga_bios_file": "arch/vgabios.bin",
"wasm_file": "target/v86.wasm",
"memory_size": 134217728,
"vga_memory_size": 8388608,
"cmdline": ["tsc=reliable mitigations=off random.trust_cpu=on"],
"logger": {
"log_file": "debug.log",
"log_module": ["E", "BIOS", "NET"]
},
"tun": {
"address": "192.168.0.1",
"netmask": "255.255.255.0",
"ether_address": "00:22:15:fe:ae:ba"
},
"muiltiboot_order": ["bin", "cdrom"]
}
use the following command to run the linux with the configure file.
$ cargo run --release ./boot.json
After run the VM, you can open the "term.html" file for control the VM.
If you wanna DIY the linux by yourself, please see the document "https://github.com/blocklessnetwork/build-blockless-linux"
cargo build --release
This will generate a libv86_lib.dylib
file for your machine arch (which can be
packaged in the car format to be run in the runtime)