Skip to content

Uno Reverse Card: Using Omniglot for generating bindings to a Rust library in a C++ codebase #1

@johnDeSilencio

Description

@johnDeSilencio

Hello, @lschuermann! I hope you are doing well.

My name is Nick, and I work at a company in the energy sector. At my company, we use a lot of C++ in our products, and I've been looking for ways to make it easier for us to adopt Rust where it makes sense. To improve adoption, I'm looking for ways to make it as easy as possible for Rust to inter-operate with the mountains of C++ that have been written over the last two decades.

I'm attending RustConf in two weeks and stumbled on your paper through Princeton about Omniglot. First of all, amazing work that you and your co-authors have done! I am hoping that a tool like the one you have developed could help lower the barriers to adopting Rust at my company.

I had some questions, though. The paper primarily focuses on a scenario where a Rust codebase has to interact with a foreign library. In other words, Rust is "running the show". Can Omniglot be used in the other direction? What I'm specifically looking for is the ability to define some kind of interface in C++ (or C) that is then implemented in Rust. In that scenario, C++ is "running the show" and it is using libraries written in Rust.

Second question: the memory isolation primitives. I actually cloned the omniglot-mpk and tried to get it to run on my workstation. That's how I found out that my (old) x86 Intel CPU doesn't actually support MPK! And there's also no guarantees that the CPUs that we use in our products at my company provide memory isolation capabilities in hardware. Would it be possible to extend Omniglot to provide some kind of runtime check for those platforms without hardware support? That would be bad for performance, of course, but it would make Omniglot portable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions