Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split up, or feature-gate HAP types vs other concepts (servers, storage, transport) #77

Open
JeanMertz opened this issue Aug 16, 2022 · 1 comment

Comments

@JeanMertz
Copy link

I'm working on a Rust crate for Homebridge that compiles to WASM. I'm rolling my own HAP types (services and characteristics), but wanted to see if there were any existing Rust crates that expose the relevant types for me. This crate comes closest, but I can't use it because it doesn't compile to the wasm32-unknown-unknown target, as it requires features that need access to OS-level features such as networking and file system access, which in turn requires the wasm32-wasi target (and then for crates to actually support that target).

I've seen #40 being discussed, but this request is different, in that I have no interest in anything but the accessory/service/characteristic types and the supporting API around them.

One solution would be to split off those types into a separate crate hap-types, another could be to feature-gate the non-type functionality of this create behind a feature flag(s) (e.g. server and storage, enabled by default for backward compatibility).

Any thoughts on this?

My project can continue as-is for now, but I like the idea of sharing common types across crates that deal with the HAP specification.

@ewilken
Copy link
Owner

ewilken commented Aug 17, 2022

My gut feeling is that splitting out something like a hap-types crate could make a lot of sense and would be preferable to feature-gating. I'd be happy to accept changes like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants