This crate provides a simple implementation of Android Fastboot Protocol in form of Rust Trait. To demonstrate how it can actually work I used Libusb to communicate with devices. Note, this project is just my Rust playground and has a lot to be improved.
The trait itself doesn't have any extra dependencies. However, if you want to try the examples you must have libusb installed.
This library is written in Rust so to compile it you need Rust and Cargo installed.
To cross-compile examples you will have to use Docker. To do that:
-
Build a docker image:
docker build -t "<name>" -f ./docker/Dockerfile ./docker
-
Run compilation for supported targets. For Windows, for example:
docker run --rm -v "$(pwd)":/build/ "<name>" sh -c "PKG_CONFIG_PATH=$HOME/libusb PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu --examples"
- Better tests;
- More idiomatic Rust code;
- Split the actual trait implementation.