kyp44 / watchy

Board support crate for the Watchy programmable smart watch
MIT License
2 stars 1 forks source link

Project Status? #1

Closed brannondorsey closed 1 month ago

brannondorsey commented 1 month ago

Howdy :wave:!

I'm also interested in using Rust to author watch faces for Watchy, but I have been unable to find much material or prior art on the web.

What's the status of this project? Its got the looks of a crate that is intended to one day be published on crates.io, but maybe isn't stable yet... Your README does provide a lot of good context here :)

I should also say, I'm not trying to make work for you or make this a chore (I know the struggles that come with being an OSS maintainer), but I can't help but notice this seems like one of the only matureish implementations of anything that has to do with Rust and Watchy. Is that also your understanding or have you found something else worth looking into?

In any case, thank you for giving me something I can at least start playing with :heart:.

kyp44 commented 1 month ago

Hi! Months ago, I was working on a particular project with Watchy using Rust, which is what motivated me to start this crate.

The crate largely just collects the right dependencies for the various devices on the Watchy board (see the README) and either just re-exports them or wraps them in a nice object that passes in the correct pins and whatnot specific to the Watchy. I definitely intended to publish this on crates.io, but the only reason I haven't is because there are two dependencies (for the display and the accelerometer) that I needed to add features to, but those features had not yet been merged back into the official versions published on crates.io. This can be seen by looking at the dependencies in the Cargo.toml file. crates.io will not allow you to publish crates that have dependencies that are not also already published on crates.io, and in my case they are direct GitHub/GitLab links to my forked projects.

I have mostly abandoned the project I was working on. There was something else I wanted to do with it but then I ran into an issue with one of the dependencies working with the newer version of ESP and general HAL crates, and things would no longer compile.

My free time is pretty limited, but it would be fun for me to revisit this to see if this issue has been resolved. Things seem to have been changing fast in the embedded Rust world, so that is highly possible. I am generally happy to work with you to get you up and running and to resurrect this project, so I will take a look at it again when I get a chance in the next few days.

In the meantime, if you haven't yet already, I recommend you get your environment setup and get some basic Rust code compiling and running on your Watchy, which would not depend on this crate. The ESP on the board has great official Rust support, so here is a good place to start, and I will note that you want to go with the std version of everything. Obviously I have no idea what your experience level is, but I would also make sure that you're familiar with the embedded Rust ecosystem, which is very cleverly designed but can be complex.

EDIT: If you can get the crate compiling (it may not due to the above issue), everything is documented (cargo doc --open) so you can start familiarizing yourself with the API.

brannondorsey commented 1 month ago

Thanks you for the detailed response.

Obviously I have no idea what your experience level is, but I would also make sure that you're familiar with the embedded Rust ecosystem, which is very cleverly designed but can be complex.

This is a good suggestion. I'll go ahead and give the Embedded Rust book a read and maybe the Rust on ESP book after that.

A thin convenience wrapper for Watchy's specific pins, hardware devices, and intricacies actually sounds like a great way to get into Embedded Rust in general. If the display and accelerometer are working by the time I make I've freshened up my understanding of the ecosystem, I'll give this a whirl. And if not, I'll see if I could resolve that.

Really appreciate the status update! Don't feel any pressure from me to revisit this. But if you're called to it, know that you've got a user/contributor awaiting it ;)

kyp44 commented 1 month ago

Sounds good. I did have a look at this again the other night. Revisiting it made me remember that I was in the middle of some changes and new features with several different crates (including this one) when the problem I mentioned cropped up and stopped me dead in my tracks. That issue has now been fixed, at least partially, so I can continue.

It looks like the latest commit of watchy does not compile without some custom intervention, nor does the previous release tag v0.1.0 as it relied on some git repositories that have since changed. If you can find a previous commit that works you're welcome to go ahead and start using that. Otherwise give me some time (again, limited free time) to finish up what I was in the middle of now that the road block has been lifted. Afterwards, I'll add a new commit and summarize the issues and whatnot in the README.

brannondorsey commented 1 month ago

It looks like the latest commit of watchy does not compile without some custom intervention, nor does the previous release tag v0.1.0 as it relied on some git repositories that have since changed.

Nice!

It looks like the latest commit of watchy does not compile without some custom intervention, nor does the previous release tag v0.1.0 as it relied on some git repositories that have since changed.

Hopefully just a few git bisects away from a workable path forward. I'll march forward with some general learning about the embedded rust ecosystem and then by the time I return here, if the issues are resolved I'll give it a whirl. If not, I can also hack on it a bit.

kyp44 commented 1 month ago

I've been working on this, and have made a new commit that fixes the issues. I added some notes to the README about the reasons why I cannot yet release on crates.io. In any case, you should be able to setup a new ESP-IDF project, and add watchy as a dependency, directed at this repository. watchy pulls in the other driver crates and re-exports them, so you shouldn't really need any other direct dependencies (which is the entire point of a board support crate!).

The only other thing I'll add is that I did implement axes remapping for the accelerometer driver that is not yet released (I have a pull request in for that). In the unlikely even that you need this feature immediately you can patch in my fork here. Otherwise, watchy will re-export the latest version on crates.io.

Let me know whether you get things up and running with watchy or if you run into any issues, which I'd be happy to advise on if needed. I'll try to monitor the issues preventing a crates.io release so we can get it released there once those are resolved. Once you're satisfied, we can close this issue.

EDIT: Now that it should compile, don't forget to run cargo doc --open to learn the watchy API. If any of the documentation is unclear or could be improved, please let me know, or feel free to just submit a PR.

brannondorsey commented 1 month ago

Wow, this is awesome news. Really appreciate you dusting this off, getting it to compile, and adding some notes to the README. I'll go ahead and say "I'm satisfied" :smile_cat:.

I'll open any additional hurdles or issues as their own separate issues if I encounter any.