Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

web: a fizzy.js to embed fizzy on a page's canvas, without patching globals

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

Maintainer thường phản hồi trong vòng 1 ngày

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
Sôi nổi
Công nghệ
javascript, wasm, zig
Lĩnh vực
frontend, web-dev

Hướng nghiên cứu

Start by reading web/index.html and dvui's web.js to trace how imports, event listeners, plugins, and rendering are handled. The issue proposes a new fizzy.js module and changes to the web build API, but points to a separate build API issue for part of the scope. Done means callers can embed Fizzy on a canvas with scoped imports and listeners that destroy() removes, while index.html delegates to the module and no longer patches the global WebAssembly API.

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

Mô tả

enhancement

Feature request from Graphl, which embeds fizzy's wasm on a canvas inside someone else's page. An iframe isn't an option for its users.

Today web/index.html:

  • builds the fizzy and env imports inline
  • monkeypatches the global WebAssembly.instantiateStreaming, which changes every wasm instantiation on the host page
  • adds keydown, message, focus and resize listeners on window, and fullscreenchange on document, which take the host page's shortcuts

So Graphl carries its own copy of the 12 imports.

Proposal:

  1. In dvui's web.js, let callers pass extra import namespaces: dvui(canvas, url, { imports }).
  2. Add a fizzy.js module, startFizzy({ canvas, wasm, imports, storage, beforeRun, worker }) → { instance, requestRender, destroy }. It owns the fizzy/env imports, plugin loading and input listeners, scoped to the canvas and removed by destroy().

index.html becomes a thin caller, and the global patch goes. The web build should also let an app add wasm exports and its own page (see the build API issue).

Ngôn ngữ chính
Zig
Star
1.5k
Fork
40
Merge trung bình
4 giờ 39 phút
Pull request đã merge (30 ngày)
428

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 fizzyedit/fizzy

Tất cả issue của fizzyedit/fizzy

Issue tương tự

Thêm issue về Web Dev

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.