Module integration

Source
Expand description

Easy integration with tools that already use wasm-opt via CLI.

The run_from_command_args function interprets the arguments to a Command, typically used for executing a subprocess, to construct an OptimizationOptions, then runs the optimizer.

Note that integrators must used the provided Command type, not std::process::Command. The provided type is a thin wrapper around the standard type that is needed for backwards compatibility with older versions of Rust.

Structs§

Command
Like std::process::Command but args are iterable in old versions of Rust.

Enums§

Error
An error resulting from run_from_command_args.

Functions§

run_from_command_args
Interpret a pre-built Command as an OptimizationOptions, then call OptimizationOptions::run on it.