MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / execute

Method execute

src/bin/wasmtime.rs:103–143  ·  view source on GitHub ↗

Executes the command.

(self)

Source from the content-addressed store, hash-verified

101impl Wasmtime {
102 /// Executes the command.
103 pub fn execute(self) -> Result<()> {
104 #[cfg(feature = "run")]
105 let subcommand = self.subcommand.unwrap_or(Subcommand::Run(self.run));
106 #[cfg(not(feature = "run"))]
107 let subcommand = self.subcommand;
108
109 match subcommand {
110 #[cfg(feature = "run")]
111 Subcommand::Run(c) => c.execute(),
112
113 #[cfg(feature = "cache")]
114 Subcommand::Config(c) => c.execute(),
115
116 #[cfg(feature = "compile")]
117 Subcommand::Compile(c) => c.execute(),
118
119 #[cfg(feature = "explore")]
120 Subcommand::Explore(c) => c.execute(),
121
122 #[cfg(feature = "serve")]
123 Subcommand::Serve(c) => c.execute(),
124
125 #[cfg(feature = "cranelift")]
126 Subcommand::Settings(c) => c.execute(),
127
128 #[cfg(feature = "wast")]
129 Subcommand::Wast(c) => c.execute(),
130
131 #[cfg(feature = "completion")]
132 Subcommand::Completion(c) => c.execute(),
133
134 #[cfg(feature = "objdump")]
135 Subcommand::Objdump(c) => c.execute(),
136
137 #[cfg(all(feature = "hot-blocks", target_os = "linux"))]
138 Subcommand::HotBlocks(c) => c.execute(),
139
140 #[cfg(feature = "wizer")]
141 Subcommand::Wizer(c) => c.execute(),
142 }
143 }
144}
145
146/// Generate shell completion scripts for this CLI.

Callers 1

mainFunction · 0.45

Calls 5

commandFunction · 0.85
OkFunction · 0.85
generateFunction · 0.50
stdoutFunction · 0.50
get_nameMethod · 0.45

Tested by

no test coverage detected