esphome / esphome/feature-requests
Add native platform target
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
A new [`native` / `host`](https://docs.platformio.org/en/latest/platforms/native.html) platform target to compile for.
**Please describe your use case for this integration and alternatives you've tried:**
Currently, the only way to test/debug ESPHome is to compile and upload it to an ESP. This incurs long wait times, makes debugging much harder etc.
If we could compile ESPHome to a *native* platform target (so directly for the host OS), then testing and debugging could become *much* easier. Have a bug? Just launch `gdb` or even visual debuggers and step through the program without buying/wiring up hw debugger.
Obviously this only helps for logic issues, and not timing/hardware related issues.
**Additional context**
PlatformIO [already has support for it](https://docs.platformio.org/en/latest/platforms/native.html), so we even wouldn't need to write our own tool.
Of course this would be a significant effort because we need to mock all Arduino-framework functions, but that could be quite beneficial in the long term because it forces us to write better hardware abstraction layers.
Plus given that ESPHome is already quite modular, we can just manually disable support for all modules that cause issues (thinking everything network related until we get a better network abstraction layer)
(I have no intention of implementing this in the near future, just an idea I had)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.