ewilken / hap-rs

Rust implementation of the Apple HomeKit Accessory Protocol (HAP)
Apache License 2.0
189 stars 33 forks source link

no_std support #40

Open bahlo opened 3 years ago

bahlo commented 3 years ago

Would be amazing to be able to use this on embedded devices, for that we need no_std support though.

ewilken commented 3 years ago

Hey! Sorry it went quiet here.

The implemented IP transport relies heavily on tokio, so I don't see it working without a std net implementation or an OS-specific I/O driver anytime soon.

BLE transport could be a different story tho, should we manage to implement it at some point and feature-gate the IP part away. No timeline on it yet, but happy about contributions.

What's your embedded target platform?

bahlo commented 3 years ago

Hey, no worries! Not decided yet, probably cortex-m. Would be amazing to do embedded devices with native HomeKit support all written in Rust.

urbaniak commented 3 years ago

I'm also interested in getting something like embedded nordic's nRF (arm, well supported), espressif esp32 (rust fork needed tor xtensa arch here), bl602 (risc-v, compilation supported, need drivers/PAC crates) homekit device programmed in Rust.

For embedded networking we may use smoltcp (rust) or lwip (C, which we need to link against) - depending on the chip/sdk

bahlo commented 3 years ago

There are also libraries like rust-embedded-community/embedded-nal that should hopefully make it easier.