buttplugio / buttplug-developer-guide

Moved to docs.buttplug.io repo
https://docs.buttplug.io/
30 stars 7 forks source link

examples: Update Rust examples for buttplug v6 #55

Closed brandonweeks closed 1 year ago

brandonweeks commented 1 year ago

Follow up to #54. I was mostly able to migrate the example code to the v6 API, however I have a few questions about device_control.rs:

I'm by no means a Rust expert, so apologies if these issues should be simple.

qdot commented 1 year ago

Heads up, I'm rebuilding the docs site in docusaurus over here: https://github.com/buttplugio/docs.buttplug.io. The site itself is already up at https://docs.buttplug.io, just haven't really announced it yet 'cause I'm trying to finish out more stuff.

As I've been spending this week updating the C# and JS examples, I'm gonna bring what's done of the v6 rust examples in this PR in over there, and I'll handle the changes mentioned.

But, to answer the questions here anyways:

For bluetooth_test_device: I'm swapping this out with websocket devices, which I've written a new section on.

For Message Attributes: Yeah I've started mapping things to objects since we don't really have a lot of message additions right now. I now expose this via handing out attributes to the various ways to do things. I'm gonna have to add some convenience methods to the rust impl that I've already put in C#/JS that should make it easier to reason about.