awslabs / awslabs/shuttle

Expose runtime apis

Open
#248 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.1k
Forks
59
Avg merge
4d 2h
Merged PRs (30d)
15

Description

Expose more runtime internals so that users can implement custom synchronization APIs.

As an example, take [atomic-wait](https://crates.io/crates/atomic-wait). This crate provides a futuex-like api for all modern operating systems, and has a few million recent downloads on crates.io. Unfortunately, testing code that uses this crate is difficult with shuttle. While it is possible to replicate something like the functionality of a futex using a mutex and condvar, I don't think the runtime ordering effects are exactly identical. I'd prefer to be able to implement the futex functionality myself with `thread::switch` and similar, so I can be confident that my tests are modeling the actual semantics of my synchronization primitives.

Contributor guide

Open the contributing guide

Research direction

The issue names the `thread::switch` entry point and the `atomic-wait` crate, but no files or tests. Start by reading the runtime API around `thread::switch` and determine which internals a custom futex-like synchronization API would need. Done means users can implement that API while preserving the runtime ordering semantics they need to test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.