Sign in

    mizchi/wite/types does not have a README file

    WiteError

    pub(all) suberror WiteError {
    UnexpectedEof
    InvalidMagic
    UnsupportedVersion(String)
    InvalidFormat(String)
    }

    CallGraphNode

    pub(all) struct CallGraphNode {
    function_index : UInt
    body_bytes : UInt
    name : String?
    export_names : Array[String]
    direct_callees : Array[UInt]
    reachable_from_roots : Bool
    }

    CallGraphReport

    pub(all) struct CallGraphReport {
    imported_function_count : UInt
    local_function_count : UInt
    roots : Array[UInt]
    has_indirect_calls : Bool
    partial : Bool
    reachable_body_bytes : UInt
    dead_body_bytes : UInt
    nodes : Array[CallGraphNode]
    }

    CallGraphSummary

    pub(all) struct CallGraphSummary {
    imported_function_count : UInt
    local_function_count : UInt
    roots : Array[UInt]
    has_indirect_calls : Bool
    partial : Bool
    reachable_function_count : UInt
    dead_function_count : UInt
    reachable_body_bytes : UInt
    dead_body_bytes : UInt
    }

    CfpConstHintRejectReasonCount

    pub(all) struct CfpConstHintRejectReasonCount {
    reason : String
    count : UInt
    }

    CodeBlockSize

    pub(all) struct CodeBlockSize {
    function_index : UInt
    function_name : String?
    export_names : Array[String]
    block_index : UInt
    depth : UInt
    kind : String
    start_offset : UInt
    end_offset : UInt
    instruction_count : UInt
    total_bytes : UInt
    }

    CodeBlockSizeReport

    pub(all) struct CodeBlockSizeReport {
    partial : Bool
    function_count : UInt
    block_count : UInt
    total_body_bytes : UInt
    total_instruction_bytes : UInt
    blocks : Array[CodeBlockSize]
    }

    ComponentCallGraphReport

    pub(all) struct ComponentCallGraphReport {
    module_index : UInt
    graph : CallGraphReport
    }

    ComponentCoreOptimizeEntry

    pub(all) struct ComponentCoreOptimizeEntry {
    module_index : UInt
    before_bytes : UInt
    after_bytes : UInt
    removed_sections : Array[String]
    no_change_reasons : Array[String]
    }

    ComponentCoreOptimizeReport

    pub(all) struct ComponentCoreOptimizeReport {
    total_component_bytes : UInt
    core_module_count : UInt
    total_core_before_bytes : UInt
    total_core_after_bytes : UInt
    entries : Array[ComponentCoreOptimizeEntry]
    }

    ComponentFunctionSizeReport

    pub(all) struct ComponentFunctionSizeReport {
    module_index : UInt
    function_count : UInt
    total_body_bytes : UInt
    functions : Array[FunctionSize]
    }

    ComponentProfile

    pub(all) struct ComponentProfile {
    total_bytes : UInt
    import_count : UInt
    export_count : UInt
    core_module_count : UInt
    nested_component_count : UInt
    sections : Array[SectionSize]
    core_modules : Array[ModuleProfile]
    }

    ComponentRootPolicyReport

    pub(all) struct ComponentRootPolicyReport {
    component_imports : Array[String]
    component_exports : Array[String]
    wit_imports : Array[String]
    wit_exports : Array[String]
    canonical_abi_roots : Array[String]
    root_name_candidates : Array[String]
    }

    ContractReport

    pub(all) struct ContractReport {
    component_imports : Array[String]
    component_exports : Array[String]
    wit_imports : Array[String]
    wit_exports : Array[String]
    missing_component_imports : Array[String]
    missing_component_exports : Array[String]
    }

    CustomSectionBreakdown

    pub(all) struct CustomSectionBreakdown {
    name : String
    count : UInt
    total_bytes : UInt
    payload_bytes : UInt
    content_bytes : UInt
    }

    DceReport

    pub(all) struct DceReport {
    roots : Array[UInt]
    partial : Bool
    removable_function_count : UInt
    removable_body_bytes : UInt
    removable_functions : Array[FunctionSize]
    }

    FunctionGapEntry

    pub(all) struct FunctionGapEntry {
    match_kind : String
    match_key : String
    left_function_index : UInt?
    right_function_index : UInt?
    left_name : String?
    right_name : String?
    left_export_names : Array[String]
    right_export_names : Array[String]
    left_body_bytes : UInt
    right_body_bytes : UInt
    left_minus_right_bytes : Int
    abs_gap_bytes : UInt
    }

    FunctionGapReport

    pub(all) struct FunctionGapReport {
    left_total_body_bytes : UInt
    right_total_body_bytes : UInt
    left_minus_right_total_bytes : Int
    unmatched_left_count : UInt
    unmatched_right_count : UInt
    entries : Array[FunctionGapEntry]
    }

    FunctionSize

    pub(all) struct FunctionSize {
    function_index : UInt
    body_bytes : UInt
    name : String?
    export_names : Array[String]
    }

    FunctionSizeDiff

    pub(all) struct FunctionSizeDiff {
    function_index : UInt
    before_body_bytes : UInt
    after_body_bytes : UInt
    gain_bytes : UInt
    regression_bytes : UInt
    before_name : String?
    after_name : String?
    export_names : Array[String]
    }

    HostCodeHint

    pub(all) struct HostCodeHint {
    kind : String
    function_index : UInt
    function_name : String?
    target_function_index : UInt
    target_function_name : String?
    export_names : Array[String]
    appended_i32_const_count : UInt
    dropped_param_count : UInt
    }

    HostGeneratedCodeReport

    pub(all) struct HostGeneratedCodeReport {
    imported_function_count : UInt
    local_function_count : UInt
    param_forwarding_thunk_count : UInt
    const_forwarding_thunk_count : UInt
    signature_refinable_thunk_count : UInt
    cfp_const_hint_section_count : UInt
    cfp_const_hint_unknown_version_section_count : UInt
    cfp_const_hint_malformed_section_count : UInt
    cfp_const_hint_entry_count : UInt
    cfp_const_hint_usable_entry_count : UInt
    cfp_const_hint_reject_reason_counts : Array[CfpConstHintRejectReasonCount]
    cfp_const_specialize_hint_candidate_count : UInt
    cfp_const_specialize_hint_reject_reason_counts : Array[CfpConstHintRejectReasonCount]
    directize_candidate_call_count : UInt
    dce_removable_function_count : UInt
    dce_removable_body_bytes : UInt
    dce_partial : Bool
    hints : Array[HostCodeHint]
    }

    HotnessSizeBucket

    pub(all) struct HotnessSizeBucket {
    bucket : String
    count : UInt
    body_bytes : UInt
    total_ns : UInt64
    }

    HotnessSizeEntry

    pub(all) struct HotnessSizeEntry {
    export_name : String
    function_index : UInt?
    function_name : String?
    body_bytes : UInt
    calls : UInt
    total_ns : UInt64
    average_ns : UInt64
    bucket : String
    unresolved_reason : String?
    unresolved_detail : String?
    }

    HotnessSizeMatrixReport

    pub(all) struct HotnessSizeMatrixReport {
    iterations : UInt
    instantiate_ns : UInt64
    hot_threshold_ns : UInt64
    large_threshold_bytes : UInt
    unresolved_exports : Array[String]
    unresolved_reason_counts : Array[HotnessUnresolvedReasonCount]
    buckets : Array[HotnessSizeBucket]
    entries : Array[HotnessSizeEntry]
    }

    HotnessUnresolvedReasonCount

    pub(all) struct HotnessUnresolvedReasonCount {
    reason : String
    count : UInt
    }

    KeepReasonEntry

    pub(all) struct KeepReasonEntry {
    function_index : UInt
    name : String?
    export_names : Array[String]
    reasons : Array[String]
    }

    KeepReasonReport

    pub(all) struct KeepReasonReport {
    partial : Bool
    entries : Array[KeepReasonEntry]
    }

    ModuleProfile

    pub(all) struct ModuleProfile {
    total_bytes : UInt
    function_count : UInt
    import_count : UInt
    export_count : UInt
    code_body_count : UInt
    code_body_bytes : UInt
    sections : Array[SectionSize]
    }

    OpcodeStat

    pub(all) struct OpcodeStat {
    key : String
    mnemonic : String
    count : UInt
    total_bytes : UInt
    }

    OptimizeConfig

    pub(all) struct OptimizeConfig {
    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::aggressive

    fn OptimizeConfig::aggressive() -> OptimizeConfig

    OptimizeConfig::default

    OptimizeConfig::o0

    OptimizeConfig::o1

    Shrink-first preset. By default this strips debug/dwarf/target-features metadata in addition to code optimizations.

    OptimizeConfig::o2

    Throughput/balance presets. By default these keep debug/custom metadata unless explicit strip flags are enabled by CLI.

    OptimizeConfig::o3

    OptimizeConfig::os

    OptimizeConfig::oz

    OptimizeMetadataReport

    pub(all) struct OptimizeMetadataReport {
    before_size : UInt
    after_size : UInt
    total_gain_bytes : UInt
    total_regression_bytes : UInt
    stages : Array[OptimizeStageMetadata]
    }

    OptimizeResult

    pub(all) struct OptimizeResult {
    bytes : Bytes
    before_size : UInt
    after_size : UInt
    removed_sections : Array[String]
    observations : Array[String]
    no_change_reasons : Array[String]
    }

    OptimizeStageMetadata

    pub(all) struct OptimizeStageMetadata {
    stage : String
    before_size : UInt
    after_size : UInt
    gain_bytes : UInt
    regression_bytes : UInt
    function_gain_bytes : UInt
    function_regression_bytes : UInt
    function_diffs : Array[FunctionSizeDiff]
    removed_sections : Array[String]
    observations : Array[String]
    no_change_reasons : Array[String]
    }

    RetainPathEntry

    pub(all) struct RetainPathEntry {
    function_index : UInt
    name : String?
    export_names : Array[String]
    body_bytes : UInt
    root_reasons : Array[String]
    path : Array[UInt]
    }

    RetainPathReport

    pub(all) struct RetainPathReport {
    partial : Bool
    roots : Array[UInt]
    entries : Array[RetainPathEntry]
    }

    RuntimeFunctionProfile

    pub(all) struct RuntimeFunctionProfile {
    name : String
    calls : UInt
    total_ns : UInt64
    average_ns : UInt64
    }

    RuntimeProfile

    pub(all) struct RuntimeProfile {
    instantiate_ns : UInt64
    iterations : UInt
    functions : Array[RuntimeFunctionProfile]
    skipped_exports : Array[String]
    unresolved_exports : Array[RuntimeUnresolvedExport]
    }

    RuntimeProfileScenario

    pub(all) struct RuntimeProfileScenario {
    export_name : String
    args : Array[Int]
    }

    RuntimeUnresolvedExport

    pub(all) struct RuntimeUnresolvedExport {
    export_name : String
    reason : String
    detail : String
    }

    SectionSize

    pub(all) struct SectionSize {
    key : String
    section_id : UInt
    total_bytes : UInt
    }

    WasmBreakdownReport

    pub(all) struct WasmBreakdownReport {
    total_bytes : UInt
    sections : Array[SectionSize]
    custom_sections : Array[CustomSectionBreakdown]
    imported_function_count : UInt
    local_function_count : UInt
    top_functions : Array[FunctionSize]
    block_count : UInt
    top_blocks : Array[CodeBlockSize]
    instruction_count : UInt
    instruction_bytes : UInt
    opcode_partial : Bool
    opcodes : Array[OpcodeStat]
    callgraph_partial : Bool
    has_indirect_calls : Bool
    reachable_body_bytes : UInt
    dead_body_bytes : UInt
    }

    error_to_string

    fn error_to_string(err : WiteError) -> String

    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_config_from_opt_level

    fn optimize_config_from_opt_level(level : String) -> OptimizeConfig?

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io