{"id":15064179,"url":"https://github.com/ctron/esp-idf-alloc","last_synced_at":"2025-10-12T04:08:30.788Z","repository":{"id":57625945,"uuid":"193786778","full_name":"ctron/esp-idf-alloc","owner":"ctron","description":"Rust allocator for ESP-IDF","archived":false,"fork":false,"pushed_at":"2019-06-28T20:36:13.000Z","size":14,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T10:38:53.308Z","etag":null,"topics":["alloc","embedded","esp","esp32","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-25T21:38:00.000Z","updated_at":"2024-01-10T16:17:13.000Z","dependencies_parsed_at":"2022-08-30T12:50:42.757Z","dependency_job_id":null,"html_url":"https://github.com/ctron/esp-idf-alloc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fesp-idf-alloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fesp-idf-alloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fesp-idf-alloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fesp-idf-alloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctron","download_url":"https://codeload.github.com/ctron/esp-idf-alloc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199079,"owners_count":21063641,"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":["alloc","embedded","esp","esp32","rust"],"created_at":"2024-09-25T00:13:03.744Z","updated_at":"2025-10-12T04:08:25.754Z","avatar_url":"https://github.com/ctron.png","language":"Rust","readme":"# Rust allocator, backed by ESP-IDF [![Crates.io](https://img.shields.io/crates/v/esp-idf-alloc.svg)](https://crates.io/crates/esp-idf-alloc) \n\nThis is a memory allocator for Rust, backed by the [ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/latest/).\n\n\nThis is intended to be used on an ESP32, linked against the ESP-IDF. For more information see:\n\n* https://github.com/ctron/rust-esp-container/\n* https://github.com/ctron/rust-esp-template\n* https://github.com/MabezDev/rust-xtensa.git\n* https://quickhack.net/nom/blog/2019-05-14-build-rust-environment-for-esp32.html\n\n## Usage\n\nAdd the following to your main, application project:\n\n~~~rust\nextern crate esp_idf_alloc;\n\n#[global_allocator]\nstatic A: esp_idf_alloc::EspIdfAllocator = esp_idf_alloc::EspIdfAllocator;\n~~~\n\n### Error handler\n\nIf you use a custom global allocator in your application, you will also need an error handler.\n\nThe following code will use the ESP-IDF `abort()` method to handle the error:\n\n~~~rust\n#![feature(alloc_error_handler)]\n\nuse core::alloc::Layout;\n\nextern \"C\" {\n    fn abort() -\u003e !;\n}\n\n#[alloc_error_handler]\nfn alloc_error(_layout: Layout) -\u003e ! {\n    unsafe {\n        abort();\n    }\n}\n~~~\n\n## Using with `alloc`\n\nAlso be sure to link in the `alloc` create, as you might want this. Add the following to your `Xargo.toml`:\n\n~~~toml\n[target.xtensa-esp32-none-elf.dependencies]\nalloc={}\n~~~\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctron%2Fesp-idf-alloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctron%2Fesp-idf-alloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctron%2Fesp-idf-alloc/lists"}