goToMain / libosdp

Implementation of IEC 60839-11-5 OSDP (Open Supervised Device Protocol); provides a C library with support for C++, Rust and Python3
https://libosdp.sidcha.dev
Apache License 2.0
128 stars 69 forks source link

rust: no_std support #148

Closed Sympatron closed 7 months ago

Sympatron commented 7 months ago

The Rust crate currently depends heavily on std. Since OSDP is a protocol mostly for embedded devices I think no_std support is necessary.

This PR adds that support by:

I am open for discussion about my decisions in this PR. :)

sidcha commented 7 months ago

Thank you for the PR @Sympatron. no_std support is here earlier than I anticipated. :) Let me take a look.

sidcha commented 7 months ago

I am in the middle of the -sys crate split. I guess it makes sense to merge this and then do the split (otherwise this branch would have way too many conflicts). I will fix any fallouts from this change post merge since no one is using this create ATM.

Sympatron commented 7 months ago

Sounds good. I just pushed a fix to your comment about Mutex.