{"id":13626167,"url":"https://github.com/sonos/dinghy","last_synced_at":"2025-05-14T10:07:26.813Z","repository":{"id":39533549,"uuid":"73898705","full_name":"sonos/dinghy","owner":"sonos","description":"Easier cross-compilation for phones and single boards computers","archived":false,"fork":false,"pushed_at":"2025-02-10T16:57:35.000Z","size":6592,"stargazers_count":383,"open_issues_count":24,"forks_count":45,"subscribers_count":30,"default_branch":"main","last_synced_at":"2025-04-05T16:01:38.076Z","etag":null,"topics":["cargo","mobile","rust","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-16T08:17:55.000Z","updated_at":"2025-03-24T08:03:24.000Z","dependencies_parsed_at":"2024-02-28T13:48:14.835Z","dependency_job_id":"ed0d1fe0-3223-4505-a733-4ac7bf8332a0","html_url":"https://github.com/sonos/dinghy","commit_stats":{"total_commits":1102,"total_committers":33,"mean_commits":33.39393939393939,"dds":0.3620689655172413,"last_synced_commit":"0e80abb76283b63de1f93ff0966bd3fee39fb7bd"},"previous_names":["snipsco/dinghy"],"tags_count":326,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonos%2Fdinghy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonos%2Fdinghy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonos%2Fdinghy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonos%2Fdinghy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonos","download_url":"https://codeload.github.com/sonos/dinghy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248360034,"owners_count":21090635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cargo","mobile","rust","testing-tools"],"created_at":"2024-08-01T21:02:11.664Z","updated_at":"2025-04-12T17:36:35.520Z","avatar_url":"https://github.com/sonos.png","language":"Rust","readme":"# Dinghy\n\n![rustc \u003e= 1.74.0](https://img.shields.io/badge/rustc-%3E%3D1.74.0-brightgreen)\n![MIT/Apache 2](https://img.shields.io/crates/l/dinghy)\n![Build and test](https://github.com/sonos/dinghy/workflows/Build%20and%20test/badge.svg)\n\n## What?\n\nDinghy is a `cargo` extension to bring cargo workflow to cross-compilation situations.\n\nDinghy is specifically useful with \"small\" processor-based devices, like\nAndroid and iOS phones, or small single board computers like the Raspberry Pi.\nSituations where native compilation is not possible, or not practical.\n\nInitially tests and benches were the primary objective of Dinghy, but now\nat Snips we use it to cross-compile our entire platform. This includes setting\nup the stage for `cc` and `pkg-config` crates in one single place.\n\nIf you are a Rust library author, **you can run your tests and benches on\nyour smartphone in minutes.** And you should, at least once in a while.\n\n## Demo\n\nLet's try how BurntSushi's byteorder handles f32 on a few arm devices, two\nsmartphones, and a Raspberry Pi.\n\n![Demo](docs/demo.gif)\n\nPhew. It works.\n\n## How?\n\nOnce dinghy knows about your toolchains and devices, you will be able to run\ntests and benches from a simple cargo command **in any cargo project**, most of\nthe time without altering them.\n\nJust add `dinghy -d some_device` between `cargo` and its subcommand:\n\n```\ncargo dinghy -d my_android test\ncargo dinghy -d my_raspberry bench\n```\n\nBy default, without `-d`, Dinghy will make a native build, just like `cargo` would do.\n\n## Getting started\n\nDepending on your targets and your workstation, the ease of setting\nup Dinghy can vary.\n\n* [Android](docs/android.md) is relatively easy, specifically if you already are\na mobile developer.\n* [iOS](docs/ios.md) setup has a lot of steps, but at least Apple provides everything\nyou will need. Once again, if you are an iOS developer, most of the heavy lifting has\nbeen already done. And if you are not, be aware that you won't have to pay anything.\n* [other remote ssh-accessible devices](docs/ssh.md) are the easiest from dinghy point of view,\nbut you will be on your own to obtain the toolchain for your device architecture and\noperating system. If your device is a Raspberry Pi running raspbian, we can help. :)\n\n## Advanced topics and features\n\n* Some projects need [resources files](docs/files.md) for running their tests or benches. Dinghy\ntries its best to make it work in as many project/target configurations as\npossible but some projects need a bit of help.\n* In some bigger projects, you may need to [filter](docs/filter.md) your project's members depending\non the platform you want to test.\n* Passing [environment](docs/vars.md) variables to your executable may sometimes be useful.\n* Dinghy offers an [overlay](docs/overlay.md) system to \"add\" stuff to your toolchain\nsysroot. This allows you to add \"stuff\" to your build dependencies, like static libraries or headers\nwithout altering the sysroot toolchain.\n* The [`dinghy-build` crate](docs/dinghy-build.md) offers some `build.rs` features that are useful in\nthe context of cross-compilation.\n\n## Using dinghy as a runner only\nIf your project already build for the target platform without dinghy and you only want to use dinghy to run code on a\ndevice, you can use dinghy's bundled runner directly. You simply need to register the dinghy as a runner in `.cargo/config`.\nHere's an example for all apple targets\n\n```toml\n[target.'cfg(all(any(target_arch=\"aarch64\",target_arch=\"x86_64\"),target_vendor=\"apple\",any(target_os=\"ios\",target_os=\"tvos\",target_os=\"apple-watchos\")))']\nrunner = \"cargo dinghy runner --\"\n```\n\nYou can then run your tests directly with `cargo test --target aarch64-apple-ios-sim` for example.\n\nPlease note that the recommended way to use dinghy is as a cargo subcommand as it will set up quite a few things\nautomatically for your project to even build.\n\nThe runner will try to auto-detect the platform if it is not passed (as in the above example)\n\n# License\n\nLicensed under either of\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n","funding_links":[],"categories":["Rust","Development tools"],"sub_categories":["Testing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonos%2Fdinghy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonos%2Fdinghy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonos%2Fdinghy/lists"}