Skip to content

Tracking issue - WASM_BINDGEN snippets support changes #27665

Description

@guybedford

This is a tracking issue from #27208 (comment).

wasm-bindgen outputs directly to a snippets folder for external inline code snippets, but does not optimize these into the single JS file itself. As a result this folder must be copied with the wasm-bindgen output files.

These are distinct from Emscripten-style inline code because they assume module syntax like an ES module file themselves - supporting import 'dep' and using their export interface as the snippet interface.

In future two possible optimizations could arise here:

  1. Emscripten doing the single-file JS optimization to inline these static known imports
  2. wasm-bindgen adding support for this optimization itself

In either of these cases, copying the snippets directory to support inline code would no longer be need which this tracks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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