@@ -230,10 +230,6 @@ impl Config {
230
230
ret. wasm_simd ( true ) ;
231
231
ret. wasm_backtrace_details ( WasmBacktraceDetails :: Environment ) ;
232
232
233
- ret. wasm_relaxed_simd ( false ) ;
234
- ret. wasm_threads ( false ) ;
235
- ret. wasm_multi_memory ( false ) ;
236
-
237
233
// This is on-by-default in `wasmparser` since it's a stage 4+ proposal
238
234
// but it's not implemented in Wasmtime yet so disable it.
239
235
ret. features . tail_call = false ;
@@ -660,31 +656,23 @@ impl Config {
660
656
self
661
657
}
662
658
663
- /// Configures whether the WebAssembly threads proposal will be enabled for
664
- /// compilation.
665
- ///
666
- /// The [WebAssembly threads proposal][threads] is not currently fully
667
- /// standardized and is undergoing development. Additionally the support in
668
- /// wasmtime itself is still being worked on. Support for this feature can
669
- /// be enabled through this method for appropriate wasm modules.
659
+ /// Configures whether the WebAssembly [threads] proposal will be enabled
660
+ /// for compilation.
670
661
///
671
662
/// This feature gates items such as shared memories and atomic
672
- /// instructions. Note that the threads feature depends on the
673
- /// bulk memory feature, which is enabled by default.
663
+ /// instructions. Note that the threads feature depends on the bulk memory
664
+ /// feature, which is enabled by default. Additionally note that while the
665
+ /// wasm feature is called "threads" it does not actually include the
666
+ /// ability to spawn threads. Spawning threads is part of the [wasi-threads]
667
+ /// proposal which is a separately gated feature in Wasmtime.
674
668
///
675
- /// This is `false` by default.
676
- ///
677
- /// > **Note**: Wasmtime does not implement everything for the wasm threads
678
- /// > spec at this time, so bugs, panics, and possibly segfaults should be
679
- /// > expected. This should not be enabled in a production setting right
680
- /// > now.
681
- ///
682
- /// # Errors
669
+ /// Embeddings of Wasmtime are able to build their own custom threading
670
+ /// scheme on top of the core wasm threads proposal, however.
683
671
///
684
- /// The validation of this feature are deferred until the engine is being built,
685
- /// and thus may cause `Engine::new` fail if the `bulk_memory` feature is disabled.
672
+ /// This is `true` by default.
686
673
///
687
674
/// [threads]: https://github.com/webassembly/threads
675
+ /// [wasi-threads]: https://github.com/webassembly/wasi-threads
688
676
pub fn wasm_threads ( & mut self , enable : bool ) -> & mut Self {
689
677
self . features . threads = enable;
690
678
self
@@ -750,15 +738,13 @@ impl Config {
750
738
/// Configures whether the WebAssembly Relaxed SIMD proposal will be
751
739
/// enabled for compilation.
752
740
///
753
- /// The [WebAssembly Relaxed SIMD proposal][proposal] is not, at the time of
754
- /// this writing, at stage 4. The relaxed SIMD proposal adds new
755
- /// instructions to WebAssembly which, for some specific inputs, are allowed
756
- /// to produce different results on different hosts. More-or-less this
757
- /// proposal enables exposing platform-specific semantics of SIMD
758
- /// instructions in a controlled fashion to a WebAssembly program. From an
759
- /// embedder's perspective this means that WebAssembly programs may execute
760
- /// differently depending on whether the host is x86_64 or AArch64, for
761
- /// example.
741
+ /// The relaxed SIMD proposal adds new instructions to WebAssembly which,
742
+ /// for some specific inputs, are allowed to produce different results on
743
+ /// different hosts. More-or-less this proposal enables exposing
744
+ /// platform-specific semantics of SIMD instructions in a controlled
745
+ /// fashion to a WebAssembly program. From an embedder's perspective this
746
+ /// means that WebAssembly programs may execute differently depending on
747
+ /// whether the host is x86_64 or AArch64, for example.
762
748
///
763
749
/// By default Wasmtime lowers relaxed SIMD instructions to the fastest
764
750
/// lowering for the platform it's running on. This means that, by default,
@@ -768,7 +754,7 @@ impl Config {
768
754
/// deterministic behavior across all platforms, as classified by the
769
755
/// specification, at the cost of performance.
770
756
///
771
- /// This is `false ` by default.
757
+ /// This is `true ` by default.
772
758
///
773
759
/// [proposal]: https://github.com/webassembly/relaxed-simd
774
760
pub fn wasm_relaxed_simd ( & mut self , enable : bool ) -> & mut Self {
@@ -840,7 +826,7 @@ impl Config {
840
826
/// This feature gates modules having more than one linear memory
841
827
/// declaration or import.
842
828
///
843
- /// This is `false ` by default.
829
+ /// This is `true ` by default.
844
830
///
845
831
/// [proposal]: https://github.com/webassembly/multi-memory
846
832
pub fn wasm_multi_memory ( & mut self , enable : bool ) -> & mut Self {
0 commit comments