wokwi-server

Crates.iowokwi-server
lib.rswokwi-server
version0.2.0
sourcesrc
created_at2022-10-17 11:12:46.842051
updated_at2022-10-17 11:12:46.842051
descriptionA tool for running embedded applications in Wokwi online simulator
homepage
repositoryhttps://github.com/mabezdev/wokwi-server
max_upload_size
id690090
size93,752
Scott Mabin (MabezDev)

documentation

README

Wokwi server

A CLI tool for launching a wokwi instance for your project.

asciicast

Installation

Download the prebuilt executables for you platform from the releases pages. Alternatively, if you have Rust installed you can install it via cargo.

cargo install wokwi-server --git https://github.com/MabezDev/wokwi-server --locked

Usage

Only two arguments are required, the target, specified with --target and the path to your application elf file. Example running the esp-idf blink example on Wokwi:

$ idf.py build # build the application
$ wokwi-server --chip esp32 build/blink.elf # running example opened in the browser!

As a cargo runner

Inside .cargo/config.toml, add a runner section to your target key (cargo reference). Example for the esp32:

runner = "wokwi-server --chip esp32"

Once configured, it's possible to launch and run your application in the Wokwi simulator by running cargo run.

GDB support

Wokwi exposes a GDB stub which this tool exposes via a TCP connection, see the following vscode configuration as a reference.

{
    "type": "gdb",
    "request": "attach",
    "name": "VsCode: Wokwi Debug",
    // change this!
    "executable": "${workspaceFolder}/target/xtensa-esp32-espidf/debug/esp-fs-tests",
    "target": "127.0.0.1:9333",
    "remote": true,
    // change this!
    "gdbpath": "xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb",
    "cwd": "${workspaceRoot}",
    "stopAtConnect": true,
    "valuesFormatting": "parseText"
}
Commit count: 34

cargo fmt