{"id":30178338,"url":"https://github.com/sysgrok/esptools","last_synced_at":"2025-08-12T05:20:33.784Z","repository":{"id":266960017,"uuid":"899742581","full_name":"sysgrok/esptools","owner":"sysgrok","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-04T14:14:02.000Z","size":45,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-31T19:39:46.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sysgrok.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"zenodo":null}},"created_at":"2024-12-06T23:07:31.000Z","updated_at":"2025-07-31T11:43:46.000Z","dependencies_parsed_at":"2025-01-30T17:31:04.921Z","dependency_job_id":"25ea3ca1-4794-4ed8-ae18-931395f39a6e","html_url":"https://github.com/sysgrok/esptools","commit_stats":null,"previous_names":["ivmarkov/esptools","sysgrok/esptools"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sysgrok/esptools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgrok%2Fesptools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgrok%2Fesptools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgrok%2Fesptools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgrok%2Fesptools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysgrok","download_url":"https://codeload.github.com/sysgrok/esptools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgrok%2Fesptools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270005591,"owners_count":24510939,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-12T05:20:32.720Z","updated_at":"2025-08-12T05:20:33.755Z","avatar_url":"https://github.com/sysgrok.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esptools\n\n[Esp tools](https://github.com/espressif/esptool) (`esptool`, `espsecure`, `espefuse` and `espidfnvs`) bundler.\n\n[![CI](https://github.com/ivmarkov/esptools/actions/workflows/ci.yml/badge.svg)](https://github.com/ivmarkov/esptools/actions/workflows/ci.yml)\n[![crates.io](https://img.shields.io/crates/v/esptools.svg)](https://crates.io/crates/esptools)\n[![Matrix](https://img.shields.io/matrix/esp-rs:matrix.org?label=join%20matrix\u0026color=BEC5C9\u0026logo=matrix)](https://matrix.to/#/#esp-rs:matrix.org)\n\nBundles the ESP tools as a Rust library.\n\n**Q:** Why do I need it? Espressif already provides [self-contained pre-built executables for all the major platforms](https://github.com/espressif/esptool/releases/tag/v4.8.1)?\n\n**A:** To use these from a `build.rs` script or other Rust code, you still have to download the archive corresponding to your OS, extract it\n   and then put the executables in your `$PATH` before being able to call the tool of your choice.\n   This is exactly what this crate automates!\n\n---\n**NOTE: Supported platforms**\n\n`esptools` will only run on those platforms where Espressif supplies pre-built binaries. I.e. Linux / MacOS / Windows X86_64 as well as Linux ARM64 and ARM32.\n\n**NOTE: Licensing**\n\nWhile the `esptools` crate is licensed under Apache + MIT (as usual with Rust), the bundled (and thus distributed) binaries of `esptool`, `espsecure` and `espefuse` [are licensed under the **GPL v2**](https://github.com/espressif/esptool/blob/master/LICENSE). (This does not apply to `espidfnvs` \na.k.a. `esp-idf-nvs-partition-gen`, which is a separate repo [licensed under the Apache license](https://github.com/espressif/esp-idf-nvs-partition-gen/blob/main/LICENSE).)\n\nWith that said, [distributing those should be OK](https://www.reddit.com/r/opensource/comments/nok8lg/include_binaries_of_a_gpl_licensed_program/), as we are providing a [link](https://github.com/espressif/esptool) to the upstream Espressif GIT repo containing the binaries' source code, as well as [the download location of the binaries themselves](https://github.com/espressif/esptool/releases/tag/v4.8.1).\n\nLet us know if you think otherwise!\n\nIf you distribute - outside of your premises and e.g. the factory flashing your chips - a binary using this library, you might want to include these links in your binary documentation though!\n\n---\n\n## Examples\n\n### Command line\n\n```sh\ncargo install esptools\nesptools efuse -h\n```\n\n### Library\n\n```rust\nfn main() -\u003e anyhow::Result\u003c()\u003e {\n    esptools::Tool::EspEfuse.mount()?.exec(\u0026[\"-h\"])\n}\n```\n\n## Cross-building for other targets than the host one\n\n`esptools` is pure-Rust so you only need a [linker for your cross-target](https://capnfabs.net/posts/cross-compiling-rust-apps-raspberry-pi/) and a C cross toolchain for the few dependencies that still need to compile custom C files (`ring`).\n\nSample ways to cross-compile:\n\n(If `cargo` greets you with a \"note: the `XXX` target may not be installed\" error, install the target first with `rustup target add XXX`.)\n\n### With [`cargo-zigbuild`](https://github.com/rust-cross/cargo-zigbuild) \n\n```sh\ncargo install cargo-zigbuild\npip3 install zig\ncargo zigbuild --target aarch64-unknown-linux-gnu # rPI 4+\n```\n\n\u003e Note: does not support cross-compiling to Windows. For Windows, use some of the other options.\n\n### With [`cargo-xwin`](https://github.com/rust-cross/cargo-xwin) \n\n```sh\ncargo install cargo-xwin\ncargo xwin build --target x86_64-pc-windows-msvc\n```\n\n### With [`cross`](https://hackernoon.com/building-a-wireless-thermostat-in-rust-for-raspberry-pi-part-2) \n\n```sh\ncargo install cross\ncross build --target=x86_64-pc-windows-gnu # For e.g. Windows; Windows MSVC is not supported, only the GNU target\n```\n\n\u003e Note: needs Docker or Podman pre-installed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysgrok%2Fesptools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysgrok%2Fesptools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysgrok%2Fesptools/lists"}