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

Build and publish the lexer to npm #20778

Merged
merged 3 commits into from
Jul 28, 2023
Merged

Commits on Jul 28, 2023

  1. Add WASM-build support for JavaScript build targets to the lexer.

    In an effort to ensure we're not maintaing two concurrent Lexer
    implementations, make the existing lexer available to more platforms. By
    building a WASM module, we can re-use it in JavaScript contexts.
    
    `wasm-pack` does most of the heavy lifting, but we need to ensure we're
    emitting types that can be serialized across the WASM interface, hence
    the flattening of the token array.
    arusahni committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    5254090 View commit details
    Browse the repository at this point in the history
  2. Add WASM cross-compilation support.

    Certain crates, such as 'sql-lexer', can be compiled to WASM using the
    'wasm-pack' tool. This commit:
    
      1. Adds the relevant WASM libraries and tooling to the ci-builder.
      2. Exposes additional CLI surface area to allow xcompile to run in the
         ci-builder image.
    arusahni committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    e694727 View commit details
    Browse the repository at this point in the history
  3. Support building WASM crates and publishing them to npm.

    Add CI hooks to build WASM packages alongside the crates in CI, and
    tooling to publish built artifacts to npm with the appropriate tags and
    version information.
    
    This will publish packages for _all_ builds on the deploy pipeline.
    Stable/official builds will not have a `-dev` suffix, and will receive
    the `latest` dist tag. Unstable builds will have a `dev` suffix that
    includes a build number, and will receive the `dev` dist tag.
    arusahni committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    8f7cd9d View commit details
    Browse the repository at this point in the history