Skip to main content

hyperlight_component_util/
structure.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025 The Hyperlight Authors.
3
4/// core:sort in the specification
5#[derive(Debug, Clone, Copy)]
6pub enum CoreSort {
7    Func,
8    Table,
9    Memory,
10    Global,
11    Type,
12    Module,
13    Instance,
14}
15
16/// sort in the specification
17#[derive(Debug, Clone, Copy)]
18pub enum Sort {
19    Core(CoreSort),
20    Func,
21    Value,
22    Type,
23    Component,
24    Instance,
25}
26
27/// sortidx in the specification
28#[derive(Debug, Clone, Copy)]
29pub struct SortIdx {
30    pub sort: Sort,
31    pub idx: u32,
32}
33
34/// funcidx in the specification
35pub type FuncIdx = u32;