Import attribute for controlling builtins compilation option

Đang mở
#99 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, wasm
Lĩnh vực
compilers

Hướng nghiên cứu

Start with the discussion in pull request #95 linked from the issue, focusing on the proposed wasmBuiltins import attribute and compilation-sharing behavior. Define the attribute's handling of all, none, and builtin lists, including sorting and canonicalization; done means the proposal specifies the exact name, accepted values, defaults, and when module records and binary compilations are shared.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Follow-on from https://github.com/WebAssembly/esm-integration/pull/95#issuecomment-2651870948 to track support for a new import attribute to support builtins compilation options.

From that discussion:

Add an import attribute for the wasm builtin collections to enable: either 'all', 'none', or a list of specific ones to enable. The default if not specified would be 'all' (as opposed to the JS-API which defaults to 'none').

The exact name can be confirmed, but for now consider we had an attribute called wasmBuiltins:

import source mod1 from './mod.wasm' with { wasmBuiltins: 'none' };
import source mod2 from './mod.wasm' with { wasmBuiltins: 'js-string,another-builtin' };

Ideally we would define canonicalization of the import attribute string to ensure that we do not end up treating:

import source mod1 from './mod.wasm' with { wasmBuiltins: 'all' };
import source mod2 from './mod.wasm' with { wasmBuiltins: 'js-string' };
import source mod3 from './mod.wasm';

As three separate binary compilations, but that the compilation and module record is shared between all of the above.

One issue with canonicalization when it comes to supporting multiple builtins (say comma-separated - wasmBuiltins: 'js-string,another-builtin' is that this also implies some kind of sorting canonicalization.

I think these cases should be possible to address though.

Ngôn ngữ chính
WebAssembly
Star
458
Fork
40
Merge trung bình
10 ngày 37 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của WebAssembly/esm-integration

Tất cả issue của WebAssembly/esm-integration

Issue tương tự

Thêm issue về Compilers

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.