Wasmtime
config.hh File Reference
#include <wasmtime/conf.h>
#include <wasmtime/config.h>
#include <wasmtime/error.hh>
#include <wasmtime/helpers.hh>
#include <wasmtime/types/memory.hh>

Go to the source code of this file.

Data Structures

class  wasmtime::PoolAllocationConfig
 Pool allocation configuration for Wasmtime. More...
 
class  wasmtime::Config
 Configuration for Wasmtime. More...
 

Enumerations

enum class  wasmtime::Strategy { Auto = WASMTIME_STRATEGY_AUTO , Cranelift = WASMTIME_STRATEGY_CRANELIFT , Winch = WASMTIME_STRATEGY_WINCH }
 Strategies passed to Config::strategy More...
 
enum class  wasmtime::OptLevel { None = WASMTIME_OPT_LEVEL_NONE , Speed = WASMTIME_OPT_LEVEL_SPEED , SpeedAndSize = WASMTIME_OPT_LEVEL_SPEED_AND_SIZE }
 Values passed to Config::cranelift_opt_level More...
 
enum class  wasmtime::ProfilingStrategy { None = WASMTIME_PROFILING_STRATEGY_NONE , Jitdump = WASMTIME_PROFILING_STRATEGY_JITDUMP , Vtune = WASMTIME_PROFILING_STRATEGY_VTUNE , Perfmap = WASMTIME_PROFILING_STRATEGY_PERFMAP }
 Values passed to Config::profiler More...
 
enum  wasmtime::RegallocAlgorithm { wasmtime::Backtracking = WASMTIME_REGALLOC_BACKTRACKING , wasmtime::SinglePass = WASMTIME_REGALLOC_SINGLE_PASS }
 Values passed to Config::cranelift_regalloc_algorithm More...
 

Enumeration Type Documentation

◆ OptLevel

enum class wasmtime::OptLevel
strong

Values passed to Config::cranelift_opt_level

Enumerator
None 

No extra optimizations performed.

Speed 

Optimize for speed.

SpeedAndSize 

Optimize for speed and generated code size.

◆ ProfilingStrategy

enum class wasmtime::ProfilingStrategy
strong

Values passed to Config::profiler

Enumerator
None 

No profiling enabled.

Jitdump 

Profiling hooks via perf's jitdump.

Vtune 

Profiling hooks via VTune.

Perfmap 

Profiling hooks via perfmap.

◆ RegallocAlgorithm

Values passed to Config::cranelift_regalloc_algorithm

Enumerator
Backtracking 

Generates the fastest possible code, but may take longer.

This algorithm performs “backtracking”, which means that it may undo its earlier work and retry as it discovers conflicts. This results in better register utilization, producing fewer spills and moves, but can cause super-linear compile runtime.

SinglePass 

Generates acceptable code very quickly.

This algorithm performs a single pass through the code, guaranteed to work in linear time. (Note that the rest of Cranelift is not necessarily guaranteed to run in linear time, however.) It cannot undo earlier decisions, however, and it cannot foresee constraints or issues that may occur further ahead in the code, so the code may have more spills and moves as a result.

◆ Strategy

enum class wasmtime::Strategy
strong

Strategies passed to Config::strategy

Enumerator
Auto 

Automatically selects the compilation strategy.

Cranelift 

Requires Cranelift to be used for compilation.

Winch 

Use winch for compilation.