-
Notifications
You must be signed in to change notification settings - Fork 34
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
Use MacAddr6
type for BSSID.
#10
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense and I'd like to see it merged.
Yeah. It is introducing a dependency on a not so popular crate, so to say. And this would be in the very core of I'm still contemplating whether we should have a hard-dependency on |
I certainly understand the problem but it seems to be very properly implemented and test, even using |
I didn't say it is not properly implemented or not unit tested. It is just not so widely used. Would this indicate that the problem is not so major actually, and we can live with it? |
I mean, if you want it, just use it outside of |
That wouldn't be a problem at all! I think this is rather a question of where on the line of convenience vs simplicity embedded-svc is trying to position itself. That's probably your call alone. :) |
I'm moving towards simplicity and less convenience actually (e.g. see #16); and even some performance sacrifices. And little to no hard dependencies on external crates for the embedded-svc core (everything not in With that said, it (should not) be my sole decision. @jessebraham @bjoernQ @MabezDev |
But yeah, I'll likely have to introduce a hard dependency on |
FWIW, I would like to use actual meaningful types when possible rather than raw byte arrays.
It could be implemented as a custom type, i.e. |
I implemented this in my own version before this crate existed: https://github.com/reitermarkus/esp32-hello/blob/4babc77e0a91ff38440b26821624d010bd609285/esp-idf-hal/src/wifi/password.rs |
Yeah. But then you need to do the same for the ssid field, so no - your type is not going to be named |
You are suggesting that having dependencies is a bad thing, so I assumed you wanted to reinvent the wheel rather than add a dependency. Of course you can just use |
Are you misinterpreting my words? I was suggesting that depending on a crate which has 1 star, for a functionality that is not so important (how many people are actually setting the bssid in their code and how many of those would object that this is a byte array?) is probably not a great idea. Now, asking people to use a |
I guess I did, sorry.
Sure, it may have 1 star on GitHub, but it has 500k downloads on crates.io which I think is more indicative of its usage in the Rust ecosystem. |
That might be a good point actually. |
But then |
OK, let's see what the other folks on the esp-rs team have to say. I think we got too much into the weeds here discussing this detail (sorry for naming the PR like that, and please no offence!). It is just that there are so many other important things to do where PRs would be greatly appreciated. For one, pure Rust async crates for mqtt, http server/client, so that we can get the bare-metal story off the ground, not just the esp-idf-* one! |
IMHO in a crate like this (which defines traits to be implemented elsewhere - possibly on bare-metal) we should really care about dependencies (not just dependencies on external crates but even on things like an allocator and atomics) If it's just about type-safety what about defining a wrapper type for |
This is a bit more expressive than
[u8; 6]
and provides a niceDisplay
andDebug
implementation.