js-runtime: add/upstream new js-runtime library inspired by Go's syscall/js package #390
No reviewers
Labels
No labels
CI
all
basisu
blog
bug
build
contributor-friendly
core
correctness
deferred
dev
direct3d-headers
docs
driver-os-issue
duplicate
dxcompiler
editor
examples
experiment
feature-idea
feedback
flac
freetype
gamemode
gkurve
glfw
gpu
gpu-dawn
harfbuzz
help welcome
in-progress
infrastructure
invalid
libmach
linux-audio-headers
long-term
mach
mach.gfx
mach.math
mach.physics
mach.testing
model3d
needs-triage
object
opengl-headers
opus
os/linux
os/macos
os/wasm
os/windows
package-manager
priority
proposal
proposal-accepted
question
roadmap
slipped
stability
sysaudio
sysgpu
sysjs
validating-fix
vulkan-zig-generated
wayland-headers
website
wontfix
wrench
www
x11-headers
xcode-frameworks
zig-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hexops/mach!390
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ay-js-runtime"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstreams js-runtime from https://github.com/iddev5/zig-js-runtime. This module should be considered experimental and its API is not final. It is inspired from Go's syscall/js module. It is not a reimplementation, but rather an independent implementation.
There is also a workaround for a limitation right now. The html-generator has no way to dynamically add JS sources (and that can't be done without using a preprocessor library) so we hardcode js-runtime in it.
In the future, I think the correct behavior would be to move tools/ inside js-runtime along with a wasm application building SDK and get rid of any direct JS access we have today (which is just src/platform/wasm.zig and src/platform/mach.js).
🔥 I'm so excited to start playing with this more
agree