wite

Component-model-aware WebAssembly analyzer, optimizer, and profiler

wasm
component-model
optimizer
profiler
moon add mizchi/wite@0.11.3
Download zip
Author
Version
0.11.3
License
Apache-2.0
Last updated
18 hours ago
Downloads
63K
README

#wite

WebAssembly analyzer/optimizer/profiler for core wasm and component model binaries.

// See README.md and src/lib.mbt for usage.

#
BinaryKind

#
CallGraphNode

#
CallGraphReport

#
CallGraphSummary

#
CfpConstHintRejectReasonCount

#
ChunkConfig

#
CodeBlockSize

#
CodeBlockSizeReport

#
ComponentCallGraphReport

#
ComponentCoreOptimizeEntry

#
ComponentCoreOptimizeReport

#
ComponentFunctionSizeReport

#
ComponentProfile

#
ComponentRootPolicyReport

#
ConfigInput

#
ConfigOutput

#
ContractReport

#
CustomSectionBreakdown

#
DceReport

#
EnvironmentConfig

#
EnvironmentDef

#
FunctionGapEntry

#
FunctionGapReport

#
FunctionSize

#
FunctionSizeDiff

#
HostCodeHint

#
HostGeneratedCodeReport

#
HotnessSizeBucket

#
HotnessSizeEntry

#
HotnessSizeMatrixReport

#
HotnessUnresolvedReasonCount

#
KeepReasonEntry

#
KeepReasonReport

#
ModuleProfile

#
OpcodeStat

#
OptimizeConfig

#
OptimizeMetadataReport

#
OptimizeResult

#
OptimizeStageMetadata

#
RetainPathEntry

#
RetainPathReport

#
RuntimeFunctionProfile

#
RuntimeProfile

#
RuntimeProfileScenario

#
RuntimeTarget

#
RuntimeUnresolvedExport

#
SectionSize

#
ServerConfig

#
ServerExecutor

#
WasmBreakdownReport

#
WiteConfigFile

#
WiteError

#
analyze_call_graph

#
analyze_call_graph_summary

#
analyze_code_block_sizes

#
analyze_component_call_graphs

fn analyze_component_call_graphs(bytes : Bytes) -> Result[Array[
ComponentCallGraphReport
], String]

#
analyze_component_contract

fn analyze_component_contract(bytes : Bytes, resolved :
ResolveInput
) -> Result[
ContractReport
, String]

#
analyze_component_core_optimize

fn analyze_component_core_optimize(bytes : Bytes, config? :
OptimizeConfig
, exclude? : Array[String]) -> Result[
ComponentCoreOptimizeReport
, String]

#
analyze_component_function_sizes

fn analyze_component_function_sizes(bytes : Bytes) -> Result[Array[
ComponentFunctionSizeReport
], String]

#
analyze_component_root_policy

fn analyze_component_root_policy(bytes : Bytes, resolved_wit? :
ResolveInput
, exclude? : Array[String]) -> Result[
ComponentRootPolicyReport
, String]

#
analyze_dce_report

fn analyze_dce_report(bytes : Bytes) -> Result[
DceReport
,
WiteError
]

#
analyze_function_size_gap

fn analyze_function_size_gap(left_bytes : Bytes, right_bytes : Bytes, top_limit? : UInt) -> Result[
FunctionGapReport
,
WiteError
]

#
analyze_function_sizes

#
analyze_host_generated_code

#
analyze_hotness_size_matrix

fn analyze_hotness_size_matrix(bytes : Bytes, iterations? : UInt, scenarios? : Array[
RuntimeProfileScenario
]) -> Result[
HotnessSizeMatrixReport
, String]

#
analyze_optimize_metadata

fn analyze_optimize_metadata(bytes : Bytes, config? :
OptimizeConfig
, function_diff_limit? : UInt) -> Result[
OptimizeMetadataReport
,
WiteError
]

#
analyze_section_sizes

#
analyze_wasm_breakdown

fn analyze_wasm_breakdown(bytes : Bytes, top_limit? : UInt) -> Result[
WasmBreakdownReport
,
WiteError
]

#
binary_kind_name

fn binary_kind_name(kind :
BinaryKind
) -> String

#
chunk_names

fn chunk_names(config :
WiteConfigFile
) -> Array[String]

#
collect_wac_new_package_names

fn collect_wac_new_package_names(source : String) -> Result[Array[String], String]

#
compose_wac_file

fn compose_wac_file(input_path : String, best_effort? : Bool, dce? : Bool) -> Result[Bytes, String]

#
compose_wac_source

fn compose_wac_source(source : String, base_dir : String, best_effort? : Bool, dce? : Bool) -> Result[Bytes, String]

#
empty_chunk_config

#
empty_environment_config

#
empty_wite_config_file

#
environment_names

fn environment_names(config :
WiteConfigFile
) -> Array[String]

#
error_to_string

fn error_to_string(err :
WiteError
) -> String

#
is_ts_config

fn is_ts_config(path : String) -> Bool

#
make_component_optimize_config

fn make_component_optimize_config(base? :
OptimizeConfig
, root_name_candidates? : Array[String], exclude? : Array[String]) ->
OptimizeConfig

#
make_optimize_config

fn make_optimize_config(strip_all_custom? : Bool, strip_name_section? : Bool, strip_producers_section? : Bool, strip_debug_sections? : Bool, strip_dwarf_sections? : Bool, strip_target_features_section? : Bool, keep_custom_sections? : Array[String], pass_rounds? : UInt, enable_peephole? : Bool, peephole_remove_nop? : Bool, peephole_remove_const_drop? : Bool, enable_vacuum? : Bool, enable_merge_blocks? : Bool, enable_remove_unused_brs? : Bool, enable_dce? : Bool, enable_dfe? : Bool, enable_merge_similar_functions? : Bool, enable_remove_unused_module_elements? : Bool, enable_experimental_cfp_const_hints? : Bool, closed_world? : Bool, closed_world_root_exports? : Array[String], safe_mode? : Bool) ->
OptimizeConfig

#
make_runtime_profile_scenario

fn make_runtime_profile_scenario(export_name : String, args? : Array[Int]) ->
RuntimeProfileScenario

#
optimize_binary_for_size

fn optimize_binary_for_size(bytes : Bytes, config? :
OptimizeConfig
, exclude? : Array[String]) -> Result[
OptimizeResult
, String]

#
optimize_component_for_size

fn optimize_component_for_size(bytes : Bytes, config? :
OptimizeConfig
, exclude? : Array[String]) -> Result[
OptimizeResult
, String]

#
optimize_config_from_opt_level

fn optimize_config_from_opt_level(level : String) ->
OptimizeConfig
?

#
parse_binary_kind

fn parse_binary_kind(name : String) ->
BinaryKind
?

#
parse_runtime_target

fn parse_runtime_target(name : String) ->
RuntimeTarget

#
parse_wac_package_name

fn parse_wac_package_name(pkg_name : String) -> (String, String)?

#
parse_wite_config_json

fn parse_wite_config_json(json_value : Json) -> Result[
WiteConfigFile
, String]

#
parse_wite_config_text

fn parse_wite_config_text(text : String) -> Result[
WiteConfigFile
, String]

#
profile_component

fn profile_component(bytes : Bytes) -> Result[
ComponentProfile
, String]

#
profile_module

#
profile_runtime_exports

fn profile_runtime_exports(_bytes : Bytes, iterations? : UInt, scenarios? : Array[
RuntimeProfileScenario
]) -> Result[
RuntimeProfile
, String]

#
profile_runtime_zero_arg_exports

fn profile_runtime_zero_arg_exports(_bytes : Bytes, iterations? : UInt) -> Result[
RuntimeProfile
, String]

#
resolve_environment

fn resolve_environment(config :
WiteConfigFile
, env_name : String?) -> Result[
EnvironmentConfig
, String]

#
resolve_environment_def

fn resolve_environment_def(config :
WiteConfigFile
, name : String) -> Result[
EnvironmentDef
, String]

#
runtime_target_name

fn runtime_target_name(target :
RuntimeTarget
) -> String

Source Files

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io