← All repos

proposal-structs

JavaScript Structs: Fixed Layout Objects

Browse cluster: WebAssembly Specification and Proposals
48commits
6contributors
1languages

Tech stack & purpose

Proposal-structs is a JavaScript language proposal at Stage 2 that introduces fixed-layout objects called structs, along with shared structs for multithreaded access and synchronization primitives. The proposal, authored by Shu-yu Guo with Ron Buckton as co-champion, aims to enable high-performance applications and shared memory multithreading in JavaScript by offering developers an alternative to classes with a higher performance ceiling and better static analyzability. Structs are sealed objects with fixed layouts that cannot be extended, while shared structs are further restricted to allow parallel access across multiple agents without references between shared and non-shared heaps; the proposal also introduces Atomics.Mutex and Atomics.Condition for synchronization, along with new Atomics methods for sequentially consistent field access on shared structs.

Languages

HTML
100.0%

Contributors