#qemu #cargo-run #runner #success #testing

app cargo-qemu-runner

A cargo subcommand that allows running Limine kernels using cargo run

5 releases

0.1.4 Feb 6, 2025
0.1.3 Feb 6, 2025
0.1.2 Jan 27, 2024
0.1.1 Mar 29, 2023
0.1.0 Mar 26, 2023

#229 in Cargo plugins

Download history 4/week @ 2024-12-12 1/week @ 2025-01-30 257/week @ 2025-02-06 2/week @ 2025-02-13 8/week @ 2025-02-20 14/week @ 2025-02-27

343 downloads per month

MIT license

17KB
354 lines

Limine Qemu Cargo Runner

Prerequisites

  • xorriso for creating the iso
  • git for downloading limine

Installation

  • Git version: run install.sh or cargo install --path .
  • Release version: cargo install cargo-qemu-runner

Usage

  • Put runner = "cargo qemu-runner" in your .cargo/config.toml's [target] section
  • Specify these keys under [package.metadata.qemu_runner] section in Cargo.toml:
    • limine-branch, the limine binary branch to clone
      • NOTE: Only branches starting from v4.x are supported
    • config-file, specified path to the limine config file to use
    • extra-files, specifies extra files to copy to the resulting image
    • test-success-exit-code, qemu exit code which is considered success
    • test-args, extra arguments which are used along with run-command for tests
    • run-args, extra arguments which are used along with run-command
    • run-command, base command used to run qemu
  • Now you can cargo run your kernel and it will automatically launch it in qemu

Example config

Todo

  • Write a portable xorriso replacement in Rust
  • More configuration options?
  • Make it possible to have cargo-qemu-runner as a dev-dependency instead of requiring installation if possible

Dependencies

~13–21MB
~349K SLoC