Function wasmer_c_api::wasm_c_api::unstable::engine::wasm_config_set_features
source · #[no_mangle]
pub extern "C" fn wasm_config_set_features(
config: &mut wasm_config_t,
features: Box<wasmer_features_t>
)
Expand description
Unstable non-standard Wasmer-specific API to update the configuration to specify particular features for the engine.
Example
int main() {
// Create the configuration.
wasm_config_t* config = wasm_config_new();
// Set the target.
{
wasmer_features_t* features = wasmer_features_new();
wasmer_features_simd(features, true);
wasm_config_set_features(config, features);
}
// Create the engine.
wasm_engine_t* engine = wasm_engine_new_with_config(config);
// Check we have an engine!
assert(engine);
// Free everything.
wasm_engine_delete(engine);
return 0;
}