Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce the pulley-interpreter crate #9008

Merged
merged 14 commits into from
Jul 25, 2024

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Jul 24, 2024

This commit is the first step towards implementing bytecodealliance/rfcs#35

This commit introduces the pulley-interpreter crate which contains the Pulley bytecode definition, encoder, decoder, disassembler, and interpreter.

This is still very much a work in progress! It is expected that we will tweak encodings and bytecode definitions, that we will overhaul the interpreter (to, for example, optionally support the unstable Rust explicit_tail_calls feature), and otherwise make large changes. This is just a starting point to get the ball rolling.

Subsequent commits and pull requests will do things like add the Cranelift backend to produce Pulley bytecode from Wasm as well as the runtime integration to run the Pulley interpreter inside Wasmtime.

Dedicated CI for Pulley, ensuring that it builds and runs on things like 32-bit nostd platforms, will also come in follow ups.

This commit is the first step towards implementing
bytecodealliance/rfcs#35

This commit introduces the `pulley-interpreter` crate which contains the Pulley
bytecode definition, encoder, decoder, disassembler, and interpreter.

This is still very much a work in progress! It is expected that we will tweak
encodings and bytecode definitions, that we will overhaul the interpreter (to,
for example, optionally support the unstable Rust `explicit_tail_calls`
feature), and otherwise make large changes. This is just a starting point to get
the ball rolling.

Subsequent commits and pull requests will do things like add the Cranelift
backend to produce Pulley bytecode from Wasm as well as the runtime integration
to run the Pulley interpreter inside Wasmtime.
@fitzgen fitzgen requested a review from alexcrichton July 24, 2024 23:17
@fitzgen fitzgen requested a review from a team as a code owner July 24, 2024 23:17
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me, thanks again for pushing on this!

For some background I've pre-reviewed much of this with Nick ahead of time hence the light comments here as many of my otherwise-comments have already been addressed.

pulley/tests/all/main.rs Outdated Show resolved Hide resolved
pulley/src/regs.rs Show resolved Hide resolved
pulley/src/regs.rs Show resolved Hide resolved
pulley/src/op.rs Outdated Show resolved Hide resolved
pulley/src/imms.rs Outdated Show resolved Hide resolved
pulley/src/decode.rs Outdated Show resolved Hide resolved
pulley/fuzz/Cargo.toml Show resolved Hide resolved
pulley/src/lib.rs Show resolved Hide resolved
pulley/Cargo.toml Outdated Show resolved Hide resolved
@alexcrichton
Copy link
Member

Dedicated CI for Pulley

One thing I'd also recommend here is to run all tests for pulley in miri as well (or otherwise just add it to our list of tests-in-miri)

@fitzgen
Copy link
Member Author

fitzgen commented Jul 25, 2024

One thing I'd also recommend here is to run all tests for pulley in miri as well (or otherwise just add it to our list of tests-in-miri)

Will do as a follow up, with the rest of pulley-specific CI.

@fitzgen fitzgen enabled auto-merge July 25, 2024 17:34
@fitzgen fitzgen added this pull request to the merge queue Jul 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 25, 2024
@fitzgen fitzgen enabled auto-merge July 25, 2024 20:06
@fitzgen fitzgen added this pull request to the merge queue Jul 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 25, 2024
@fitzgen fitzgen requested a review from a team as a code owner July 25, 2024 21:40
@fitzgen fitzgen requested review from elliottt and removed request for a team July 25, 2024 21:40
@fitzgen fitzgen enabled auto-merge July 25, 2024 21:40
@fitzgen fitzgen added this pull request to the merge queue Jul 25, 2024
Merged via the queue into bytecodealliance:main with commit 4ac1bed Jul 25, 2024
37 checks passed
@fitzgen fitzgen deleted the add-pulley-interpreter-crate branch July 25, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants