44 releases

new 0.4.41 Oct 16, 2020
0.4.39 Aug 5, 2020
0.4.38 Jun 18, 2020
0.4.24 Feb 13, 2020
0.3.1 Mar 13, 2018

#19 in Testing

Download history 610/week @ 2020-06-27 582/week @ 2020-07-04 705/week @ 2020-07-11 760/week @ 2020-07-18 659/week @ 2020-07-25 654/week @ 2020-08-01 604/week @ 2020-08-08 630/week @ 2020-08-15 620/week @ 2020-08-22 606/week @ 2020-08-29 677/week @ 2020-09-05 591/week @ 2020-09-12 705/week @ 2020-09-19 637/week @ 2020-09-26 456/week @ 2020-10-03 675/week @ 2020-10-10

2,737 downloads per month


55 lines


rustc >= 1.40.0 MIT/Apache 2 Build and test

What ?

Dinghy is a cargo extension to bring cargo workflow to cross-compilation situations.

Dinghy is specifically useful with "small" processor-based devices, like Android and iOS phones, or small single board computers like the Raspberry Pi. Situations where native compilation is not possible, or not practical.

Initially tests and benches were the primary objective of Dinghy, but now at Snips we use it to cross-compile our entire platform. This includes setting up the stage for cc and pkg-config crates in one single place.

If you are a Rust library author, you can run your tests and benches on your smartphone in minutes. And you should, at least once in a while.


Let's try how BurntSushi's byteorder handles f32 on a few arm devices, two smartphones, and a Raspberry Pi.


Phew. It works.


Once dinghy knows about your toolchains and devices, you will be able to run tests and benches from a simple cargo command in any cargo project, most of the time without altering them.

Just add dinghy -d some_device between cargo and its subcommand:

cargo dinghy -d my_android test
cargo dinghy -d my_raspberry bench

By default, without -d, Dinghy will make a native build, just like cargo would do.

Getting started

Depending on what is your targets and your workstation, setting up Dinghy can be more or less easy.

  • Android is relatively easy, specifically if you already are a mobile developper
  • iOS setup has a lot of steps, but at least Apple provides everything you will need. Once again, if you are an iOS developper, most of the heavy lifting has been already done. And if you are not, be aware that you won't have anything to pay.
  • other remore ssh-accessible devices easiest from dinghy point of view, but you willbe on your own to obtain the toolchain for your device architecture and operating system. If your device is a RaspberryPi running raspbian, we can help :)

Advanced topics and features

  • Some projects need resources files for running their tests or benches. Dinghy tries its best to make it work in as many project/target configuration as possible but some projects needs a bit of help.
  • In some bigger projects, you may need to filter you projects members depending on the platform you want to test.
  • Passing environment variables to your executable may sometimes be useful.
  • Dinghy offers an overlay system to "add" stuff to your toolchain sysroot. This allows you to add "stuff" to your build dependencies, like static libraries or headers without altering the sysroot toolchain.
  • The dinghy-build crate offers some build.rs features that are useful in the context of cross-compilation.


Licensed under either of


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps