-
Notifications
You must be signed in to change notification settings - Fork 3.8k
add help text to wasm-runtime - 2.0.x #9063
Conversation
@@ -209,7 +232,8 @@ void chain_plugin::set_program_options(options_description& cli, options_descrip | |||
EOS_ASSERT(false, plugin_exception, ""); | |||
} | |||
#endif | |||
}), "Override default WASM runtime") | |||
})->default_value(eosio::chain::wasm_interface::vm_type::eos_vm_jit, "eos-vm-jit"), wasm_runtime_opt.c_str() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For 2.0 the default wasm runtime needs to remain wabt. Actually that's curious, why can't we use chain::config::default_wasm_runtime
here to keep the default defined in a single location?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used chain::config::default_wasm_runtime.
} | ||
|
||
chain_plugin::~chain_plugin(){} | ||
|
||
void chain_plugin::set_program_options(options_description& cli, options_description& cfg) | ||
{ | ||
// build wasm_runtime help text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in 2.0 there is another run time, wabt. We'll need to come up with proper description for it 😇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it as wabt.
"wabt" : The WebAssembly Binary Toolkit.
@@ -209,7 +237,8 @@ void chain_plugin::set_program_options(options_description& cli, options_descrip | |||
EOS_ASSERT(false, plugin_exception, ""); | |||
} | |||
#endif | |||
}), "Override default WASM runtime") | |||
})->default_value(eosio::chain::config::default_wasm_runtime, default_wasm_runtime_str), wasm_runtime_opt.c_str() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect the reason you need a default_wasm_runtime_str
here is because only operator>>
is defined for vm_type and not a operator<<
(see libraries/chain/wasm_interface.cpp). I suspect if you were to move the vm_type_string()
logic over to a operator<<
there would be no need for default_wasm_runtime_str
If so, this is still just a minor issue and not something I think absolutely must be done.
Created PR for release/2.0.x from PR(develop)
#9020
#8945
Change Description
nodeos --help
Old help text
--wasm-runtime runtime Override default WASM runtime
New help text
--wasm-runtime runtime (=wabt) Override default WASM runtime ( "wabt",
"eos-vm-jit", "eos-vm"[, "eos-vm-oc"])
"wabt" : The WebAssembly Binary
Toolkit.
"eos-vm-jit" : A WebAssembly runtime
that compiles WebAssembly code to
native x86 code prior to execution.
"eos-vm" : A WebAssembly interpreter."eos-vm-oc" : Unsupported. Instead, use one of the other runtimes along with the option enable-eos-vm-oc
*Note: The text for "eos-vm-oc" only appears in help text when EOSIO_EOS_VM_DEVELOPER is defnend.
Consensus Changes
API Changes
Documentation Additions