Conversation
|
@amfern Are you interested in co-maintaining a Rust MSP library? |
|
@wucke13 Appreciate your review, and yes i am interested in co-maintaining, you can fork this project and i will submit this PR to you. as you wish. |
7de0fa7 to
3c04e7a
Compare
|
@wucke13 i am still working on updating this PR, so don't bother looking re-reviewing it yet |
|
@wucke13 finished updating the PR, see if there anything i missed, thanks |
src/lib.rs
Outdated
There was a problem hiding this comment.
I prefer the use style imports, anyhow this surely better fits the rest of the code the way it is.
There was a problem hiding this comment.
i just tried to make it work, not so proficient with rust to have opinion yet
src/packet.rs
Outdated
There was a problem hiding this comment.
This is rather unfulfilling. I would prefer to have the MspVersion enum in use to determine the actual size of package. However, the MSP version is currently not actually a part of a package...
There was a problem hiding this comment.
I agree, maybe create something like this https://github.com/magiclen/crc-any/blob/b3ab9f45eee99d47534707703e442246206ef105/src/lib.rs#L181 for MspPacket, but i rather keep this change out of this PR and create different one in the future
b6b357e to
5a62e9d
Compare
| MspParserState::FlagV2 => { | ||
| // uint8, flag, usage to be defined (set to zero) | ||
| self.state = MspParserState::CommandV2; | ||
| self.packet_data = Vec::with_capacity(2); |
There was a problem hiding this comment.
This breaks the code for no_std. Consider static arrays internally and passing slices (&[u8]) for input. Vec requires a heap, which is not given in no_std without additional crates.
There was a problem hiding this comment.
packet_data is already Vec<>, so that means no_std is already broken.
also how do i go about validating no_std is working, i tried creating dummy project with #![no_std], similar to https://github.com/hashmismatch/packed_struct.rs/tree/master/packed_struct_nostd_tests. but it just won't compile.
There was a problem hiding this comment.
i think we should fork this repo, and address no_std in separate PR
af5e3b6 to
2e680a9
Compare
version 0.1.4 was released from different branch and no longer considred canon
extended the library to support msp v2 messages