oxidecomputer / oxidecomputer/opte

Audit Rust enums used in FFI

Open
#322 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
77
Forks
11
Avg merge
9d 20h
Merged PRs (30d)
8

Description

We have a lot of enum types that are passed/returned via FFI (whether it be us calling foreign functions or exposing functions called from non-Rust code) but that comes with a subtle footgun. See https://github.com/rust-lang/rust/issues/36927. We need to go over the code to make sure we're not tripping up over this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Rust enum types used at FFI boundaries and the linked Rust issue 36927. Trace both foreign functions called by Rust and functions exposed to non-Rust code, then identify which enum representations require attention. Done means the FFI enum audit is complete and any problematic cases have a documented resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.