mirror of
https://github.com/fluencelabs/wasmer
synced 2025-07-02 10:01:33 +00:00
When deterministic
feature will be enabled (turned-off by default) it'll guarantee deterministic
execution of wasm programs across different hardware/circumstances. This is very useful for Blockchain projects having wasm smart-contracts This is critical for Blockchain projects that require execution to be deterministic in order to reach a consensus of the state transition of each smart-contract transaction.
This commit is contained in:
@ -70,7 +70,7 @@
|
||||
//! let value = add_one.call(42)?;
|
||||
//!
|
||||
//! assert_eq!(value, 43);
|
||||
//!
|
||||
//!
|
||||
//! Ok(())
|
||||
//! }
|
||||
//! ```
|
||||
@ -199,13 +199,15 @@ pub fn default_compiler() -> impl Compiler {
|
||||
feature = "default-backend-llvm",
|
||||
any(
|
||||
feature = "default-backend-cranelift",
|
||||
feature = "default-backend-singlepass"
|
||||
feature = "default-backend-singlepass",
|
||||
feature = "deterministic"
|
||||
)
|
||||
),
|
||||
all(
|
||||
feature = "default-backend-cranelift",
|
||||
feature = "default-backend-singlepass"
|
||||
)
|
||||
any(feature = "default-backend-singlepass", feature = "deterministic")
|
||||
),
|
||||
all(feature = "default-backend-singlepass", feature = "deterministic")
|
||||
))]
|
||||
compile_error!(
|
||||
"The `default-backend-X` features are mutually exclusive. Please choose just one"
|
||||
@ -214,7 +216,7 @@ pub fn default_compiler() -> impl Compiler {
|
||||
#[cfg(feature = "default-backend-llvm")]
|
||||
use wasmer_llvm_backend::LLVMCompiler as DefaultCompiler;
|
||||
|
||||
#[cfg(feature = "default-backend-singlepass")]
|
||||
#[cfg(any(feature = "default-backend-singlepass", feature = "deterministic"))]
|
||||
use wasmer_singlepass_backend::SinglePassCompiler as DefaultCompiler;
|
||||
|
||||
#[cfg(feature = "default-backend-cranelift")]
|
||||
|
Reference in New Issue
Block a user