Code Monkey home page Code Monkey logo

cannonball's Introduction

Cannonball ๐Ÿ’ฃ

DEPRECATION NOTICE

This project has been superceded by the qemu-plugin bindings provided by the qemu-rs project.

Cannonball is a framework for building QEMU plugins in Rust! Anything you can do in a QEMU TCG plugin in C, you can do with cannonball.

Write plugins that run with minimal overhead and as much functionality as you can dream of!

Examples

There are a couple examples provided here!

  • jaivana A simple tracer that logs a configurable set of events to a file or stdout.
  • mons meg A tracer that logs the same events as Jaivana, but uses Tokio to run the trace in an async environment, with communication with the host over a UNIX socket instead of anonymous pipes.

Take a look at them, they are the best way to learn how to use this framework.

Installation

Just add this to your Cargo.toml:

cannonball = "0.2.4"

Example

Here's a quick recording of the Jaivana example plugin and driver!

asciicast

cannonball's People

Contributors

blameying avatar novafacing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cannonball's Issues

compile error: thread 'main' panicked at '"qemu_info_t_struct_

Hi there, thank you for your great work! This tool is really helpful.

I found that when I try to cargo build with Cannonball, the compiler reports a panic like below:

thread 'main' panicked at '"qemu_info_t_struct_(unnamed_at_/home/xxx/target/debug/build/cannonball-6e02cc1f64a0c3b4/out/qemu-plugin_h_68_5)" is not a valid Ident', /home/xxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.69/src/fallback.rs:817:9

This error is caused by the combination of bindgen < 0.62 and Clang > 16, which was fixed in bindgen 0.62.0 version, maybe we can just update the bind dependencies to fix this.

Windows support?

QEMU master branch has support for windows plugins now. I'd like to be able to use this crate on Windows, to build plugin DLLs, but there's a few wrinkles in the way:

  1. Building QEMU on windows is possible, but only in an MSYS environment. The qemu crate is not designed to build on Windows and makes heavy use of memfd, which (afaik) will never work on Windows.
  2. On Windows in addition to the qemu-plugin.h, there needs to be a (built) libqemu_api_plugin.a delaylib archive to link plugins against.
  3. Cannonball will need a delaylink hook exposed, similar to this one

I'm not sure what the best way to go on this is (and I understand if you don't think it's worth the effort). I'm going to try removing the dependency on qemu and getting the necessary files from somewhere else (checked in files? download published binaries?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.