Closed anoldguy closed 4 years ago
@anoldguy The version 0.10 is still based upon a sync connection and has a different API. If you want to get that, run cargo doc locally.
From my expirence with the crate. better try the actual async version which is only available in master of git. Check the docu here if you don't know how this works.
Thanks, Robert
Hi! Thanks for caring and sorry for the unresponsiveness lately!
As @Roba1993 said correctly, the master branch of this repo differs from the old version currently published on crates.io, and there are still a few TODOs left on this rewrite, like updating the docs properly and solving some issues like the one mentioned here in #28. But to prevent future confusion of people finding this repo, I should probably publish the master branch as a v0.1.0-pre.1
to crates.io now. Will do that.
I'm also trying to add extensive examples to this repo and to the docs. The ones in the examples
directory should all already work with the master branch.
For the time being, I'm trying to track my progress with the rewrite in this project. And of course, contributions in the form of issues & PRs are always very welcome! :)
Thank you @Roba1993! I'll look into that. Like I said, I'm a complete newbie at rust, so lots of learning still. Thanks for your patience with me!
@ewilken, thanks so much for this software. I'm really looking forward to getting things working! Since things are in flux a ton still, I'll go ahead and close this issue and keep an eye on the repo manually.
Hey all! I am a rust beginner. I've been thru rustlings, and feel like I've got a small bit figured out. So, of course, one then jumps into the deep end.
I don't understand how the examples are supposed to work. I've setup a new project, and listed
hap = "0.0.10"
in mycargo.toml
, but when I try to use one of the examples as my main program, it fails to compile at all. (Example in question: https://github.com/ewilken/hap-rs/blob/master/examples/lightbulb.rs)I clearly need to understand more of rust's basics before diving in, but I don't even know where to start. For example, the last error
error[E0752]:
mainfunction is not allowed to be
async`` indicates that I'm supposed to be calling these from some larger parent program, I think?Are these examples supposed to run out of the box? My goal was to expose a virtual garage door so I could test some logic, but I'm completely out of my depth here.
I also realize this isn't your issue, but maybe just a plea to include a full example somewhere to help make things easier for folks new to rust?
Feel free to close this if it's not inline with your project goals or time constraints!