Rust wants & tracking for Embark πŸ¦€

Overview

Embark Rust Ecosystem

Embark logo

High-level tracking and discussions about improving Rust and the Rust ecosystem for our game development use cases at Embark.

Check out the Issues for active topics.

Background

When we started Embark, we chose Rust as our primary language for the long term future we are building. We love the safety and robustness of the language, the ability to write high performance, safe, and (mostly) bug free code and then fearlessly refactor and change it without common lifetime/ownership, memory safety or race condition problems.

That, combined with the openness and collaborative nature of the quickly growing ecosystem of and around Rust with crates.io and the tens of thousands of open source crates with a best-in-class package system, cargo, truly makes Rust a language for the next 40 years.

We believe that by openly sharing our work, issues, and ideas with the community, we'll create more opportunities for collaboration and discussion to bring us toward a great future for Rust and for the games industry in general.

-- Johan Andersson (@repi), CTO, Embark

Open Source

Open source Rust projects we've created so far and are actively using and maintaining:

Name Description Crates.io
πŸŒ‹ ash-molten Statically linked MoltenVK for Vulkan on Mac using Ash Latest version
πŸ‘· buildkite-jobify Kubekite, but in Rust, using configuration from your repos
πŸ“œ cargo-about Cargo plugin to generate list of all licenses for a crate Latest version
❌ cargo-deny Cargo plugin to help you manage large dependency graphs Latest version
🎁 cargo-fetcher cargo fetch alternative for use in CI or other "clean" environments Latest version
βš™οΈ cfg-expr A parser and evaluator for Rust cfg() expressions Latest version
⛴️ discord-sdk An open implementation of the Discord Game SDK in Rust Latest version
πŸš™ gsutil A small, incomplete replacement for the official gsutil Latest version
πŸ’‘ kajiya Experimental real-time global illumination renderer
πŸ“¦ krates Creates graphs of crates from cargo metadata Latest version
πŸ†™ octobors GitHub action for automerging PRs based on a few rules
🎳 physx Use NVIDIA PhysX in Rust Latest version
βŒ› poll-promise A Rust promise for games and immediate mode GUIs Latest version
🐦 puffin Simple instrumentation profiler for Rust Latest version
πŸ““ relnotes Automatic GitHub release notes Latest version
🐏 rpmalloc-rs Cross-platform Rust global memory allocator using rpmalloc Latest version
πŸ‰ rust-gpu Making Rust a first-class language & ecosystem for GPU code
🌌 rymder Unofficial agones client Latest version
πŸ†” spdx Helper crate for SPDX expressions Latest version
πŸ›  spirv-tools-rs An unofficial wrapper for SPIR-V Tools Latest version
πŸ”† superluminal-perf Superluminal Performance profiler integration Latest version
πŸ“‚ tame-gcs Google Cloud Storage functions that follows the sans-io approach Latest version
πŸ” tame-oauth Small OAuth crate that follows the sans-io approach Latest version
🧬 tame-oidc Small OIDC crate that follows the sans-io approach Latest version
🎨 texture-synthesis Example-based texture synthesis generator and CLI example Latest version
πŸ’« tryhard Easily retry futures Latest version

You can see all these crates on our crates.io profile.

Contributing

We encourage contributions to any of our open source projects. If you're not sure where to start, look at the GitHub issues on any of the above projects!

Check out guidelines.md for our guidelines & policies for how we develop in Rust.

To make sure we keep a friendly and safe environment for everyone, we have a Contributor Code of Conduct. You can read this in any of our projects' repositories. By contributing to our projects, you agree to the code of conduct.

Areas of Interest

Areas that we are interested in or working on, and want to help see improved in Rust:

  • ☸ Distributed systems - async, tokio, tonic

  • πŸ•ΉοΈ Game engine systems - multiplayer, rendering, physics, audio, server, assets, workflows

  • πŸ“¦ Developer experience - fast iteration with large projects/monorepos, distributed builds, debugging, profiling, IDE

  • πŸ›Έ WebAssembly and WASI - sandboxed safe Rust code on client, edge & cloud

  • πŸ€– Machine learning - efficient inference, library bindings, training environments

  • πŸš€ High performance runtime - CPU job scheduling, code generation, optimizing crates

  • πŸ“Ί πŸ“± Console & mobile platform support - PlayStation, Xbox, Android. #18

  • 🏎 Rust on GPU - future compute & ML programming models beyond shaders, https://shader.rs

We track and discuss these from our perspective in the Issues for visibility and to get feedback, feel free to join in if you have ideas!

Also check out the Rust Game Development Working Group.

Sponsorships

We believe that open source creators are integral to the success of the Rust ecosystem, as well as our own success. We offer monetary sponsorship to several individuals and projects via Patreon, GitHub and OpenCollective.

Projects we are currently sponsoring:

  • Amethyst - "Data-driven game engine written in Rust"
  • Bevy - "A refreshingly simple data-driven game engine built in Rust"
  • Dimforge - "Open-Source Rust crates for numerical simulation"
  • rust-analyzer - "Bringing a great IDE experience to the Rust programming language"
  • Clap - "Fast. Configurable. Argument Parsing for Rust"
  • Gtk-rs - "Rust bindings for GTK+ 3, Cairo, GtkSourceView and other GLib-compatible libraries"
  • headcrab - "A modern Rust debugger library"
  • knurling-rs - "Improving the tools and material used to build, debug, and learn embedded systems"
  • Tokio - "Build reliable network applications without compromising speed"

Full list of projects and individual developers we are sponsoring: OpenCollective, GitHub Sponsors and Patreon.

Work with us!

We're actively looking to collaborate with developers on the areas discussed in this repository. If you're interested in working on a specific issue or idea highlighted here, please reach out to us at [email protected] to discuss contracting opportunities or sponsorship.

We are also hiring for full-time positions remotely within Europe or on-site in Stockholm!

Let's go! πŸš€

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Comments
  • Add lints as `.cargo/config.toml` section

    Add lints as `.cargo/config.toml` section

    Adds an alternate way to enable our standard lints (#59) for all this crates in a repository through .cargo/config.toml section. Inspired by https://github.com/rust-lang/cargo/issues/5034#issuecomment-927105016.

    We are testing this as a workaround for #22 until Cargo/Clippy supports a proper mechanism to configure lints for an entire repository/workspace, and seems to work really well so far. One of our big repositories has 80+ crates and all of them had the previous lint code definitions in every lib.rs/main.rs copy'n'pasted and this will replace all of that and make it dramatically easier to manage and less error prone.

    opened by repi 16
  • Embark standard lints v0.3

    Embark standard lints v0.3

    Current plan for v0.3

    • Add: map_err_ignore - prevents loosing error context and works well in Ark, easy to ignore when needed
    • Add: match_same_arms - seems to work well and simplifies matching code to reduce complexity, with some exceptions.
    • Add: large_types_passed_by_value - seems like a good idea, could catch some things should be boxed. no warns in Ark.
    • Add: string_add - cleaner & more explicit, only 1 easy fixed warn in Ark.
    • Add: string_add_assign - cleaner & more explicit, only 1 easy fixed warn in Ark.
    • Add: explicit_iter_loop - we already use explicit_into_iter_loop in v0.2, should enable or disable both.
    • Add: unimplemented - good for stubbing out WIP code but want to avoid on main our crates & systems are live at head

    The match_same_arms lint is definitely the most intrusive change of these, and may need some opt outs in a few cases when one doesn't want to re-order code, but have been quite favored still.

    Under consideration, but currently not in v0.3

    Some discussion in the PR but think these require more testing or follow up.

    • Add: needless_pass_by_value - helped us catch a lot of unnecessary : Vec<T> arguments and replace them with : &[T], saving a lot of calls to .clone() (very common trap for rust beginners to fall into). quite intrusive change for lots of crates though so safer to do separtely
    • Remove: doc_markdown - has a 4y old outstanding issue on acronyms that it wants to force codeformatting backticks on which is quite messy and requires a lot of manual disabling (or a clippy.toml config): https://github.com/rust-lang/rust-clippy/issues/1136
    • Remove: pub_enum_variant_names - pretty common for this one to trigger in valid/good cases, so is a bit hit & miss.
    • Remove: suboptimal_flops - rearranges code quite significantly with mul_add

    Will leave this as a draft for a while and feel free to discuss & suggest additional additions or removals

    opened by repi 15
  • Migrate away from winapi 0.2

    Migrate away from winapi 0.2

    Thanks to the new Cargo nightly -Z timings I saw that our 3.5 min Windows release build was spending 65 seconds building just the old winapi 0.2 crate.

    The wall time itself, while very high, is not a major problem as this was a larger from scratch build and lots of cores available, but what the timings clearly showed was that it pushed out a lot of build steps because there were tons of small and big crates that had dependencies on winapi 0.2 directly or indirectly and as such couldn't even start until that had been built.

    So want to fully get rid of winapi 0.2 crate in our builds and migrate the crates that we are using to the faster and better winapi 0.3 or, in some cases, remove them.

    Current crates that use (directly or indirectly) that uses winapi 0.2:

    • [x] iovec:: This is the most important as huge ecosystem depend on this small crate. PR fix filed
    • [x] app_dirs: Abandoned crate, switched to app_dirs2 instead and PR fix was merged & published in 7 minutes (!)
    • [x] mio: In-progress v0.7 is using latest winapi, v0.6 will stay on winapi 0.2. May just have to wait for v0.7?
    • [x] notify: Unmaintained crate, leaf dependency so less important but should find alternative or get it updated. Related PR: https://github.com/notify-rs/notify/pull/217
    • [x] wasmer-runtime-core: From page_size. Is there a more modern/maintained equivalent that they can switch to?
    • [x] tokio Update to mio 0.7 https://github.com/tokio-rs/tokio/issues/1190
    • [x] Ecosystem upgrade to new tokio 0.3
    • [x] winit uses mio 0.6

    Once we have those resolved:, we want to allow be able to disallow winapi 0.2 in our projects:

    • [x] cargo-deny: https://github.com/EmbarkStudios/cargo-deny/issues/28
    crate 
    opened by repi 15
  • Be able to host & use private crate registries

    Be able to host & use private crate registries

    This used to be important for us as we have a lot of private crates and dependencies between them.

    But we have since moved to a monorepo for all of our Rust crates where it is easy to set up dependencies within the repository and workspace.

    But believe for other companies this will be critical to adopt Rust.

    One workaround that we've used in the past when having multiple private repositories of crates with dependencies between them is to set up the dependencies as git dependencies. The draw back of that is that it is both slower to download and more to set up on local machines and esp. CI.

    • [x] https://github.com/rust-lang/cargo/issues/6589
    • [x] https://github.com/rust-lang/rust/issues/44931
    • [x] https://github.com/rust-lang/cargo/issues/6691
    cargo 
    opened by repi 15
  • RLS in VS Code robustness & performance

    RLS in VS Code robustness & performance

    opened by repi 8
  • Be able to debug WASM modules

    Be able to debug WASM modules

    We currently can't debug our WASM modules (that we run not in a browser), this will become a bigger and bigger issue going forward so we should investigate what are the paths for getting some type of debugging support either with wasmer or wasmtime.

    We would want it to be super easy to debug the code for a small (or big) WASM module directly in VS Code as well as in other editors.

    Related:

    opened by repi 6
  • lints: Add extra clippy lints used at Traverse

    lints: Add extra clippy lints used at Traverse

    Thanks for providing a good clippy base in #59!

    These are the extra lints that we have enabled over at Traverse. They were mostly picked at random a while back by looking at default-allowed lints and is likely incomplete. In addition we have these pending, hoping they become useful one day after fixing all violations:

    clippy::clone_on_ref_ptr
    clippy::cognitive_complexity
    clippy::pattern_type_mismatch
    clippy::unimplemented
    clippy::use_self
    

    Hope these are helpful to others as they are to others. Some might already be considered, or are disabled due to false-positives elsehwere and should be filtered out, let me know.

    opened by MarijnS95 5
  • Embark standard lints v0.4 - require Rust 1.52

    Embark standard lints v0.4 - require Rust 1.52

    With these changes our standard lint set now requires Rust 1.52, and builds on Rust 1.53 / beta / nightly without warnings about renamed/changed lints.

    Removals

    Additions

    Enables the following lints that we've been testing with in Ark for a few months. Many of them are somewhat low impact but low cost so just nice to have enabled.

    Part of #59

    opened by repi 4
  • `clippy::use_self` has too many false positives

    `clippy::use_self` has too many false positives

    clippy::use_self was previously part of our default set of clippy lints but we've had to remove it since it lead to false positives where applying its suggestions would fail to compile.

    This comment links to some of the issues.

    One specific case we've run into is this

    #![deny(clippy::use_self)]
    
    pub struct Foo<T> {
        value: T,
    }
    
    impl<T> Foo<T> {
        pub fn new<K>(value: K) -> Foo<K> {
                                // ^^^^^^ changing this to `Self` wont work
            Foo { value }
        }
    }
    
    tools 
    opened by davidpdrsn 4
  • Rename

    Rename "master" branches to "main"

    For our internal and open source repositories.

    We don't want where we develop to have a legacy name with these associations:

    mast‒er măs′tər

    n. One that has control over another person, a group of persons, or a thing, especially. n. The owner or keeper of an animal. n. The owner of a slave.

    and main is shorter!

    Good blog post and guide: https://www.hanselman.com/blog/EasilyRenameYourGitDefaultBranchFromMasterToMain.aspx

    TODO:

    opened by repi 4
  • Switch to LLD linker on Windows by default

    Switch to LLD linker on Windows by default

    For our project we find using LLD instead 2x faster for full builds, and 5x faster for incremental builds, compared to the default MSVC linker. This is huge and essential for us, so we enable it manually in .cargo/config:

    [target.x86_64-pc-windows-msvc]
    linker = "lld-link.exe"
    

    It would be nice if this was the default instead on Windows, esp. if it also made it possible to not have to install the Visual Studio Build Tools?

    When using LLD Windows we do get this warning, but haven't been an issue for us:

    warning: not embedding natvis: lld-link may not support the flag
    

    Related umbrella issue in rust-gamedev WG: https://github.com/rust-gamedev/wg/issues/50

    Tracking issue:

    cargo have-workaround 
    opened by repi 4
  • rust-analyzer wants

    rust-analyzer wants

    Wish list of rust analyzer features & bug fixes we would like to see added/improved/fixed based on the Rust projects we've been developing at Embark.

    This is not a complete list, but an attempt to keep a bit of structure for our own sake, and may be of interest for rustfmt developers as well.

    Should have

    Features or fixes that would directly improve or help our workflows

    • [x] https://github.com/rust-lang/rust-analyzer/issues/6777
    • [x] https://github.com/rust-lang/rust-analyzer/issues/6556
    • [x] https://github.com/rust-lang/rust-analyzer/issues/12936
    • [x] https://github.com/rust-lang/rust-analyzer/issues/13125
    • [x] https://github.com/rust-lang/rust-analyzer/issues/11654
    • [x] https://github.com/rust-lang/rust-analyzer/issues/6895
    • [ ] https://github.com/rust-lang/rust-analyzer/issues/11260
    • [ ] https://github.com/rust-lang/rust-analyzer/issues/11296

    Nice to have

    Features or fixes that would be nice to have, but are lower priority to us than the above list.

    • [x] https://github.com/rust-lang/rust-analyzer/issues/13254
    • [ ] https://github.com/rust-lang/rust-analyzer/issues/12499
    • [ ] https://github.com/rust-lang/rust-analyzer/issues/11352
    • [ ] https://github.com/rust-lang/rust-analyzer/issues/11181
    • [ ] https://github.com/rust-lang/rust-analyzer/issues/11137
    • [x] https://github.com/rust-lang/rust-analyzer/issues/9673
    • [x] https://github.com/rust-lang/rust-analyzer/issues/9544
    • [ ] https://github.com/rust-lang/rust-analyzer/issues/9131
    • [ ] https://github.com/rust-lang/rust-analyzer/issues/8314
    • [ ] https://github.com/rust-lang/rust-analyzer/issues/3767

    Not filed / found

    Fixes or enhancements that believe there is no issue for yet, if you find one please do comment and we'll update it here.

    • Generally slow performance on our large repositories, unclear how to investigate to share for focused improvements

    Related tracking issues for other Rust components:

    • #84
    • #83
    • #79
    tools 
    opened by repi 0
  • Rust wants

    Rust wants

    Wish list of rust compiler & std features & bug fixes we would like to see added/improved/fixed based on the Rust projects we've been developing at Embark.

    This is not a complete list, but an attempt to keep a bit of structure for our own sake, and may be of interest for rust compiler developers as well.

    Should have

    rust compiler features or fixes that would directly improve or help our workflows

    • [ ] #41
    • [ ] https://github.com/rust-lang/rust/issues/74015
    • [ ] https://github.com/rust-lang/rust/issues/68007
    • [ ] https://github.com/rust-lang/rust/issues/76578
    • [ ] https://github.com/rust-lang/rust/issues/101337
    • [ ] https://github.com/rust-lang/rust/issues/101210
    • [ ] https://github.com/rust-lang/cargo/issues/10016
    • [ ] https://github.com/rust-lang/cargo/issues/7850
    • [ ] https://github.com/rust-lang/cargo/issues/7169
    • [ ] https://github.com/rust-lang/cargo/issues/9096
    • [ ] https://github.com/rust-lang/cargo/issues/10030
    • [ ] https://github.com/rust-lang/rustup/issues/988
    • [ ] https://github.com/rust-lang/rust/issues/71520

    Nice to have

    rust compiler features or fixes that would be nice to have, but are lower priority to us than the above list.

    • [ ] https://github.com/rust-lang/rust/issues/85444
    • [ ] https://github.com/rust-lang/rust/issues/54196
    • [ ] https://github.com/rust-lang/cargo/issues/5042
    • [ ] https://github.com/rust-lang/cargo/issues/10857
    • [ ] https://github.com/rust-lang/rfcs/issues/2790
    • [ ] https://github.com/rust-lang/cargo/issues/9455
    • [ ] https://github.com/rust-lang/cargo/issues/10711
    • [ ] https://github.com/rust-lang/cargo/issues/9506
    • [ ] https://github.com/rust-lang/cargo/issues/9058
    • [ ] https://github.com/rust-lang/cargo/issues/8850
    • [ ] https://github.com/rust-lang/rust/issues/83310

    Not filed / found

    Fixes or enhancements that believe there is no issue for yet, if you find one please do comment and we'll update it here.


    Related tracking issues for other Rust components:

    • #79
    • #83
    • #86
    tools 
    opened by repi 0
  • rustfmt wants

    rustfmt wants

    Wish list of rustfmt features & bug fixes we would like to see added/improved/fixed based on the Rust projects we've been developing at Embark.

    This is not a complete list, but an attempt to keep a bit of structure for our own sake, and may be of interest for rustfmt developers as well.

    Should have

    rustfmt features or fixes that would directly improve or help our workflows

    • [ ] https://github.com/rust-lang/rustfmt/issues/4991
    • [ ] https://github.com/rust-lang/rustfmt/issues/3347
    • [ ] https://github.com/rust-lang/rustfmt/issues/3863
    • [ ] https://github.com/rust-lang/rustfmt/issues/4914

    Nice to have

    rustfmt features or fixes that would be nice to have, but are lower priority to us than the above list.

    • [ ] https://github.com/rust-lang/rustfmt/issues/3353
    • [ ] https://github.com/rust-lang/rustfmt/issues/3348
    • [ ] https://github.com/rust-lang/rustfmt/issues/3350
    • [ ] https://github.com/rust-lang/rustfmt/issues/5257
    • [ ] https://github.com/rust-lang/rustfmt/issues/3363
    • [ ] https://github.com/rust-lang/rustfmt/issues/5323

    Not filed / found

    Fixes or enhancements that believe there is no issue for yet, if you find one please do comment and we'll update it here.


    Related tracking issues for other Rust components:

    • #84
    • #79
    • #86
    tools 
    opened by repi 0
  • Clippy wants

    Clippy wants

    Wish list of Clippy lints and features & bug fixes we would like to see added/improved/fixed based on the Rust projects we've been developing at Embark.

    This is not a complete list, but an attempt to keep a bit of structure for our own sake, and may be of interest for Clippy lint developers as well.

    Should have

    Lints & Clippy features or fixes that would directly improve or help our workflows

    • [ ] https://github.com/rust-lang/rust-clippy/issues/6625 (also see #22)
    • [ ] https://github.com/rust-lang/rust-clippy/issues/8679 (Embark filed)
    • [ ] https://github.com/rust-lang/rust-clippy/issues/8567 (Embark filed)
    • [x] https://github.com/rust-lang/rust-clippy/issues/7005 (Embark filed)
    • [x] https://github.com/rust-lang/rust-clippy/issues/3689 (cast_lossless)
    • [x] https://github.com/rust-lang/rust-clippy/issues/8505
    • [ ] https://github.com/rust-lang/rust-clippy/issues/8349
    • [ ] https://github.com/rust-lang/rust-clippy/issues/8246
    • [x] https://github.com/rust-lang/rust-clippy/issues/7954
    • [ ] https://github.com/rust-lang/rust-clippy/issues/7828
    • [ ] https://github.com/rust-lang/rust-clippy/issues/7763
    • [ ] https://github.com/rust-lang/rust-clippy/issues/3045
    • [ ] https://github.com/rust-lang/rust-clippy/issues/8092
    • [x] https://github.com/rust-lang/rust-clippy/issues/6902
    • [x] https://github.com/rust-lang/rust-clippy/issues/6880
    • [ ] https://github.com/rust-lang/rust-clippy/issues/5736 (by @jhpratt)
    • [ ] https://github.com/rust-lang/rust-clippy/issues/3122
    • [ ] https://github.com/rust-lang/rust-clippy/issues/9320
    • [ ] https://github.com/rust-lang/rust-clippy/issues/9063

    Nice to have

    Lints & Clippy features or fixes that would be nice to have, but are lower priority to us than the above list.

    • [x] https://github.com/rust-lang/rust-clippy/issues/8399
    • [x] https://github.com/rust-lang/rust-clippy/issues/8603
    • [x] https://github.com/rust-lang/rust-clippy/issues/8368
    • [ ] https://github.com/rust-lang/rust-clippy/issues/8088
    • [ ] https://github.com/rust-lang/rust-clippy/issues/8022
    • [x] https://github.com/rust-lang/rust-clippy/issues/7959
    • [ ] https://github.com/rust-lang/rust-clippy/issues/7958
    • [ ] https://github.com/rust-lang/rust-clippy/issues/8439
    • [x] https://github.com/rust-lang/rust-clippy/issues/7714
    • [x] https://github.com/rust-lang/rust-clippy/issues/7381
    • [ ] https://github.com/rust-lang/rust-clippy/issues/7500
    • [ ] https://github.com/rust-lang/rust-clippy/issues/7459
    • [ ] https://github.com/rust-lang/rust-clippy/issues/7328
    • [ ] https://github.com/rust-lang/rust-clippy/issues/5974
    • [ ] https://github.com/rust-lang/rust-clippy/issues/5794
    • [ ] https://github.com/rust-lang/rust-clippy/issues/8522 (by @jhpratt)
    • [ ] https://github.com/rust-lang/rust-clippy/issues/8863

    Not filed / found

    Fixes or enhancements that believe there is no issue for yet, if you find one please do comment and we'll update it here.

    • [ ] cargo clippy --fix often doesn't work and it is unclear to the user which lints it works for and which it skips
    • [ ] A lint to require types in crate to be used fully qualified, like log::info!("hej") instead of use log::info; info!("hej") by specifying log crate in clippy.toml section for the lint.

    Related tracking issues for other Rust components:

    • #84
    • #83
    • #86
    tools 
    opened by repi 1
  • Standard lints v7 candidates (Rust 1.60)

    Standard lints v7 candidates (Rust 1.60)

    Planning to do a larger v7 update to our standard lints (#59) with a bunch of additions and requirement of Rust 1.60

    Lint candidates

    These are the candidates currently thinking of and are using in our internal main repo but will experiment with all of these in our other private and open repos and see if there are any issues with them there.

    Planning to add

    Quite trivial but nice ones:

    Planning to remove

    These are now warn-by-default:

    • clippy::disallowed_methods
    • clippy::disallowed_types

    Considering

    More opinionated for our engine repository workflow:

    • clippy::mod_module_files - the style we use and prefer
    • clippy::undocumented_unsafe_blocks - this one we do have a lot of allows with for FFI crates and such, but it is a quite nice default still that we just recently activated
    • unsafe_op_in_unsafe_fn - see this tracking issue and deeper discussion in RFC about the direction of getting this to be default in the language as unsafe fn and unsafe blocks are quite different things. https://github.com/rust-lang/rust/issues/71668
    • rustdoc::missing_crate_level_docs - this may not be that important for many repos, but we've found it a nice quality to have for both internal and open source crates - and can just be a single-line when you add the crate.
    opened by repi 9
  • Embark's standard lints

    Embark's standard lints

    Background

    This issue tracks which Rust and Clippy lints we currently use as default for all of our internal and external crates. We have a common base of lints that we configure the same everywhere that is more opinionated than the Rust and Clippy defaults and geared towards how we prefer to (currently) write & maintain Rust code.

    Individual crates are able to, and often do override some of these defaults, either on a crate level, or for specific modules or functions. But we still find it helpful to have a standard across everything to keep the code high quality and generally working the same way.

    Lint configuration

    We currently have two ways to enable our configured lints:

    1. Through copy'n'pasting https://github.com/EmbarkStudios/rust-ecosystem/blob/main/lints.rs into every crate
    2. Through a .cargo/config.toml section: https://github.com/EmbarkStudios/rust-ecosystem/blob/main/lints.toml

    Traditionally we've used option 1, but are testing and converting more to option 2 as it is much easier to just have a single configuration file with everything.

    We hope to later in 2021 have proper first-class support for a lints.toml or [lints] section in Cargo and switch to that, but progress for it has been slow. Tracked in:

    • #22
    • https://github.com/rust-lang/cargo/issues/5034
    • https://github.com/rust-lang/rust-clippy/issues/6625.

    Lints of interests

    Testing / being discussed

    • Add: clippy::needless_pass_by_value - helped us catch a lot of unnecessary : Vec<T> arguments and replace them with : &[T], saving a lot of calls to .clone() (very common trap for rust beginners to fall into). quite intrusive change for lots of crates though so safer to do separtely
    • Add: rustdoc::missing_crate_level_docs

    Blocked

    List of Clippy lints we are interested in using, but that have issues or are not mature / specific enough yet for inclusion.

    tools 
    opened by repi 11
Owner
Embark
The future belongs to the curious
Embark
Rust-and-opengl-lessons - Collection of example code for learning OpenGL in Rust

rust-and-opengl-lessons Project requires Rust 1.31 Collection of example code for learning OpenGL in Rust 00 - Setup 01 - Window 02 - OpenGL Context 0

Nerijus Arlauskas 348 Dec 11, 2022
Simple retro game made using Rust bracket-lib by following "Herbert Wolverson's Hands on Rust" book.

Flappy Dragon Code from This program is a result of a tutorial i followed from Herbert Wolverson's Hands-on Rust Effective Learning through 2D Game De

Praneeth Chinthaka Ranasinghe 1 Feb 7, 2022
A rust chess implementation using a neural network scoring function built on huggingface/candle + rust + wasm

Rusty Chess What is it? Rusty Chess aims to be a high quality embeddable chess engine that runs entirely locally in the browser (no backend required).

Gareth 3 Nov 3, 2023
A Rust wrapper and bindings of Allegro 5 game programming library

RustAllegro A thin Rust wrapper of Allegro 5. Game loop example extern crate allegro; extern crate allegro_font; use allegro::*; use allegro_font::*;

null 80 Dec 31, 2022
High performance Rust ECS library

Legion aims to be a feature rich high performance Entity component system (ECS) library for Rust game projects with minimal boilerplate. Getting Start

Amethyst Engine 1.4k Jan 5, 2023
A refreshingly simple data-driven game engine built in Rust

What is Bevy? Bevy is a refreshingly simple data-driven game engine built in Rust. It is free and open-source forever! WARNING Bevy is still in the ve

Bevy Engine 21.1k Jan 4, 2023
Rust library to create a Good Game Easily

ggez What is this? ggez is a Rust library to create a Good Game Easily. The current version is 0.6.0-rc0. This is a RELEASE CANDIDATE version, which m

null 3.6k Jan 7, 2023
RTS game/engine in Rust and WebGPU

What is this? A real time strategy game/engine written with Rust and WebGPU. Eventually it will be able to run in a web browser thanks to WebGPU. This

Thomas SIMON 258 Dec 25, 2022
unrust - A pure rust based (webgl 2.0 / native) game engine

unrust A pure rust based (webgl 2.0 / native) game engine Current Version : 0.1.1 This project is under heavily development, all api are very unstable

null 368 Jan 3, 2023
Rust bindings for GDNative

GDNative bindings for Rust Rust bindings to the Godot game engine. Website | User Guide | API Documentation Stability The bindings cover most of the e

null 3.2k Jan 9, 2023
SDL bindings for Rust

Rust-SDL Bindings for SDL in Rust Overview Rust-SDL is a library for talking to SDL from Rust. Low-level C components are wrapped in Rust code to make

Brian Anderson 174 Nov 22, 2022
SDL2 bindings for Rust

Rust-SDL2 Bindings for SDL2 in Rust Changelog for 0.34.2 Overview Rust-SDL2 is a library for talking to the new SDL2.0 libraries from Rust. Low-level

null 2.2k Jan 5, 2023
SFML bindings for Rust

rust-sfml Rust bindings for SFML, the Simple and Fast Multimedia Library. Requirements Linux, Windows, or OS X Rust 1.42 or later SFML 2.5 CSFML 2.5 D

Jeremy Letang 567 Jan 7, 2023
Rust bindings for libtcod 1.6.3 (the Doryen library/roguelike toolkit)

Warning: Not Maintained This project is no longer actively developed or maintained. Please accept our apologies. Open pull requests may still get merg

Tomas Sedovic 226 Nov 17, 2022
Victorem - easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust.

Victorem Easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust. Example Cargo.toml [dependencies] vict

Victor Winbringer 27 Jan 7, 2023
Rust-based replacement for the default Minecraft renderer

wgpu-mc ?? A blazing fast alternative renderer for Minecraft Intro WebGPU is a new web specification designed to provide modern graphics and compute c

Birb 1 Jun 28, 2022
grr and rust-gpu pbr rendering

grr-gltf Barebone gltf viewer using grr and rust-gpu. Currently only supports a single gltf model! Assets These files need to be downloaded and placed

Markus Siglreithmaier 28 Dec 2, 2022
A no-frills Tetris implementation written in Rust with the Piston game engine, and Rodio for music.

rustris A no-frills Tetris implementation written in Rust with the Piston game engine, and Rodio for music. (C) 2020 Ben Cantrick. This code is distri

Ben Cantrick 17 Aug 18, 2022
Some Rust bindings for Binary Ninja

Binary Ninja Rust Bindings Work in progress Rust bindings geared towards analysis. Features added as they come up. No promises anything works at this

Cory Duplantis 21 May 5, 2022