xref: /wasmtime-44.0.1/RELEASES.md (revision 331b0dee)
1# Wasmtime Releases
2
3--------------------------------------------------------------------------------
4
5## Unreleased
6
7## 0.29.0
8
9Released 2021-08-02.
10
11### Changed
12
13* Instance exports are now loaded lazily from instances instead of eagerly as
14  they were before. This is an internal-only change and is not a breaking
15  change.
16  [#2984](https://github.com/bytecodealliance/wasmtime/pull/2984)
17
18* All linear memories created by Wasmtime will now, by default, have guard pages
19  in front of them in addition to after them. This is intended to help mitigate
20  future bugs in Cranelift, should they arise.
21  [#2977](https://github.com/bytecodealliance/wasmtime/pull/2977)
22
23* Linear memories now correctly support a maximum size of 4GB. Previously, the
24  limit field was 32 bits, which did not properly support a full 4GB memory.
25  This update is also a necessary change in preparation for future memory64
26  support.
27  [#3013](https://github.com/bytecodealliance/wasmtime/pull/3013)
28  [#3134](https://github.com/bytecodealliance/wasmtime/pull/3134)
29
30* Injection counts of fuel into a `wasmtime::Store` now uses a u64 instead of a
31  u32.
32  [#3048](https://github.com/bytecodealliance/wasmtime/pull/3048)
33
34### Added
35
36* Support for `i128` has improved in the AArch64 backend.
37  [#2959](https://github.com/bytecodealliance/wasmtime/pull/2959)
38  [#2975](https://github.com/bytecodealliance/wasmtime/pull/2975)
39  [#2985](https://github.com/bytecodealliance/wasmtime/pull/2985)
40  [#2990](https://github.com/bytecodealliance/wasmtime/pull/2990)
41  [#3002](https://github.com/bytecodealliance/wasmtime/pull/3002)
42  [#3004](https://github.com/bytecodealliance/wasmtime/pull/3004)
43  [#3005](https://github.com/bytecodealliance/wasmtime/pull/3005)
44  [#3008](https://github.com/bytecodealliance/wasmtime/pull/3008)
45  [#3027](https://github.com/bytecodealliance/wasmtime/pull/3027)
46
47* The s390x backend now supports z14 and atomics.
48  [#2988](https://github.com/bytecodealliance/wasmtime/pull/2988)
49  [#2991](https://github.com/bytecodealliance/wasmtime/pull/2991)
50
51* The `wasmtime::Linker` type now implements `Clone`.
52  [#2993](https://github.com/bytecodealliance/wasmtime/pull/2993)
53
54* Support for the SIMD proposal on both x86\_64 and AArch64 has improved. On
55  x86\_64, all SIMD opcodes are now supported.
56  [#2997](https://github.com/bytecodealliance/wasmtime/pull/2997)
57  [#3035](https://github.com/bytecodealliance/wasmtime/pull/3035)
58  [#2982](https://github.com/bytecodealliance/wasmtime/pull/2982)
59  [#3084](https://github.com/bytecodealliance/wasmtime/pull/3084)
60  [#3082](https://github.com/bytecodealliance/wasmtime/pull/3082)
61  [#3107](https://github.com/bytecodealliance/wasmtime/pull/3107)
62  [#3105](https://github.com/bytecodealliance/wasmtime/pull/3105)
63  [#3114](https://github.com/bytecodealliance/wasmtime/pull/3114)
64  [#3070](https://github.com/bytecodealliance/wasmtime/pull/3070)
65  [#3126](https://github.com/bytecodealliance/wasmtime/pull/3126)
66
67* A `Trap` can now display its reason without also displaying the backtrace.
68  [#3033](https://github.com/bytecodealliance/wasmtime/pull/3033)
69
70* An initiall fuzzer for CLIF has been added.
71  [#3038](https://github.com/bytecodealliance/wasmtime/pull/3038)
72
73* High-level architecture documentation has been added for Wasmtime.
74  [#3019](https://github.com/bytecodealliance/wasmtime/pull/3019)
75
76* Support for multi-memory can now be configured in Wasmtime's C API.
77  [#3071](https://github.com/bytecodealliance/wasmtime/pull/3071)
78
79* The `wasmtime` crate now supports a `posix-signals-on-macos` feature to force
80  the usage of signals instead of mach ports to handle traps on macOS.
81  [#3063](https://github.com/bytecodealliance/wasmtime/pull/3063)
82
83* Wasmtime's C API now has a `wasmtime_trap_code` function to get the raw trap
84  code, if present, for a trap.
85  [#3086](https://github.com/bytecodealliance/wasmtime/pull/3086)
86
87* Wasmtime's C API now has a `wasmtime_linker_define_func` function to define a
88  store-independent function within a linker.
89  [#3122](https://github.com/bytecodealliance/wasmtime/pull/3122)
90
91* A `wasmtime::Linker::module_async` function was added as the asynchronous
92  counterpart to `wasmtime::Linker::module`.
93  [#3121](https://github.com/bytecodealliance/wasmtime/pull/3121)
94
95### Fixed
96
97* Compiling the `wasmtime` crate into a `dylib` crate type has been fixed.
98  [#3010](https://github.com/bytecodealliance/wasmtime/pull/3010)
99
100* The enter/exit hooks for WebAssembly are now executed for an instance's
101  `start` function, if present.
102  [#3001](https://github.com/bytecodealliance/wasmtime/pull/3001)
103
104* Some WASI functions in `wasi-common` have been fixed for big-endian platforms.
105  [#3016](https://github.com/bytecodealliance/wasmtime/pull/3016)
106
107* Wasmtime no longer erroneously assumes that all custom sections may contain
108  DWARF information, reducing instances of `Trap`'s `Display` implementation
109  providing misleading information to set an env var to get more information.
110  [#3083](https://github.com/bytecodealliance/wasmtime/pull/3083)
111
112* Some issues with parsing DWARF debug information have been fixed.
113  [#3116](https://github.com/bytecodealliance/wasmtime/pull/3116)
114
115## 0.28.0
116
117Released 2021-06-09.
118
119### Changed
120
121* Breaking: Wasmtime's embedding API has been redesigned, as specified in [RFC
122  11]. Rust users can now enjoy easier times with `Send` and `Sync`, and all
123  users can now more clearly manage memory, especially in the C API. Language
124  embeddings have been updated to the new API as well.
125  [#2897](https://github.com/bytecodealliance/wasmtime/pull/2897)
126
127[RFC 11]: https://github.com/bytecodealliance/rfcs/pull/11
128
129### Added
130
131* A new `InstancePre` type, created with `Linker::instantiate_pre`, has been
132  added to perform type-checking of an instance once and reduce the work done
133  for each instantiation of a module:
134  [#2962](https://github.com/bytecodealliance/wasmtime/pull/2962)
135
136* Deserialization of a module can now optionally skip checking the wasmtime
137  version string:
138  [#2945](https://github.com/bytecodealliance/wasmtime/pull/2945)
139
140* A method has been exposed to frontload per-thread initialization costs if the
141  latency of every last wasm call is important:
142  [#2946](https://github.com/bytecodealliance/wasmtime/pull/2946)
143
144* Hooks have been added for entry/exit into wasm code to allow embeddings to
145  track time and other properties about execution in a wasm environment:
146  [#2952](https://github.com/bytecodealliance/wasmtime/pull/2952)
147
148* A [C++ embedding of Wasmtime has been written][cpp].
149
150[RFC 11]: https://github.com/bytecodealliance/rfcs/pull/11
151[cpp]: https://github.com/bytecodealliance/wasmtime-cpp
152
153### Fixed
154
155* Multiple returns on macOS AArch64 have been fixed:
156  [#2956](https://github.com/bytecodealliance/wasmtime/pull/2956)
157
158## 0.27.0
159
160Released 2021-05-21.
161
162### Security Fixes
163
164* Fixed a security issue in Cranelift's x64 backend that could result in a heap
165  sandbox escape due to an incorrect sign-extension:
166  [#2913](https://github.com/bytecodealliance/wasmtime/issues/2913).
167
168### Added
169
170* Support for IBM z/Archiecture (`s390x`) machines in Cranelift and Wasmtime:
171  [#2836](https://github.com/bytecodealliance/wasmtime/pull/2836),
172  [#2837](https://github.com/bytecodealliance/wasmtime/pull/2837),
173  [#2838](https://github.com/bytecodealliance/wasmtime/pull/2838),
174  [#2843](https://github.com/bytecodealliance/wasmtime/pull/2843),
175  [#2854](https://github.com/bytecodealliance/wasmtime/pull/2854),
176  [#2870](https://github.com/bytecodealliance/wasmtime/pull/2870),
177  [#2871](https://github.com/bytecodealliance/wasmtime/pull/2871),
178  [#2872](https://github.com/bytecodealliance/wasmtime/pull/2872),
179  [#2874](https://github.com/bytecodealliance/wasmtime/pull/2874).
180
181* Improved async support in wasi-common runtime:
182  [#2832](https://github.com/bytecodealliance/wasmtime/pull/2832).
183
184* Added `Store::with_limits`, `StoreLimits`, and `ResourceLimiter` to the
185  Wasmtime API to help with enforcing resource limits at runtime. The
186  `ResourceLimiter` trait can be implemented by custom resource limiters to
187  decide if linear memories or tables can be grown.
188
189* Added `allow-unknown-exports` option for the run command:
190  [#2879](https://github.com/bytecodealliance/wasmtime/pull/2879).
191
192* Added API to notify that a `Store` has moved to a new thread:
193  [#2822](https://github.com/bytecodealliance/wasmtime/pull/2822).
194
195* Documented guidance around using Wasmtime in multithreaded contexts:
196  [#2812](https://github.com/bytecodealliance/wasmtime/pull/2812).
197  In the future, the Wasmtime API will change to allow some of its core types
198  to be Send/Sync; see the in-progress
199  [#2897](https://github.com/bytecodealliance/wasmtime/pull/2897) for details.
200
201* Support calls from native code to multiple-return-value functions:
202  [#2806](https://github.com/bytecodealliance/wasmtime/pull/2806).
203
204### Changed
205
206* Breaking: `Memory::new` has been changed to return `Result` as creating a
207  host memory object is now a fallible operation when the initial size of
208  the memory exceeds the store limits.
209
210### Fixed
211
212* Many instruction selection improvements on x64 and aarch64:
213  [#2819](https://github.com/bytecodealliance/wasmtime/pull/2819),
214  [#2828](https://github.com/bytecodealliance/wasmtime/pull/2828),
215  [#2823](https://github.com/bytecodealliance/wasmtime/pull/2823),
216  [#2862](https://github.com/bytecodealliance/wasmtime/pull/2862),
217  [#2886](https://github.com/bytecodealliance/wasmtime/pull/2886),
218  [#2889](https://github.com/bytecodealliance/wasmtime/pull/2889),
219  [#2905](https://github.com/bytecodealliance/wasmtime/pull/2905).
220
221* Improved performance of Wasmtime runtime substantially:
222  [#2811](https://github.com/bytecodealliance/wasmtime/pull/2811),
223  [#2818](https://github.com/bytecodealliance/wasmtime/pull/2818),
224  [#2821](https://github.com/bytecodealliance/wasmtime/pull/2821),
225  [#2847](https://github.com/bytecodealliance/wasmtime/pull/2847),
226  [#2900](https://github.com/bytecodealliance/wasmtime/pull/2900).
227
228* Fixed WASI issue with file metadata on Windows:
229  [#2884](https://github.com/bytecodealliance/wasmtime/pull/2884).
230
231* Fixed an issue with debug info and an underflowing (trapping) offset:
232  [#2866](https://github.com/bytecodealliance/wasmtime/pull/2866).
233
234* Fixed an issue with unwind information in the old x86 backend:
235  [#2845](https://github.com/bytecodealliance/wasmtime/pull/2845).
236
237* Fixed i32 spilling in x64 backend:
238  [#2840](https://github.com/bytecodealliance/wasmtime/pull/2840).
239
240## 0.26.0
241
242Released 2021-04-05.
243
244### Added
245
246* Added the `wasmtime compile` command to support AOT compilation of Wasm
247  modules. This adds the `Engine::precompile_module` method. Also added the
248  `Config::target` method to change the compilation target of the
249  configuration. This can be used in conjunction with
250  `Engine::precompile_module` to target a different host triple than the
251  current one.
252  [#2791](https://github.com/bytecodealliance/wasmtime/pull/2791)
253
254* Support for macOS on aarch64 (Apple M1 Silicon), including Apple-specific
255  calling convention details and unwinding/exception handling using Mach ports.
256  [#2742](https://github.com/bytecodealliance/wasmtime/pull/2742),
257  [#2723](https://github.com/bytecodealliance/wasmtime/pull/2723)
258
259* A number of SIMD instruction implementations in the new x86-64 backend.
260  [#2771](https://github.com/bytecodealliance/wasmtime/pull/2771)
261
262* Added the `Config::cranelift_flag_enable` method to enable setting Cranelift
263  boolean flags or presets in a config.
264
265* Added CLI option `--cranelift-enable` to enable boolean settings and ISA presets.
266
267* Deduplicate function signatures in Wasm modules.
268  [#2772](https://github.com/bytecodealliance/wasmtime/pull/2772)
269
270* Optimize overheads of calling into Wasm functions.
271  [#2757](https://github.com/bytecodealliance/wasmtime/pull/2757),
272  [#2759](https://github.com/bytecodealliance/wasmtime/pull/2759)
273
274* Improvements related to Module Linking: compile fewer trampolines;
275
276  [#2774](https://github.com/bytecodealliance/wasmtime/pull/2774)
277
278* Re-export sibling crates from `wasmtime-wasi` to make embedding easier
279  without needing to match crate versions.
280  [#2776](https://github.com/bytecodealliance/wasmtime/pull/2776)
281
282### Changed
283
284* Switched the default compiler backend on x86-64 to Cranelift's new backend.
285  This should not have any user-visible effects other than possibly runtime
286  performance improvements. The old backend is still available with the
287  `old-x86-backend` feature flag to the `cranelift-codegen` or `wasmtime`
288  crates, or programmatically with `BackendVariant::Legacy`. We plan to
289  maintain the old backend for at least one more release and ensure it works on
290  CI.
291  [#2718](https://github.com/bytecodealliance/wasmtime/pull/2718)
292
293* Breaking: `Module::deserialize` has been removed in favor of `Module::new`.
294
295* Breaking: `Config::cranelift_clear_cpu_flags` was removed. Use `Config::target`
296  to clear the CPU flags for the host's target.
297
298* Breaking: `Config::cranelift_other_flag` was renamed to `Config::cranelift_flag_set`.
299
300* CLI changes:
301  * Wasmtime CLI options to enable WebAssembly features have been replaced with
302    a singular `--wasm-features` option. The previous options are still
303    supported, but are not displayed in help text.
304  * Breaking: the CLI option `--cranelift-flags` was changed to
305    `--cranelift-set`.
306  * Breaking: the CLI option `--enable-reference-types=false` has been changed
307    to `--wasm-features=-reference-types`.
308  * Breaking: the CLI option `--enable-multi-value=false` has been changed to
309    `--wasm-features=-multi-value`.
310  * Breaking: the CLI option `--enable-bulk-memory=false` has been changed to
311    `--wasm-features=-bulk-memory`.
312
313* Improved error-reporting in wiggle.
314  [#2760](https://github.com/bytecodealliance/wasmtime/pull/2760)
315
316* Make WASI sleeping fallible (some systems do not support sleep).
317  [#2756](https://github.com/bytecodealliance/wasmtime/pull/2756)
318
319* WASI: Support `poll_oneoff` with a sleep.
320  [#2753](https://github.com/bytecodealliance/wasmtime/pull/2753)
321
322* Allow a `StackMapSink` to be passed when defining functions with
323  `cranelift-module`.
324  [#2739](https://github.com/bytecodealliance/wasmtime/pull/2739)
325
326* Some refactoring in new x86-64 backend to prepare for VEX/EVEX (e.g.,
327  AVX-512) instruction encodings to be supported.
328  [#2799](https://github.com/bytecodealliance/wasmtime/pull/2799)
329
330### Fixed
331
332* Fixed a corner case in `srem` (signed remainder) in the new x86-64 backend:
333  `INT_MIN % -1` should return `0`, rather than trapping. This only occurred
334  when `avoid_div_traps == false` was set by the embedding.
335  [#2763](https://github.com/bytecodealliance/wasmtime/pull/2763)
336
337* Fixed a memory leak of the `Store` when an instance traps.
338  [#2803](https://github.com/bytecodealliance/wasmtime/pull/2803)
339
340* Some fuzzing-related fixes.
341  [#2788](https://github.com/bytecodealliance/wasmtime/pull/2788),
342  [#2770](https://github.com/bytecodealliance/wasmtime/pull/2770)
343
344* Fixed memory-initialization bug in uffd allocator that could copy into the
345  wrong destination under certain conditions. Does not affect the default
346  wasmtime instance allocator.
347  [#2801](https://github.com/bytecodealliance/wasmtime/pull/2801)
348
349* Fix printing of float values from the Wasmtime CLI.
350  [#2797](https://github.com/bytecodealliance/wasmtime/pull/2797)
351
352* Remove the ability for the `Linker` to instantiate modules with duplicate
353  import strings of different types.
354  [#2789](https://github.com/bytecodealliance/wasmtime/pull/2789)
355
356## 0.25.0
357
358Released 2021-03-16.
359
360### Added
361
362* An implementation of a pooling instance allocator, optionally backed by
363  `userfaultfd` on Linux, was added to improve the performance of embeddings
364  that instantiate a large number of instances continuously.
365  [#2518](https://github.com/bytecodealliance/wasmtime/pull/2518)
366
367* Host functions can now be defined on `Config` to share the function across all
368  `Store` objects connected to an `Engine`. This can improve the time it takes
369  to instantiate instances in a short-lived `Store`.
370  [#2625](https://github.com/bytecodealliance/wasmtime/pull/2625)
371
372* The `Store` object now supports having typed values attached to it which can
373  be retrieved from host functions.
374  [#2625](https://github.com/bytecodealliance/wasmtime/pull/2625)
375
376* The `wiggle` code generator now supports `async` host functions.
377  [#2701](https://github.com/bytecodealliance/wasmtime/pull/2701)
378
379### Changed
380
381* The `Func::getN{,_async}` APIs have all been removed in favor of a new
382  `Func::typed` API which should be more compact in terms of API surface area as
383  well as more flexible in how it can be used.
384  [#2719](https://github.com/bytecodealliance/wasmtime/pull/2719)
385
386* `Engine::new` has been changed from returning `Engine` to returning
387  `anyhow::Result<Engine>`. Callers of `Engine::new` will need to be updated to
388  use the `?` operator on the return value or otherwise unwrap the result to get
389  the `Engine`.
390
391### Fixed
392
393* Interpretation of timestamps in `poll_oneoff` for WASI have been fixed to
394  correctly use nanoseconds instead of microseconds.
395  [#2717](https://github.com/bytecodealliance/wasmtime/pull/2717)
396
397## 0.24.0
398
399Released 2021-03-04.
400
401### Added
402
403* Implement support for `async` functions in Wasmtime
404  [#2434](https://github.com/bytecodealliance/wasmtime/pull/2434)
405
406### Fixed
407
408* Fix preservation of the sigaltstack on macOS
409  [#2676](https://github.com/bytecodealliance/wasmtime/pull/2676)
410* Fix incorrect semver dependencies involving fs-set-times.
411  [#2705](https://github.com/bytecodealliance/wasmtime/pull/2705)
412* Fix some `i128` shift-related bugs in x64 backend.
413  [#2682](https://github.com/bytecodealliance/wasmtime/pull/2682)
414* Fix incomplete trap metadata due to multiple traps at one address
415  [#2685](https://github.com/bytecodealliance/wasmtime/pull/2685)
416
417## 0.23.0
418
419Released 2021-02-16.
420
421### Added
422
423* Support for limiting WebAssembly execution with fuel was added, including
424  support in the C API.
425  [#2611](https://github.com/bytecodealliance/wasmtime/pull/2611)
426  [#2643](https://github.com/bytecodealliance/wasmtime/pull/2643)
427* Wasmtime now has more knobs for limiting memory and table allocations
428  [#2617](https://github.com/bytecodealliance/wasmtime/pull/2617)
429* Added a method to share `Config` across machines
430  [#2608](https://github.com/bytecodealliance/wasmtime/pull/2608)
431* Added a safe memory read/write API
432  [#2528](https://github.com/bytecodealliance/wasmtime/pull/2528)
433* Added support for the experimental wasi-crypto APIs
434  [#2597](https://github.com/bytecodealliance/wasmtime/pull/2597)
435* Added an instance limit to `Config`
436  [#2593](https://github.com/bytecodealliance/wasmtime/pull/2593)
437* Implemented module-linking's outer module aliases
438  [#2590](https://github.com/bytecodealliance/wasmtime/pull/2590)
439* Cranelift now supports 128-bit operations for the new x64 backend.
440  [#2539](https://github.com/bytecodealliance/wasmtime/pull/2539)
441* Cranelift now has detailed debug-info (DWARF) support in new backends (initially x64).
442  [#2565](https://github.com/bytecodealliance/wasmtime/pull/2565)
443* Cranelift now uses the `POPCNT`, `TZCNT`, and `LZCNT`, as well as SSE 4.1
444  rounding instructions on x64 when available.
445* Cranelift now uses the `CNT`, instruction on aarch64 when available.
446
447### Changed
448
449* A new WASI implementation built on the new
450  [`cap-std`](https://github.com/bytecodealliance/cap-std) crate was added,
451  replacing the previous implementation. This brings improved robustness,
452  portability, and performance.
453
454* `wasmtime_wasi::WasiCtxBuilder` moved to
455  `wasi_cap_std_sync::WasiCtxBuilder`.
456
457* The WebAssembly C API is updated, with a few minor API changes
458  [#2579](https://github.com/bytecodealliance/wasmtime/pull/2579)
459
460### Fixed
461
462* Fixed a panic in WASI `fd_readdir` on large directories
463  [#2620](https://github.com/bytecodealliance/wasmtime/pull/2620)
464* Fixed a memory leak with command modules
465  [#2017](https://github.com/bytecodealliance/wasmtime/pull/2017)
466
467--------------------------------------------------------------------------------
468
469## 0.22.0
470
471Released 2021-01-07.
472
473### Added
474
475* Experimental support for [the module-linking
476  proposal](https://github.com/WebAssembly/module-linking) was
477  added. [#2094](https://github.com/bytecodealliance/wasmtime/pull/2094)
478
479* Added support for [the reference types
480  proposal](https://webassembly.github.io/reference-types) on the aarch64
481  architecture. [#2410](https://github.com/bytecodealliance/wasmtime/pull/2410)
482
483* Experimental support for [wasi-nn](https://github.com/WebAssembly/wasi-nn) was
484  added. [#2208](https://github.com/bytecodealliance/wasmtime/pull/2208)
485
486### Changed
487
488### Fixed
489
490* Fixed an issue where the `select` instruction didn't accept `v128` SIMD
491  operands. [#2391](https://github.com/bytecodealliance/wasmtime/pull/2391)
492
493* Fixed an issue where Wasmtime could potentially use the wrong stack map during
494  GCs, leading to a
495  panic. [#2396](https://github.com/bytecodealliance/wasmtime/pull/2396)
496
497* Fixed an issue where if a host-defined function erroneously returned a value
498  from a different store, that value would be
499  leaked. [#2424](https://github.com/bytecodealliance/wasmtime/pull/2424)
500
501* Fixed a bug where in certain cases if a module's instantiation failed, it
502  could leave trampolines in the store that referenced the no-longer-valid
503  instance. These trampolines could be reused in future instantiations, leading
504  to use after free bugs.
505  [#2408](https://github.com/bytecodealliance/wasmtime/pull/2408)
506
507* Fixed a miscompilation on aarch64 where certain instructions would read `SP`
508  instead of the zero register. This could only affect you if you explicitly
509  enabled the Wasm SIMD
510  proposal. [#2548](https://github.com/bytecodealliance/wasmtime/pull/2548)
511
512--------------------------------------------------------------------------------
513
514## 0.21.0
515
516Released 2020-11-05.
517
518### Added
519
520* Experimental support for the multi-memory proposal was added.
521  [#2263](https://github.com/bytecodealliance/wasmtime/pull/2263)
522
523* The `Trap::trap_code` API enables learning what kind of trap was raised.
524  [#2309](https://github.com/bytecodealliance/wasmtime/pull/2309)
525
526### Changed
527
528* WebAssembly module validation is now parallelized.
529  [#2059](https://github.com/bytecodealliance/wasmtime/pull/2059)
530
531* Documentation is now available at docs.wasmtime.dev.
532  [#2317](https://github.com/bytecodealliance/wasmtime/pull/2317)
533
534* Windows now compiles like other platforms with a huge guard page instead of
535  having its own custom limit which made modules compile and run more slowly.
536  [#2326](https://github.com/bytecodealliance/wasmtime/pull/2326)
537
538* The size of the cache entry for serialized modules has been greatly reduced.
539  [#2321](https://github.com/bytecodealliance/wasmtime/pull/2321)
540  [#2322](https://github.com/bytecodealliance/wasmtime/pull/2322)
541  [#2324](https://github.com/bytecodealliance/wasmtime/pull/2324)
542  [#2325](https://github.com/bytecodealliance/wasmtime/pull/2325)
543
544* The `FuncType` API constructor and accessors are now iterator-based.
545  [#2365](https://github.com/bytecodealliance/wasmtime/pull/2365)
546
547### Fixed
548
549* A panic in compiling reference-types-using modules has been fixed.
550  [#2350](https://github.com/bytecodealliance/wasmtime/pull/2350)
551
552--------------------------------------------------------------------------------
553
554## 0.20.0
555
556Released 2020-09-23.
557
558### Added
559
560* Support for explicitly serializing and deserializing compiled wasm modules has
561  been added.
562  [#2020](https://github.com/bytecodealliance/wasmtime/pull/2020)
563
564* A `wasmtime_store_gc` C API was added to run GC for `externref`.
565  [#2052](https://github.com/bytecodealliance/wasmtime/pull/2052)
566
567* Support for atomics in Cranelift has been added. Support is not fully
568  implemented in Wasmtime at this time, however.
569  [#2077](https://github.com/bytecodealliance/wasmtime/pull/2077)
570
571* The `Caller::get_export` function is now implemented for `Func` references as
572  well.
573  [#2108](https://github.com/bytecodealliance/wasmtime/pull/2108)
574
575### Fixed
576
577* Leaks in the C API have been fixed.
578  [#2040](https://github.com/bytecodealliance/wasmtime/pull/2040)
579
580* The `wasm_val_copy` C API has been fixed for reference types.
581  [#2041](https://github.com/bytecodealliance/wasmtime/pull/2041)
582
583* Fix a panic with `Func::new` and reference types when the store doesn't have
584  reference types enabled.
585  [#2039](https://github.com/bytecodealliance/wasmtime/pull/2039)
586
587--------------------------------------------------------------------------------
588
589## 0.19.0
590
591Released 2020-07-14.
592
593### Added
594
595* The [WebAssembly reference-types proposal][reftypes] is now supported in
596  Wasmtime and the C API.
597  [#1832](https://github.com/bytecodealliance/wasmtime/pull/1832),
598  [#1882](https://github.com/bytecodealliance/wasmtime/pull/1882),
599  [#1894](https://github.com/bytecodealliance/wasmtime/pull/1894),
600  [#1901](https://github.com/bytecodealliance/wasmtime/pull/1901),
601  [#1923](https://github.com/bytecodealliance/wasmtime/pull/1923),
602  [#1969](https://github.com/bytecodealliance/wasmtime/pull/1969),
603  [#1973](https://github.com/bytecodealliance/wasmtime/pull/1973),
604  [#1982](https://github.com/bytecodealliance/wasmtime/pull/1982),
605  [#1984](https://github.com/bytecodealliance/wasmtime/pull/1984),
606  [#1991](https://github.com/bytecodealliance/wasmtime/pull/1991),
607  [#1996](https://github.com/bytecodealliance/wasmtime/pull/1996)
608
609* The [WebAssembly simd proposal's][simd] spec tests now pass in Wasmtime.
610  [#1765](https://github.com/bytecodealliance/wasmtime/pull/1765),
611  [#1876](https://github.com/bytecodealliance/wasmtime/pull/1876),
612  [#1941](https://github.com/bytecodealliance/wasmtime/pull/1941),
613  [#1957](https://github.com/bytecodealliance/wasmtime/pull/1957),
614  [#1990](https://github.com/bytecodealliance/wasmtime/pull/1990),
615  [#1994](https://github.com/bytecodealliance/wasmtime/pull/1994)
616
617* Wasmtime can now be compiled without the usage of threads for parallel
618  compilation, although this is still enabled by default.
619  [#1903](https://github.com/bytecodealliance/wasmtime/pull/1903)
620
621* The C API is [now
622  documented](https://bytecodealliance.github.io/wasmtime/c-api/).
623  [#1928](https://github.com/bytecodealliance/wasmtime/pull/1928),
624  [#1959](https://github.com/bytecodealliance/wasmtime/pull/1959),
625  [#1968](https://github.com/bytecodealliance/wasmtime/pull/1968)
626
627* A `wasmtime_linker_get_one_by_name` function was added to the C API.
628  [#1897](https://github.com/bytecodealliance/wasmtime/pull/1897)
629
630* A `wasmtime_trap_exit_status` function was added to the C API.
631  [#1912](https://github.com/bytecodealliance/wasmtime/pull/1912)
632
633* Compilation for the `aarch64-linux-android` target should now work, although
634  keep in mind this platform is not fully tested still.
635  [#2002](https://github.com/bytecodealliance/wasmtime/pull/2002)
636
637[reftypes]: https://github.com/WebAssembly/reference-types
638
639### Fixed
640
641* Runtime warnings when using Wasmtime on musl have been fixed.
642  [#1914](https://github.com/bytecodealliance/wasmtime/pull/1914)
643
644* A bug affecting Windows unwind information with functions that have spilled
645  floating point registers has been fixed.
646  [#1983](https://github.com/bytecodealliance/wasmtime/pull/1983)
647
648### Changed
649
650* Wasmtime's default branch and development now happens on the `main` branch
651  instead of `master`.
652  [#1924](https://github.com/bytecodealliance/wasmtime/pull/1924)
653
654### Removed
655
656* The "host info" support in the C API has been removed since it was never fully
657  or correctly implemented.
658  [#1922](https://github.com/bytecodealliance/wasmtime/pull/1922)
659
660* Support for the `*_same` functions in the C API has been removed in the same
661  vein as the host info APIs.
662  [#1926](https://github.com/bytecodealliance/wasmtime/pull/1926)
663
664--------------------------------------------------------------------------------
665
666## 0.18.0
667
668Release 2020-06-09.
669
670### Added
671
672The `WasmTy` trait is now implemented for `u32` and `u64`.
673
674  [#1808](https://github.com/bytecodealliance/wasmtime/pull/1808)
675
676--------------------------------------------------------------------------------
677
678## 0.17.0
679
680Released 2020-06-01.
681
682### Added
683
684* The [Commands and Reactors ABI] is now supported in the Rust API. `Linker::module`
685  loads a module and automatically handles Commands and Reactors semantics.
686
687  [#1565](https://github.com/bytecodealliance/wasmtime/pull/1565)
688
689[Commands and Reactors ABI]: https://github.com/WebAssembly/WASI/blob/master/design/application-abi.md#current-unstable-abi
690
691The `Table::grow` function now returns the previous table size, making it consistent
692with the `table.grow` instruction.
693
694  [#1653](https://github.com/bytecodealliance/wasmtime/pull/1653)
695
696New Wasmtime-specific C APIs for working with tables were added which provide more
697detailed error information and which make growing a table more consistent with the
698`table.grow` instruction as well.
699
700  [#1654](https://github.com/bytecodealliance/wasmtime/pull/1654)
701
702The C API now includes support for enabling logging in Wasmtime.
703
704  [#1737](https://github.com/bytecodealliance/wasmtime/pull/1737)
705
706### Changed
707
708The WASI `proc_exit` function no longer exits the host process. It now unwinds the
709callstack back to the wasm entrypoint, and the exit value is available from the
710`Trap::i32_exit_status` method.
711
712  [#1646](https://github.com/bytecodealliance/wasmtime/pull/1646)
713
714The WebAssembly [multi-value](https://github.com/WebAssembly/multi-value/) proposal
715is now enabled by default.
716
717  [#1667](https://github.com/bytecodealliance/wasmtime/pull/1667)
718
719The Rust API does not require a store provided during `Module::new` operation. The `Module` can be send accross threads and instantiate for a specific store. The `Instance::new` now requires the store.
720
721  [#1761](https://github.com/bytecodealliance/wasmtime/pull/1761)
722
723--------------------------------------------------------------------------------
724
725## 0.16.0
726
727Released 2020-04-29.
728
729### Added
730
731* The `Instance` struct has new accessors, `get_func`, `get_table`,
732  `get_memory`, and `get_global` for quickly looking up exported
733  functions, tables, memories, and globals by name.
734  [#1524](https://github.com/bytecodealliance/wasmtime/pull/1524)
735
736* The C API has a number of new `wasmtime_*` functions which return error
737  objects to get detailed error information when an API fails.
738  [#1467](https://github.com/bytecodealliance/wasmtime/pull/1467)
739
740* Users now have fine-grained control over creation of instances of `Memory`
741  with a new `MemoryCreator` trait.
742  [#1400](https://github.com/bytecodealliance/wasmtime/pull/1400)
743
744* Go bindings for Wasmtime are [now available][go-bindings].
745  [#1481](https://github.com/bytecodealliance/wasmtime/pull/1481)
746
747* APIs for looking up values in a `Linker` have been added.
748  [#1480](https://github.com/bytecodealliance/wasmtime/pull/1480)
749
750* Preliminary support for AArch64, also known as ARM64.
751  [#1581](https://github.com/bytecodealliance/wasmtime/pull/1581)
752
753[go-bindings]: https://github.com/bytecodealliance/wasmtime-go
754
755### Changed
756
757* `Instance::exports` now returns `Export` objects which contain
758  the `name`s of the exports in addition to their `Extern` definitions,
759  so it's no longer necessary to use `Module::exports` to obtain the
760  export names.
761  [#1524](https://github.com/bytecodealliance/wasmtime/pull/1524)
762
763* The `Func::call` API has changed its error type from `Trap` to `anyhow::Error`
764  to distinguish between wasm traps and runtime violations (like the wrong
765  number of parameters).
766  [#1467](https://github.com/bytecodealliance/wasmtime/pull/1467)
767
768* A number of `wasmtime_linker_*` and `wasmtime_config_*` C APIs have new type
769  signatures which reflect returning errors.
770  [#1467](https://github.com/bytecodealliance/wasmtime/pull/1467)
771
772* Bindings for .NET have moved to
773  https://github.com/bytecodealliance/wasmtime-dotnet.
774  [#1477](https://github.com/bytecodealliance/wasmtime/pull/1477)
775
776* Passing too many imports to `Instance::new` is now considered an error.
777  [#1478](https://github.com/bytecodealliance/wasmtime/pull/1478)
778
779### Fixed
780
781* Spurious segfaults due to out-of-stack conditions when handling signals have
782  been fixed.
783  [#1315](https://github.com/bytecodealliance/wasmtime/pull/1315)
784
785--------------------------------------------------------------------------------
786
787## 0.15.0
788
789Released 2020-03-31.
790
791### Fixed
792
793Full release produced for all artifacts to account for hiccups in 0.13.0 and
7940.14.0.
795
796--------------------------------------------------------------------------------
797
798## 0.14.0
799
800*This version ended up not getting a full release*
801
802### Fixed
803
804Fix build errors in wasi-common on Windows.
805
806--------------------------------------------------------------------------------
807
808## 0.13.0
809
810Released 2020-03-24.
811
812### Added
813
814* Lots of documentation of `wasmtime` has been updated. Be sure to check out the
815  [book](https://bytecodealliance.github.io/wasmtime/) and [API
816  documentation](https://bytecodealliance.github.io/wasmtime/api/wasmtime/)!
817
818* All wasmtime example programs are now in a top-level `examples` directory and
819  are available in both C and Rust.
820  [#1286](https://github.com/bytecodealliance/wasmtime/pull/1286)
821
822* A `wasmtime::Linker` type was added to conveniently link link wasm modules
823  together and create instances that reference one another.
824  [#1384](https://github.com/bytecodealliance/wasmtime/pull/1384)
825
826* Wasmtime now has "jitdump" support enabled by default which allows [profiling
827  wasm code on linux][jitdump].
828  [#1310](https://github.com/bytecodealliance/wasmtime/pull/1310)
829
830* The `wasmtime::Caller` type now exists as a first-class way to access the
831  caller's exports, namely memory, when implementing host APIs. This can be the
832  first argument of functions defined with `Func::new` or `Func::wrap` which
833  allows easily implementing methods which take a pointer into wasm memory. Note
834  that this only works for accessing the caller's `Memory` for now and it must
835  be exported. This will eventually be replaced with a more general-purpose
836  mechanism like interface types.
837  [#1290](https://github.com/bytecodealliance/wasmtime/pull/1290)
838
839* The bulk memory proposal has been fully implemented.
840  [#1264](https://github.com/bytecodealliance/wasmtime/pull/1264)
841  [#976](https://github.com/bytecodealliance/wasmtime/pull/976)
842
843* Virtual file support has been added to `wasi-common`.
844  [#701](https://github.com/bytecodealliance/wasmtime/pull/701)
845
846* The C API has been enhanced with a Wasmtime-specific `wasmtime_wat2wasm` to
847  parse `*.wat` files via the C API.
848  [#1206](https://github.com/bytecodealliance/wasmtime/pull/1206)
849
850[jitdump]: https://bytecodealliance.github.io/wasmtime/examples-profiling.html
851
852### Changed
853
854* The `wast` and `wasm2obj` standalone binaries have been removed. They're
855  available via the `wasmtime wast` and `wasmtime wasm2obj` subcommands.
856  [#1372](https://github.com/bytecodealliance/wasmtime/pull/1372)
857
858* The `wasi-common` crate now uses the new `wiggle` crate to auto-generate a
859  trait which is implemented for the current wasi snapshot.
860  [#1202](https://github.com/bytecodealliance/wasmtime/pull/1202)
861
862* Wasmtime no longer has a dependency on a C++ compiler.
863  [#1365](https://github.com/bytecodealliance/wasmtime/pull/1365)
864
865* The `Func::wrapN` APIs have been consolidated into one `Func::wrap` API.
866  [#1363](https://github.com/bytecodealliance/wasmtime/pull/1363)
867
868* The `Callable` trait has been removed and now `Func::new` takes a closure
869  directly.
870  [#1363](https://github.com/bytecodealliance/wasmtime/pull/1363)
871
872* The Cranelift repository has been merged into the Wasmtime repository.
873
874* Support for interface types has been temporarily removed.
875  [#1292](https://github.com/bytecodealliance/wasmtime/pull/1292)
876
877* The exit code of the `wasmtime` CLI has changed if the program traps.
878  [#1274](https://github.com/bytecodealliance/wasmtime/pull/1274)
879
880* The `wasmtime` CLI now logs to stderr by default and the `-d` flag has been
881  renamed to `--log-to-file`.
882  [#1266](https://github.com/bytecodealliance/wasmtime/pull/1266)
883
884* Values cannot cross `Store` objects, meaning you can't instantiate a module
885  with values from different stores nor pass values from different stores into
886  methods.
887  [#1016](https://github.com/bytecodealliance/wasmtime/pull/1016)
888
889--------------------------------------------------------------------------------
890
891## 0.12.0
892
893Released 2020-02-26.
894
895### Added
896
897* Support for the [WebAssembly text annotations proposal][annotations-proposal]
898  has been added.
899  [#998](https://github.com/bytecodealliance/wasmtime/pull/998)
900
901* An initial C API for instantiating WASI modules has been added.
902  [#977](https://github.com/bytecodealliance/wasmtime/pull/977)
903
904* A new suite of `Func::getN` functions have been added to the `wasmtime` API to
905  call statically-known function signatures in a highly optimized fashion.
906  [#955](https://github.com/bytecodealliance/wasmtime/pull/955)
907
908* Initial support for profiling JIT code through perf jitdump has been added.
909  [#360](https://github.com/bytecodealliance/wasmtime/pull/360)
910
911* More CLI flags corresponding to proposed WebAssembly features have been added.
912  [#917](https://github.com/bytecodealliance/wasmtime/pull/917)
913
914[annotations-proposal]: https://github.com/webassembly/annotations
915
916### Changed
917
918* The `wasmtime` CLI as well as embedding API will optimize WebAssembly code by
919  default now.
920  [#973](https://github.com/bytecodealliance/wasmtime/pull/973)
921  [#988](https://github.com/bytecodealliance/wasmtime/pull/988)
922
923* The `verifier` pass in Cranelift is now no longer run by default when using
924  the embedding API.
925  [#882](https://github.com/bytecodealliance/wasmtime/pull/882)
926
927### Fixed
928
929* Code caching now accurately accounts for optimization levels, ensuring that if
930  you ask for optimized code you're not accidentally handed unoptimized code
931  from the cache.
932  [#974](https://github.com/bytecodealliance/wasmtime/pull/974)
933
934* Automated releases for tags should be up and running again, along with
935  automatic publication of the `wasmtime` Python package.
936  [#971](https://github.com/bytecodealliance/wasmtime/pull/971)
937