Skip to content

Adoption of Rust over time in existing game codebases #36

Open
@aclysma

Description

@aclysma

This is very similar to #29 and there are a lot of great comments that are relevant to this there. However, I think #29 is along the lines of "how can an end-user of an engine use rust with existing engines" and I'd like to explore "how can teams maintaining existing game codebases migrate to rust over time"

In industry, established studios are generally using a large existing codebase. Any new language or technology often gets introduced slowly over time, and it's adopted incrementally. (Along the lines of this tweet: https://twitter.com/AndreaPessino/status/1021534287202402305)

I think more demonstrations and proof-of-concepts that Rust can link against and reuse C code would be beneficial to the community. I've personally been using the imgui and gpc crates to call out to a couple libraries in C. (In some ways cargo makes it easier to pull existing C code into a rust project than it would be in most C/C++ environments.)

I think it would also be helpful to consider the use case of linking Rust code into an existing codebase. This could be C++ linking against a rust binary, or something like C# pinvoke into a DLL.

In short, adopting Rust doesn't require throwing out existing code, but I'm not sure this has been well-messaged outside the Rust community.

I have a few questions:

  • Is it in scope for this WG to consider the path that existing studios would take to adopt Rust? If so:
    ** Are there any improvements that can be made to the Rust ecosystem to improve this interop story?
    ** Is the fact that there is an interop story something we'd like to call attention to in some way (particularly outside the Rust community)? If so, how can we do that?
    ** Do we know of any groups that have gone far down this path? It would be great to have their post-mortem perspective on it to know how it went, and so that we could explore opportunities to ease that path for others in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs ChampionWe need someone who can help drive this forward.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions