tg-xtask-0.1.0-preview.1 is not a library.
tg-xtask
tg-xtask is a small CLI helper (an xtask) to build and run rCore tutorial chapters and local kernel projects using Cargo and QEMU.
Install
You can build the binary from source:
# binary will be at target/release/xtask
Usage
tg-xtask is exposed via the workspace cargo aliases as cargo make and cargo qemu in this repository. If installed as a standalone crate, run the binary xtask with the same subcommands.
- Build a chapter (print commands):
- Run a chapter in QEMU (print commands):
- Build or run a package located in an arbitrary directory (not necessarily a workspace member):
# Build using the package at ./myos and set target-dir to ./myos/target
# Run in QEMU (no BIOS) using ./ch1 as package directory
Notes:
--dir <PATH>tellsxtaskto use<PATH>/Cargo.tomlas the manifest and sets Cargo's--target-dirto<PATH>/target. The final ELF will be placed at<PATH>/target/riscv64gc-unknown-none-elf/{debug|release}/<pkg>.--print-cmdprints the exactcargo build,rust-objcopyandqemu-system-*commands that will be executed.--nobiosadds thenobiosfeature during build and starts QEMU with-bios noneso the kernel is loaded at 0x80000000.
Publishing notes
When publishing tg-xtask to crates.io ensure all dependencies are published (no path = "..." dependencies remain). The crate ships a small CLI and is intended to be used as a development helper.