MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / new64

Method new64

crates/wasmtime/src/runtime/types.rs:3103–3119  ·  view source on GitHub ↗

Crates a new descriptor for a 64-bit table. Note that 64-bit tables are part of the memory64 proposal for WebAssembly which is not standardized yet.

(element: RefType, min: u64, max: Option<u64>)

Source from the content-addressed store, hash-verified

3101 /// Note that 64-bit tables are part of the memory64 proposal for
3102 /// WebAssembly which is not standardized yet.
3103 pub fn new64(element: RefType, min: u64, max: Option<u64>) -> TableType {
3104 let ref_type = element.to_wasm_type();
3105
3106 debug_assert!(
3107 ref_type.is_canonicalized_for_runtime_usage(),
3108 "should be canonicalized for runtime usage: {ref_type:?}"
3109 );
3110
3111 TableType {
3112 element,
3113 ty: Table {
3114 ref_type,
3115 idx_type: IndexType::I64,
3116 limits: Limits { min, max },
3117 },
3118 }
3119 }
3120
3121 /// Returns whether or not this table is a 64-bit table.
3122 ///

Callers

nothing calls this directly

Calls 6

to_wasm_typeMethod · 0.80
unwrapMethod · 0.45
buildMethod · 0.45
maxMethod · 0.45
minMethod · 0.45
memory64Method · 0.45

Tested by

no test coverage detected