{"id":13612506,"url":"https://github.com/georgik/esp32-idf-nmea-example","last_synced_at":"2025-10-10T07:16:55.054Z","repository":{"id":199704958,"uuid":"703545288","full_name":"georgik/esp32-idf-nmea-example","owner":"georgik","description":"ESP32 ESP-IDF application with Rust no_std NMEA code as component","archived":false,"fork":false,"pushed_at":"2025-03-27T12:33:34.000Z","size":12,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T09:28:40.013Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/georgik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-10-11T12:50:17.000Z","updated_at":"2025-03-27T12:33:52.000Z","dependencies_parsed_at":"2024-01-14T04:44:02.959Z","dependency_job_id":"b32176dc-7213-4c12-9995-3fa66dce9316","html_url":"https://github.com/georgik/esp32-idf-nmea-example","commit_stats":null,"previous_names":["georgik/esp32-idf-nmea-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/georgik/esp32-idf-nmea-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Fesp32-idf-nmea-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Fesp32-idf-nmea-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Fesp32-idf-nmea-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Fesp32-idf-nmea-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/georgik","download_url":"https://codeload.github.com/georgik/esp32-idf-nmea-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Fesp32-idf-nmea-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003169,"owners_count":26083533,"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-10-10T02:00:06.843Z","response_time":62,"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":"2024-08-01T20:00:30.887Z","updated_at":"2025-10-10T07:16:55.025Z","avatar_url":"https://github.com/georgik.png","language":"C","funding_links":[],"categories":["Projects"],"sub_categories":["`std`"],"readme":"# Example of integration ESP-IDF and Rust NMEA crate\n\nThe example shows how to integrate ESP-IDF with Rust no_std crate like [NMEA](https://crates.io/crates/nmea).\n\n## Prerequisites\n\n- [Installed ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#installation)\n- [Installed Rust and Cargo](https://www.rust-lang.org/tools/install)\n- [Installed Xtensa LLVM toolchain for Rust](https://esp-rs.github.io/book/installation/index.html)\n- Basic knowledge of ESP-IDF, CMake, and Rust\n\n## Structure\n\nHere's how your project directory might look after the following the guide:\n\n```\nesp_idf_project/\n|-- CMakeLists.txt\n|-- main/\n|   |-- CMakeLists.txt\n|   |-- esp_idf_project.c\n|-- sdkconfig\n|-- components/\n|   |-- nma /\n|       |-- CMakeLists.txt\n|       |-- include/\n|           |-- nmea_idf.h\n|       |-- nmea_idf.c\n|       |-- nmea_idf_rs /\n|           |-- Cargo.toml\n|           |-- rust-toolchain.toml\n|           |-- src/\n|               |-- lib.rs\n```\n\n### Architecture\n\nKey elements:\n- `esp_idf_project` contains main C code like any other ESP-IDF application.\n- The ESP-IDF componet with name `nmea` is stored in subdirectory with components.\n  - The `nmea_idf_rs` component contains C adapter layer which helps interfacing with Rust library.\n- The Rust code is stored in `components/nmea/nmea_idf_rs` subdirectory.\n\nThe component can be uploaded later on to [Component Manager](https://components.espressif.com/).\n\n\n### Select target\n\nSet target for main ESP-IDF application:\n\n```bash\n#idf.py set-target \u003ctarget\u003e\n# idf.py set-target esp32\nidf.py set-target esp32-c3\n# idf.py set-target esp32-s3\n```\n\nOptional step when developers needs to build Rust component also manually:\nDefine which toolchain should be used for the Rust component in file `esp_rust_component/rust_crate/rust-toolchain.toml`\n\n```toml\n[toolchain]\n# Use \"esp\" for ESP32, ESP32-S2, and ESP32-S3\n#channel = \"esp\"\n# Use \"nightly\" for ESP32-C*, ESP32-H* targets\nchannel = \"nightly\"\n```\n\n### Build the Project\nFrom the base folder of the project (`esp_idf_project`), run the build process as you usually would for an ESP-IDF project:\n\n```bash\nidf.py build flash monitor\n```\n\n#### Build the Project in Debug\n\n```bash\nidf.py -DCMAKE_BUILD_TYPE=Debug build flash monitor\n```\n\n### Expected output\n\n```\nI (316) main_task: Started on CPU0\nI (316) main_task: Calling app_main()\nRemaining stack space before calling Rust function in app_main: 2392\nMessage from Rust: Hello ESP-RS. https://github.com/esp-rs\nSize of NMEA: 12272\nRemaining stack space after calling Rust function in app_main: 2392\nRemaining stack space before calling Rust function in nmea_gga_task: 36068\nNMEA altitude: 61.700001\nRemaining stack space after calling Rust function in nmea_gga_task: 25924\nGGA Data:\n- Latitude: 53°21.6802' N\n- Longitude: -7°29.6628' W\n- GPS Quality: 1 (GPS fix)\n- Number of Satellites: 8\n- Horizontal Dilution of Precision: 1.0\n- Altitude: 61.7 Meters\n- Height of Geoid above WGS84 Ellipsoid: 55.2 Meters\nI (376) main_task: Returned from app_main()\n```\n\n## Simulation\n\n### Simulation with Wokwi in VS Code\n\n[Wokwi for Visual Studio Code](https://docs.wokwi.com/vscode/getting-started) provides a simulation solution for embedded and IoT system engineers. The extension integrates with your existing development environment, allowing you to simulate your projects directly from your code editor.\n\n- [Install VS Code](https://code.visualstudio.com/download)\n- [Install Wokwi plugin](https://docs.wokwi.com/vscode/getting-started#installation)\n- Activate Wokwi plugin - command palette, search for `Wokwi: Start Simulator`, select and ativate the plugin using web browser\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgik%2Fesp32-idf-nmea-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeorgik%2Fesp32-idf-nmea-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgik%2Fesp32-idf-nmea-example/lists"}