Stream: git-wasmtime

Topic: wasmtime / PR #13335 isle tuple structs and enum variants


view this post on Zulip Wasmtime GitHub notifications bot (May 11 2026 at 16:50):

Firestar99 opened PR #13335 from Firestar99:isle_tuple_fields to bytecodealliance:main:

Requires https://github.com/bytecodealliance/wasmtime/pull/13319

This is a stacked PR and the above PR must be merged first. Unfortunately, I can't change the base to be that PR due to github limitations, so please only review the top commit. I'll keep this one a draft until the above is merged.

Adds support for tuple-like field declarations in isle:

(type A (struct u32 u32))
(type B (enum
  (Ba (x u32))
  (Bb u32 u32 u32)))
(type D (enum
  (Da A)
  (Db B)
  (Dc)))

Which codegen's types like these:

/// Internal type A: defined at isle_examples/run/tuple_variants.isle line 0.
#[derive(Clone, Debug)]
pub struct A(pub u32, pub u32);
/// Internal type B: defined at isle_examples/run/tuple_variants.isle line 1.
#[derive(Clone, Debug)]
pub enum B {
    Ba {
        x: u32,
    },
    Bb(u32, u32, u32),
}

/// Internal type D: defined at isle_examples/run/tuple_variants.isle line 4.
#[derive(Clone, Debug)]
pub enum D {
    Da(A),
    Db(B),
    Dc,
}

As mentioned in https://github.com/bytecodealliance/wasmtime/pull/13319, I have an external enum with tuple-like fields that I would like to model in isle without modifying the existing data structure, if possible:

pub enum MInst {
    IAdd(IAdd),
    IConst(IConst),
}

view this post on Zulip Wasmtime GitHub notifications bot (May 11 2026 at 16:50):

Firestar99 updated PR #13335.

view this post on Zulip Wasmtime GitHub notifications bot (May 11 2026 at 16:51):

Firestar99 edited PR #13335:

Requires https://github.com/bytecodealliance/wasmtime/pull/13319

This is a stacked PR and the above PR must be merged first. Unfortunately, I can't change the base to be that PR due to github limitations, so please only review the top commit. I'll keep this one a draft until the above is merged.

Adds support for tuple-like field declarations in isle:

(type A (struct u32 u32))
(type B (enum
  (Ba (x u32))
  (Bb u32 u32 u32)))
(type D (enum
  (Da A)
  (Db B)
  (Dc)))

Which codegen's types like these:

/// Internal type A: defined at isle_examples/run/tuple_variants.isle line 0.
#[derive(Clone, Debug)]
pub struct A(pub u32, pub u32);
/// Internal type B: defined at isle_examples/run/tuple_variants.isle line 1.
#[derive(Clone, Debug)]
pub enum B {
    Ba {
        x: u32,
    },
    Bb(u32, u32, u32),
}

/// Internal type D: defined at isle_examples/run/tuple_variants.isle line 4.
#[derive(Clone, Debug)]
pub enum D {
    Da(A),
    Db(B),
    Dc,
}

As mentioned in https://github.com/bytecodealliance/wasmtime/pull/13319, I have an external enum with tuple-like fields that I would like to model in isle without modifying the existing data structure, if possible:

pub enum MInst {
    IAdd(IAdd),
    IConst(IConst),
}

I derived the ast and sema type names from Rust's grammar.

view this post on Zulip Wasmtime GitHub notifications bot (May 11 2026 at 20:17):

github-actions[bot] added the label cranelift on PR #13335.

view this post on Zulip Wasmtime GitHub notifications bot (May 11 2026 at 20:17):

github-actions[bot] added the label isle on PR #13335.

view this post on Zulip Wasmtime GitHub notifications bot (May 11 2026 at 20:18):

github-actions[bot] commented on PR #13335:

Subscribe to Label Action

cc @cfallin, @fitzgen

<details>
This issue or pull request has been labeled: "cranelift", "isle"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 22:21):

:thumbs_up: cfallin submitted PR review:

Last commit generally looks LGTM -- thanks! Happy to land this once the precursor PR lands and this is rebased.

view this post on Zulip Wasmtime GitHub notifications bot (May 12 2026 at 22:21):

:speech_balloon: cfallin created PR review comment:

probably fine to use usize here? I don't imagine the universe fitting the memory required to describe 2^128 tuple fields...

view this post on Zulip Wasmtime GitHub notifications bot (May 17 2026 at 10:07):

Firestar99 updated PR #13335.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2026 at 15:45):

Firestar99 updated PR #13335.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2026 at 15:46):

Firestar99 has marked PR #13335 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2026 at 15:46):

Firestar99 commented on PR #13335:

Rebased ready to merge

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2026 at 15:46):

Firestar99 requested fitzgen for a review on PR #13335.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2026 at 15:46):

Firestar99 requested wasmtime-compiler-reviewers for a review on PR #13335.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2026 at 15:46):

Firestar99 edited a comment on PR #13335:

Rebased ready to merge, thx for the reviews :heart:

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2026 at 15:50):

:thumbs_up: cfallin submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2026 at 15:50):

cfallin has enabled auto merge for PR #13335.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2026 at 15:55):

cfallin added PR #13335 isle tuple structs and enum variants to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2026 at 16:20):

:check: cfallin merged PR #13335.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2026 at 16:20):

cfallin removed PR #13335 isle tuple structs and enum variants from the merge queue.


Last updated: Jun 01 2026 at 09:49 UTC