Change History

Since the original release 1.0 of the WebAssembly specification, a number of proposals for extensions have been integrated. The following sections provide an overview of what has changed.

Release XX

Threads and Atomics

Added a new concept of shared memory, denoting a memory which can be accessed by multiple host-created threads, and atomic instructions for synchronising shared memory concurrency 1.

Note

The proposal does not add a mechanism for creating threads from within WebAssembly. Thread creation must be handled by the host.

Release 2.0

Sign extension instructions

Added new numeric instructions for performing sign extension within integer representations 2.

Non-trapping float-to-int conversions

Added new conversion instructions that avoid trapping when converting a floating-point number to an integer 3.

Multiple values

Generalized the result type of blocks and functions to allow for multiple values; in addition, introduced the ability to have block parameters 4.

Reference types

Added funcref and externref as new value types and respective instructions 5.

Table instructions

Added instructions to directly access and modify tables 5.

Multiple tables

Added the ability to use multiple tables per module 5.

Bulk memory and table instructions

Added instructions that modify ranges of memory or table entries 5 6

Vector instructions

Added vector type and instructions that manipulate multiple numeric values in parallel (also known as SIMD, single instruction multiple data) 7

  • New value type: v128

  • New memory instructions: v128.load, v128.loadNxM_sx, v128.loadN_zero, v128.loadN_splat, v128.loadN_lane, v128.store, v128.storeN_lane

  • New constant vector instruction: v128.const

  • New unary vector instructions: v128.not, iNxM.abs, iNxM.neg, i8x16.popcnt, fNxM.abs, fNxM.neg, fNxM.sqrt, fNxM.ceil, fNxM.floor, fNxM.trunc, fNxM.nearest

  • New binary vector instructions: v128.and, v128.andnot, v128.or, v128.xor, iNxM.add, iNxM.sub, iNxM.mul, iNxM.add_sat_sx, iNxM.sub_sat_sx, iNxM.min_sx, iNxM.max_sx, iNxM.shl, iNxM.shr_sx, fNxM.add, iNxM.extmul_half_iNxM_sx, i16x8.q15mulr_sat_s, i32x4.dot_i16x8_s, i16x8.extadd_pairwise_i8x16_sx, i32x4.extadd_pairwise_i16x8_sx, i8x16.avgr_u, i16x8.avgr_u, fNxM.sub, fNxM.mul, fNxM.div, fNxM.min, fNxM.max, fNxM.pmin, fNxM.pmax

  • New ternary vector instruction: v128.bitselect

  • New test vector instructions: v128.any_true, iNxM.all_true

  • New relational vector instructions: iNxM.eq, iNxM.ne, iNxM.lt_sx, iNxM.gt_sx, iNxM.le_sx, iNxM.ge_sx, fNxM.eq, fNxM.ne, fNxM.lt, fNxM.gt, fNxM.le, fNxM.ge

  • New conversion vector instructions:i32x4.trunc_sat_f32x4_sx, i32x4.trunc_sat_f64x2_sx_zero, f32x4.convert_i32x4_sx, f32x4.demote_f64x2_zero, f64x2.convert_low_i32x4_sx, f64x2.promote_low_f32x4

  • New lane access vector instructions: iNxM.extract_lane_sx?, iNxM.replace_lane, fNxM.extract_lane, fNxM.replace_lane

  • New lane splitting/combining vector instructions: iNxM.extend_half_iNxM_sx, i8x16.narrow_i16x8_sx, i16x8.narrow_i32x4_sx

  • New byte reordering vector instructions: i8x16.shuffle, i8x16.swizzle

  • New injection/projection vector instructions: iNxM.splat, fNxM.splat, iNxM.bitmask

1

https://github.com/WebAssembly/spec/tree/main/proposals/threads/

2

https://github.com/WebAssembly/spec/tree/main/proposals/sign-extension-ops/

3

https://github.com/WebAssembly/spec/tree/main/proposals/nontrapping-float-to-int-conversion/

4

https://github.com/WebAssembly/spec/tree/main/proposals/multi-value/

5(1,2,3,4)

https://github.com/WebAssembly/spec/tree/main/proposals/reference-types/

6

https://github.com/WebAssembly/spec/tree/main/proposals/bulk-memory-operations/

7

https://github.com/WebAssembly/spec/tree/main/proposals/simd/