Skip to content

Rust Support #59

Open
Open

Description

@ibraheemdev

What would it take for GenMC to support Rust programs? I know it GenMC works at the LLVM IR, so it sounds like it should be possible.

Activity

  1. michaliskok commented on May 19, 2024

    @michaliskok
    Collaborator

    In principle it should be possible, though in practice it depends on the IR produced by rustc.

    At the very least, we would need to provide a mock of std::thread (and maybe std::sync::atomic) to ensure that GenMC can track thread creation and atomic accesses (this is what is done for C/C++).

    Beyond that, we would also need to ensure that there are no ffi calls in the produced code, and that the IR interpreter does not choke on any of the instructions (rustc exercises different parts of LLVM IR than clang, and these parts might contain instructions that are not tested/properly supported).

    One could also design a different runtime for Rust altogether, but this is considerably more work.

    If you are willing to try it out, let me know how it goes. I'd be happy to help in determining what changes are precisely required in order to make it work.

    Michalis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions