Skip to content

Move to using common container for building WASM #3714

@mhdawson

Description

@mhdawson

This would solve...

The security wg has been looking at auditing build dependencies for Node.js. nodejs/security-wg#1236

One area we thought that we could improve is how we build WASM. Today it's done differently, in some cases with different tools, different versions of tools and the versions used may or may not be known/captured in a way that would allow us to be sure we could reproduce a build.

I've looked at creating a common container that would be shared across the dependencies that build WASM and which captures the versions of tools etc. In addition in using a shared container that we store in the project we know we can build with the same tools because they are in the container stored within the registry.

The approach is based on how undici was building, with the main change being to use a pre-existing container. I've already talked to maintainers of amaro and cjs-module-lexer which are the other deps that build WASM blobs and they seem willing to adopt the approach.

I still have a bit of work in terms of how the container would be published (as I believe GitHub has a migration from ghcr of some sort) and the repo mhdawson/wasm-builder would need to move under the nodejs org.

The PR to adopt in undici would look like: main...mhdawson:undici:wasm-build-experiment

You can see what it looks like for the other deps from the links in - nodejs/security-wg#1236 (comment)

The reason for this issue is to ask if undici would be willing to adopt the approach as well.

The implementation should look like...

I have also considered...

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions