MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / Tool

Function Tool

lib/driver/runtimeTool.cpp:358–676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358int Tool(struct DriverToolOptions &Opt) noexcept {
359 std::ios::sync_with_stdio(false);
360
361 Configure Conf;
362 // WASM standard configuration has the highest priority.
363 if (Opt.PropWASM1.value()) {
364 Conf.setWASMStandard(Standard::WASM_1);
365 }
366 if (Opt.PropWASM2.value()) {
367 Conf.setWASMStandard(Standard::WASM_2);
368 }
369 if (Opt.PropWASM3.value()) {
370 Conf.setWASMStandard(Standard::WASM_3);
371 }
372
373 // Proposals adjustment.
374 if (Opt.PropMutGlobals.value()) {
375 Conf.removeProposal(Proposal::ImportExportMutGlobals);
376 }
377 if (Opt.PropNonTrapF2IConvs.value()) {
378 Conf.removeProposal(Proposal::NonTrapFloatToIntConversions);
379 }
380 if (Opt.PropSignExtendOps.value()) {
381 Conf.removeProposal(Proposal::SignExtensionOperators);
382 }
383 if (Opt.PropMultiValue.value()) {
384 Conf.removeProposal(Proposal::MultiValue);
385 }
386 if (Opt.PropBulkMemOps.value()) {
387 Conf.removeProposal(Proposal::BulkMemoryOperations);
388 }
389 if (Opt.PropSIMD.value()) {
390 Conf.removeProposal(Proposal::SIMD);
391 }
392 if (Opt.PropTailCall.value()) {
393 Conf.removeProposal(Proposal::TailCall);
394 }
395 if (Opt.PropExtendConst.value()) {
396 Conf.removeProposal(Proposal::ExtendedConst);
397 }
398 if (Opt.PropMultiMem.value()) {
399 Conf.removeProposal(Proposal::MultiMemories);
400 }
401 if (Opt.PropRelaxedSIMD.value()) {
402 Conf.removeProposal(Proposal::RelaxSIMD);
403 }
404 if (Opt.PropExceptionHandling.value()) {
405 Conf.removeProposal(Proposal::ExceptionHandling);
406 }
407 if (Opt.PropMemory64.value()) {
408 Conf.removeProposal(Proposal::Memory64);
409 }
410 if (Opt.PropTailCallDeprecated.value()) {
411 Conf.addProposal(Proposal::TailCall);
412 }
413 if (Opt.PropExtendConstDeprecated.value()) {
414 Conf.addProposal(Proposal::ExtendedConst);
415 }

Callers 1

UniToolFunction · 0.85

Calls 15

nowClass · 0.85
parseRunModeArgFunction · 0.85
printFunction · 0.85
unlikelyFunction · 0.85
ToolOnModuleFunction · 0.85
ToolOnComponentFunction · 0.85
setWASMStandardMethod · 0.80
removeProposalMethod · 0.80
addProposalMethod · 0.80
setCostMeasuringMethod · 0.80
backMethod · 0.80
setMaxMemoryPageMethod · 0.80

Tested by

no test coverage detected