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

Enable building on stable Rust & modernize codebase #48

Draft
wants to merge 15 commits into
base: devel
Choose a base branch
from

Commits on Sep 11, 2022

  1. Replace LinkedList in LinkedSlab with Vec

    This allows us to replace unstable LinkedList::drain_filter with stable
    Vec::retain_mut. drain_filter has been unstable since 2017 and isn't
    likely to stabilize any time soon.
    
    I verified with Criterion benchmarks that with a list of 10K items,
    Vec::retain_mut takes about 1/10th the time of LinkedList::drain_filter.
    IMHO this is somewhat unintuitive - linked lists are supposed to be
    efficient at removing random elements. However retain_mut is highly
    optimized for multiple removals and manages to be more efficient than
    multiple chained Vec::remove calls.
    
    Combined with the memory benefits of linear allocations, I believe this
    is a performance net positive, or at least not a regression.
    paavohuhtala committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    6dfd9e8 View commit details
    Browse the repository at this point in the history
  2. Enable building on stable Rust

    Removes #![feature(drain_filter)], which is no longer used.
    paavohuhtala committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    5263abd View commit details
    Browse the repository at this point in the history
  3. Add id1 to .gitignore

    This allows copying the id1 folder to the project root without
    accidentally commiting it.
    paavohuhtala committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    6e2ad75 View commit details
    Browse the repository at this point in the history
  4. Add .vscode to .gitignore

    Allows contributors to have individual VS Code config files (e.g format
    on save), without accidentally commiting them.
    paavohuhtala committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    36af0e6 View commit details
    Browse the repository at this point in the history
  5. Refactor INPUT_NAMES & INPUT_VALUES into INPUT_MAP

    This makes it easier to keep track of keyname-value pairs, and
    removes the need to explicitly specify the length of two arrays.
    BindInput::from_str is now more efficient because of the HashMap.
    
    Also adds four bindings that were missing.
    paavohuhtala committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    e40cbc0 View commit details
    Browse the repository at this point in the history
  6. Use rodio 0.15 from crates.io

    It was pinned to a commit which has been in `master` for over 2 years.
    paavohuhtala committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    62b6ade View commit details
    Browse the repository at this point in the history
  7. Update winit to 0.27.2

    The required PR has been merged.
    paavohuhtala committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    7f1f8b6 View commit details
    Browse the repository at this point in the history
  8. Enable Rust 2021 edition

    paavohuhtala committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    a56ba82 View commit details
    Browse the repository at this point in the history
  9. Enable optimization for dependencies in debug builds

    This was popularized by Bevy; this makes the engine run much better in
    development builds while still remaining easy to debug in most cases.
    paavohuhtala committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    f27e9a8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    84f7890 View commit details
    Browse the repository at this point in the history
  11. Use read/write_exact when read bytes are not handled manually

    Clippy reports this as an error.
    paavohuhtala committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    a4c6dbc View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f15aa1b View commit details
    Browse the repository at this point in the history
  13. Remove useless drop call

    Dropping a references does nothing.
    paavohuhtala committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    d4c989a View commit details
    Browse the repository at this point in the history
  14. Remove useless clones

    Cloning a double reference (&&T) gives just another reference.
    paavohuhtala committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    a373d90 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    538f50f View commit details
    Browse the repository at this point in the history