Skip to content
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

Various improvements to the protocol crate [WIP-ish] #651

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Jan 18, 2022

  1. Bump Rust version to 1.58

    BGR360 committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    0bf0c5e View commit details
    Browse the repository at this point in the history
  2. Derive Clone, PartialEq, Eq, and Hash where appropriate.

    This is really useful for anyone who wishes to use the steven_protocol
    crate and write tests that compare packets to expected values.
    BGR360 committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    1f39c88 View commit details
    Browse the repository at this point in the history
  3. protocol: Add set_current_protocol_version function.

    For users of the crate, it's important to be able to set this if
    they are not going through the `Conn` class.
    
    Ideally, the protocol version would be plumbed through every
    `Serializable` impl, but that's a much bigger refactor.
    BGR360 committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    dfbfedd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9fca022 View commit details
    Browse the repository at this point in the history
  5. Box up all Packet variants.

    Previously, the Packet enum was a whopping 4,264 bytes in size (over a page!).
    Not only is this just bad for performance (lots of memmoving), but I think it was
    also causing weird stack overflow segfaults on my machine.
    BGR360 committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    a79d5d8 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2022

  1. Make protocol authentication optional behind a feature flag.

    Currently, the `hyper` crate (dependency of `reqwest`) causes linker errors when
    you attempt to compile a consumer of `steven_protocol` as a dylib. Compiling as
    a dylib is not uncommon for quick iteration; notably popularized by the Bevy
    game engine.
    
    See rust-lang/rust#82151 (comment).
    BGR360 committed Jan 25, 2022
    Configuration menu
    Copy the full SHA
    eb4707a View commit details
    Browse the repository at this point in the history