Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

add help text to wasm-runtime - 2.0.x #9063

Merged
merged 3 commits into from
May 12, 2020

Conversation

kimjh2005
Copy link
Contributor

@kimjh2005 kimjh2005 commented May 7, 2020

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

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@heifner heifner changed the base branch from master to release/2.0.x May 7, 2020 18:08
@kimjh2005 kimjh2005 marked this pull request as ready for review May 7, 2020 18:39
@kimjh2005 kimjh2005 requested a review from heifner May 7, 2020 18:41
@@ -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()
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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 😇

Copy link
Contributor Author

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.

@heifner heifner changed the title 8945 help text wasm runtime 2.0.x add help text to wasm-runtime - 2.0.x May 8, 2020
@@ -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()
Copy link
Contributor

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.

@kimjh2005 kimjh2005 merged commit 0ecadf5 into release/2.0.x May 12, 2020
@kimjh2005 kimjh2005 deleted the 8945-help-text-wasm-runtime-2.0.x branch May 14, 2020 13:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants