wasmer/rustdoc/wasmer_clif_fork_wasm/trait.ModuleEnvironment.html

80 lines
49 KiB
HTML
Raw Permalink Normal View History

2019-09-06 15:57:44 -07:00
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ModuleEnvironment` trait in crate `wasmer_clif_fork_wasm`."><meta name="keywords" content="rust, rustlang, rust-lang, ModuleEnvironment"><title>wasmer_clif_fork_wasm::ModuleEnvironment - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../wasmer_clif_fork_wasm/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Trait ModuleEnvironment</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.declare_data_initialization">declare_data_initialization</a><a href="#tymethod.declare_func_export">declare_func_export</a><a href="#tymethod.declare_func_import">declare_func_import</a><a href="#tymethod.declare_func_type">declare_func_type</a><a href="#tymethod.declare_global">declare_global</a><a href="#tymethod.declare_global_export">declare_global_export</a><a href="#tymethod.declare_global_import">declare_global_import</a><a href="#tymethod.declare_memory">declare_memory</a><a href="#tymethod.declare_memory_export">declare_memory_export</a><a href="#tymethod.declare_memory_import">declare_memory_import</a><a href="#tymethod.declare_signature">declare_signature</a><a href="#tymethod.declare_start_func">declare_start_func</a><a href="#tymethod.declare_table">declare_table</a><a href="#tymethod.declare_table_elements">declare_table_elements</a><a href="#tymethod.declare_table_export">declare_table_export</a><a href="#tymethod.declare_table_import">declare_table_import</a><a href="#tymethod.define_function_body">define_function_body</a><a href="#tymethod.target_config">target_config</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.finish_exports">finish_exports</a><a href="#method.finish_imports">finish_imports</a><a href="#method.reserve_data_initializers">reserve_data_initializers</a><a href="#method.reserve_exports">reserve_exports</a><a href="#method.reserve_func_types">reserve_func_types</a><a href="#method.reserve_globals">reserve_globals</a><a href="#method.reserve_imports">reserve_imports</a><a href="#method.reserve_memories">reserve_memories</a><a href="#method.reserve_signatures">reserve_signatures</a><a href="#method.reserve_table_elements">reserve_table_elements</a><a href="#method.reserve_tables">reserve_tables</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='index.html'>wasmer_clif_fork_wasm</a></p><script>window.sidebarCurrent = {name: 'ModuleEnvironment', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="
fn <a href='#tymethod.target_config' class='fnname'>target_config</a>(&amp;self) -&gt; <a class="struct" href="../cranelift_codegen/isa/struct.TargetFrontendConfig.html" title="struct cranelift_codegen::isa::TargetFrontendConfig">TargetFrontendConfig</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.declare_signature' class='fnname'>declare_signature</a>(&amp;mut self, sig: <a class="struct" href="../cranelift_codegen/ir/extfunc/struct.Signature.html" title="struct cranelift_codegen::ir::extfunc::Signature">Signature</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_func_import' class='fnname'>declare_func_import</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sig_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.SignatureIndex.html" title="struct wasmer_clif_fork_wasm::SignatureIndex">SignatureIndex</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;module: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;field: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>&nbsp;&nbsp;&nbsp;&nbsp;);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_table_import' class='fnname'>declare_table_import</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Table.html" title="struct wasmer_clif_fork_wasm::Table">Table</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;module: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;field: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>&nbsp;&nbsp;&nbsp;&nbsp;);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_memory_import' class='fnname'>declare_memory_import</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memory: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Memory.html" title="struct wasmer_clif_fork_wasm::Memory">Memory</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;module: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;field: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>&nbsp;&nbsp;&nbsp;&nbsp;);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_global_import' class='fnname'>declare_global_import</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;global: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Global.html" title="struct wasmer_clif_fork_wasm::Global">Global</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;module: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;field: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>&nbsp;&nbsp;&nbsp;&nbsp;);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_func_type' class='fnname'>declare_func_type</a>(&amp;mut self, sig_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.SignatureIndex.html" title="struct wasmer_clif_fork_wasm::SignatureIndex">SignatureIndex</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_table' class='fnname'>declare_table</a>(&amp;mut self, table: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Table.html" title="struct wasmer_clif_fork_wasm::Table">Table</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_memory' class='fnname'>declare_memory</a>(&amp;mut self, memory: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Memory.html" title="struct wasmer_clif_fork_wasm::Memory">Memory</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_global' class='fnname'>declare_global</a>(&amp;mut self, global: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Global.html" title="struct wasmer_clif_fork_wasm::Global">Global</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_func_export' class='fnname'>declare_func_export</a>(&amp;mut self, func_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.FuncIndex.html" title="struct wasmer_clif_fork_wasm::FuncIndex">FuncIndex</a>, name: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_table_export' class='fnname'>declare_table_export</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.TableIndex.html" title="struct wasmer_clif_fork_wasm::TableIndex">TableIndex</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>&nbsp;&nbsp;&nbsp;&nbsp;);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_memory_export' class='fnname'>declare_memory_export</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memory_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.MemoryIndex.html" title="struct wasmer_clif_fork_wasm::MemoryIndex">MemoryIndex</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>&nbsp;&nbsp;&nbsp;&nbsp;);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_global_export' class='fnname'>declare_global_export</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;global_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.GlobalIndex.html" title="struct wasmer_clif_fork_wasm::GlobalIndex">GlobalIndex</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>&nbsp;&nbsp;&nbsp;&nbsp;);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_start_func' class='fnname'>declare_start_func</a>(&amp;mut self, index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.FuncIndex.html" title="struct wasmer_clif_fork_wasm::FuncIndex">FuncIndex</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.declare_table_elements' class='fnname'>declare_table_elements</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.TableIndex.html" title="struct wasmer_clif_fork_wasm::TableIndex">TableIndex</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;base: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../wasmer_clif_fork_wasm/struct.GlobalIndex.html" title="struct wasmer_clif_fork_wasm::GlobalIndex">GlobalIndex</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elements: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="struct" href="../wasmer_clif_fork_wasm/struct.FuncIndex.html" title="struct wasmer_clif_fork_wasm::FuncIndex">FuncIndex</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;);
<div class='item-spacer'></div> fn <a href='#tymethod.define_function_body' class='fnname'>define_function_body</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;body_bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'data [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;body_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="type" href="../wasmer_clif_fork_wasm/type.WasmResult.html" title="type wasmer_clif_fork_wasm::WasmResult">WasmResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;;
<div class='item-spacer'></div> fn <a href='#tymethod.declare_data_initialization' class='fnname'>declare_data_initialization</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memory_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.MemoryIndex.html" title="struct wasmer_clif_fork_wasm::MemoryIndex">MemoryIndex</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;base: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../wasmer_clif_fork_wasm/struct.GlobalIndex.html" title="struct wasmer_clif_fork_wasm::GlobalIndex">GlobalIndex</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'data [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><br>&nbsp;&nbsp;&nbsp;&nbsp;);
fn <a href='#method.reserve_signatures' class='fnname'>reserve_signatures</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
<div class='item-spacer'></div> fn <a href='#method.reserve_imports' class='fnname'>reserve_imports</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
<div class='item-spacer'></div> fn <a href='#method.finish_imports' class='fnname'>finish_imports</a>(&amp;mut self) { ... }
<div class='item-spacer'></div> fn <a href='#method.reserve_func_types' class='fnname'>reserve_func_types</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
<div class='item-spacer'></div> fn <a href='#method.reserve_tables' class='fnname'>reserve_tables</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
<div class='item-spacer'></div> fn <a href='#method.reserve_memories' class='fnname'>reserve_memories</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
<div class='item-spacer'></div> fn <a href='#method.reserve_globals' class='fnname'>reserve_globals</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
<div class='item-spacer'></div> fn <a href='#method.reserve_exports' class='fnname'>reserve_exports</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
<div class='item-spacer'></div> fn <a href='#method.finish_exports' class='fnname'>finish_exports</a>(&amp;mut self) { ... }
<div class='item-spacer'></div> fn <a href='#method.reserve_table_elements' class='fnname'>reserve_table_elements</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
<div class='item-spacer'></div> fn <a href='#method.reserve_data_initializers' class='fnname'>reserve_data_initializers</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) { ... }
}</pre></div><div class='docblock'><p>An object satisfying the <code>ModuleEnvironment</code> trait can be passed as argument to the
<a href="fn.translate_module.html"><code>translate_module</code></a> function. These methods should not be called
by the user, they are only for <code>wasmer-clif-fork-wasm</code> internal use.</p>
</div>
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.target_config' class='method'><code id='target_config.v'>fn <a href='#tymethod.target_config' class='fnname'>target_config</a>(&amp;self) -&gt; <a class="struct" href="../cranelift_codegen/isa/struct.TargetFrontendConfig.html" title="struct cranelift_codegen::isa::TargetFrontendConfig">TargetFrontendConfig</a></code></h3><div class='docblock'><p>Get the information needed to produce Cranelift IR for the current target.</p>
</div><h3 id='tymethod.declare_signature' class='method'><code id='declare_signature.v'>fn <a href='#tymethod.declare_signature' class='fnname'>declare_signature</a>(&amp;mut self, sig: <a class="struct" href="../cranelift_codegen/ir/extfunc/struct.Signature.html" title="struct cranelift_codegen::ir::extfunc::Signature">Signature</a>)</code></h3><div class='docblock'><p>Declares a function signature to the environment.</p>
</div><h3 id='tymethod.declare_func_import' class='method'><code id='declare_func_import.v'>fn <a href='#tymethod.declare_func_import' class='fnname'>declare_func_import</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;sig_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.SignatureIndex.html" title="struct wasmer_clif_fork_wasm::SignatureIndex">SignatureIndex</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;module: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;field: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>)</code></h3><div class='docblock'><p>Declares a function import to the environment.</p>
</div><h3 id='tymethod.declare_table_import' class='method'><code id='declare_table_import.v'>fn <a href='#tymethod.declare_table_import' class='fnname'>declare_table_import</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;table: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Table.html" title="struct wasmer_clif_fork_wasm::Table">Table</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;module: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;field: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>)</code></h3><div class='docblock'><p>Declares a table import to the environment.</p>
</div><h3 id='tymethod.declare_memory_import' class='method'><code id='declare_memory_import.v'>fn <a href='#tymethod.declare_memory_import' class='fnname'>declare_memory_import</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;memory: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Memory.html" title="struct wasmer_clif_fork_wasm::Memory">Memory</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;module: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;field: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>)</code></h3><div class='docblock'><p>Declares a memory import to the environment.</p>
</div><h3 id='tymethod.declare_global_import' class='method'><code id='declare_global_import.v'>fn <a href='#tymethod.declare_global_import' class='fnname'>declare_global_import</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;global: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Global.html" title="struct wasmer_clif_fork_wasm::Global">Global</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;module: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;field: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>)</code></h3><div class='docblock'><p>Declares a global import to the environment.</p>
</div><h3 id='tymethod.declare_func_type' class='method'><code id='declare_func_type.v'>fn <a href='#tymethod.declare_func_type' class='fnname'>declare_func_type</a>(&amp;mut self, sig_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.SignatureIndex.html" title="struct wasmer_clif_fork_wasm::SignatureIndex">SignatureIndex</a>)</code></h3><div class='docblock'><p>Declares the type (signature) of a local function in the module.</p>
</div><h3 id='tymethod.declare_table' class='method'><code id='declare_table.v'>fn <a href='#tymethod.declare_table' class='fnname'>declare_table</a>(&amp;mut self, table: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Table.html" title="struct wasmer_clif_fork_wasm::Table">Table</a>)</code></h3><div class='docblock'><p>Declares a table to the environment.</p>
</div><h3 id='tymethod.declare_memory' class='method'><code id='declare_memory.v'>fn <a href='#tymethod.declare_memory' class='fnname'>declare_memory</a>(&amp;mut self, memory: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Memory.html" title="struct wasmer_clif_fork_wasm::Memory">Memory</a>)</code></h3><div class='docblock'><p>Declares a memory to the environment</p>
</div><h3 id='tymethod.declare_global' class='method'><code id='declare_global.v'>fn <a href='#tymethod.declare_global' class='fnname'>declare_global</a>(&amp;mut self, global: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Global.html" title="struct wasmer_clif_fork_wasm::Global">Global</a>)</code></h3><div class='docblock'><p>Declares a global to the environment.</p>
</div><h3 id='tymethod.declare_func_export' class='method'><code id='declare_func_export.v'>fn <a href='#tymethod.declare_func_export' class='fnname'>declare_func_export</a>(&amp;mut self, func_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.FuncIndex.html" title="struct wasmer_clif_fork_wasm::FuncIndex">FuncIndex</a>, name: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code></h3><div class='docblock'><p>Declares a function export to the environment.</p>
</div><h3 id='tymethod.declare_table_export' class='method'><code id='declare_table_export.v'>fn <a href='#tymethod.declare_table_export' class='fnname'>declare_table_export</a>(&amp;mut self, table_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.TableIndex.html" title="struct wasmer_clif_fork_wasm::TableIndex">TableIndex</a>, name: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code></h3><div class='docblock'><p>Declares a table export to the environment.</p>
</div><h3 id='tymethod.declare_memory_export' class='method'><code id='declare_memory_export.v'>fn <a href='#tymethod.declare_memory_export' class='fnname'>declare_memory_export</a>(&amp;mut self, memory_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.MemoryIndex.html" title="struct wasmer_clif_fork_wasm::MemoryIndex">MemoryIndex</a>, name: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code></h3><div class='docblock'><p>Declares a memory export to the environment.</p>
</div><h3 id='tymethod.declare_global_export' class='method'><code id='declare_global_export.v'>fn <a href='#tymethod.declare_global_export' class='fnname'>declare_global_export</a>(&amp;mut self, global_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.GlobalIndex.html" title="struct wasmer_clif_fork_wasm::GlobalIndex">GlobalIndex</a>, name: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code></h3><div class='docblock'><p>Declares a global export to the environment.</p>
</div><h3 id='tymethod.declare_start_func' class='method'><code id='declare_start_func.v'>fn <a href='#tymethod.declare_start_func' class='fnname'>declare_start_func</a>(&amp;mut self, index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.FuncIndex.html" title="struct wasmer_clif_fork_wasm::FuncIndex">FuncIndex</a>)</code></h3><div class='docblock'><p>Declares the optional start function.</p>
</div><h3 id='tymethod.declare_table_elements' class='method'><code id='declare_table_elements.v'>fn <a href='#tymethod.declare_table_elements' class='fnname'>declare_table_elements</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;table_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.TableIndex.html" title="struct wasmer_clif_fork_wasm::TableIndex">TableIndex</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;base: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../wasmer_clif_fork_wasm/struct.GlobalIndex.html" title="struct wasmer_clif_fork_wasm::GlobalIndex">GlobalIndex</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;elements: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="struct" href="../wasmer_clif_fork_wasm/struct.FuncIndex.html" title="struct wasmer_clif_fork_wasm::FuncIndex">FuncIndex</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt;<br>)</code></h3><div class='docblock'><p>Fills a declared table with references to functions in the module.</p>
</div><h3 id='tymethod.define_function_body' class='method'><code id='define_function_body.v'>fn <a href='#tymethod.define_function_body' class='fnname'>define_function_body</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;body_bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'data [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;body_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; <a class="type" href="../wasmer_clif_fork_wasm/type.WasmResult.html" title="type wasmer_clif_fork_wasm::WasmResult">WasmResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></h3><div class='docblock'><p>Provides the contents of a function body.</p>
<p>Note there's no <code>reserve_function_bodies</code> function because the number of
functions is already provided by <code>reserve_func_types</code>.</p>
</div><h3 id='tymethod.declare_data_initialization' class='method'><code id='declare_data_initialization.v'>fn <a href='#tymethod.declare_data_initialization' class='fnname'>declare_data_initialization</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;memory_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.MemoryIndex.html" title="struct wasmer_clif_fork_wasm::MemoryIndex">MemoryIndex</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;base: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../wasmer_clif_fork_wasm/struct.GlobalIndex.html" title="struct wasmer_clif_fork_wasm::GlobalIndex">GlobalIndex</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'data [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><br>)</code></h3><div class='docblock'><p>Fills a declared memory with bytes at module instantiation.</p>
</div></div><span class='loading-content'>Loading content...</span>
<h2 id='provided-methods' class='small-section-header'>Provided methods<a href='#provided-methods' class='anchor'></a></h2><div class='methods'><h3 id='method.reserve_signatures' class='method'><code id='reserve_signatures.v'>fn <a href='#method.reserve_signatures' class='fnname'>reserve_signatures</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></h3><div class='docblock'><p>Provides the number of signatures up front. By default this does nothing, but
implementations can use this to preallocate memory if desired.</p>
</div><h3 id='method.reserve_imports' class='method'><code id='reserve_imports.v'>fn <a href='#method.reserve_imports' class='fnname'>reserve_imports</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></h3><div class='docblock'><p>Provides the number of imports up front. By default this does nothing, but
implementations can use this to preallocate memory if desired.</p>
</div><h3 id='method.finish_imports' class='method'><code id='finish_imports.v'>fn <a href='#method.finish_imports' class='fnname'>finish_imports</a>(&amp;mut self)</code></h3><div class='docblock'><p>Notifies the implementation that all imports have been declared.</p>
</div><h3 id='method.reserve_func_types' class='method'><code id='reserve_func_types.v'>fn <a href='#method.reserve_func_types' class='fnname'>reserve_func_types</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></h3><div class='docblock'><p>Provides the number of defined functions up front. By default this does nothing, but
implementations can use this to preallocate memory if desired.</p>
</div><h3 id='method.reserve_tables' class='method'><code id='reserve_tables.v'>fn <a href='#method.reserve_tables' class='fnname'>reserve_tables</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></h3><div class='docblock'><p>Provides the number of defined tables up front. By default this does nothing, but
implementations can use this to preallocate memory if desired.</p>
</div><h3 id='method.reserve_memories' class='method'><code id='reserve_memories.v'>fn <a href='#method.reserve_memories' class='fnname'>reserve_memories</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></h3><div class='docblock'><p>Provides the number of defined memories up front. By default this does nothing, but
implementations can use this to preallocate memory if desired.</p>
</div><h3 id='method.reserve_globals' class='method'><code id='reserve_globals.v'>fn <a href='#method.reserve_globals' class='fnname'>reserve_globals</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></h3><div class='docblock'><p>Provides the number of defined globals up front. By default this does nothing, but
implementations can use this to preallocate memory if desired.</p>
</div><h3 id='method.reserve_exports' class='method'><code id='reserve_exports.v'>fn <a href='#method.reserve_exports' class='fnname'>reserve_exports</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></h3><div class='docblock'><p>Provides the number of exports up front. By default this does nothing, but
implementations can use this to preallocate memory if desired.</p>
</div><h3 id='method.finish_exports' class='method'><code id='finish_exports.v'>fn <a href='#method.finish_exports' class='fnname'>finish_exports</a>(&amp;mut self)</code></h3><div class='docblock'><p>Notifies the implementation that all exports have been declared.</p>
</div><h3 id='method.reserve_table_elements' class='method'><code id='reserve_table_elements.v'>fn <a href='#method.reserve_table_elements' class='fnname'>reserve_table_elements</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></h3><div class='docblock'><p>Provides the number of element initializers up front. By default this does nothing, but
implementations can use this to preallocate memory if desired.</p>
</div><h3 id='method.reserve_data_initializers' class='method'><code id='reserve_data_initializers.v'>fn <a href='#method.reserve_data_initializers' class='fnname'>reserve_data_initializers</a>(&amp;mut self, _num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></h3><div class='docblock'><p>Provides the number of data initializers up front. By default this does nothing, but
implementations can use this to preallocate memory if desired.</p>
</div></div><span class='loading-content'>Loading content...</span>
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-ModuleEnvironment%3C%27data%3E' class='impl'><code class='in-band'>impl&lt;'data&gt; ModuleEnvironment&lt;'data&gt; for <a class="struct" href="../wasmer_clif_fork_wasm/struct.DummyEnvironment.html" title="struct wasmer_clif_fork_wasm::DummyEnvironment">DummyEnvironment</a></code><a href='#impl-ModuleEnvironment%3C%27data%3E' class='anchor'></a><a class='srclink' href='../src/wasmer_clif_fork_wasm/environ/dummy.rs.html#365-500' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.target_config' class="method hidden"><code id='target_config.v-1'>fn <a href='#method.target_config' class='fnname'>target_config</a>(&amp;self) -&gt; <a class="struct" href="../cranelift_codegen/isa/struct.TargetFrontendConfig.html" title="struct cranelift_codegen::isa::TargetFrontendConfig">TargetFrontendConfig</a></code><a class='srclink' href='../src/wasmer_clif_fork_wasm/environ/dummy.rs.html#366-368' title='goto source code'>[src]</a></h4><h4 id='method.declare_signature' class="method hidden"><code id='declare_signature.v-1'>fn <a href='#method.declare_signature' class='fnname'>declare_signature</a>(&amp;mut self, sig: <a class="struct" href="../cranelift_codegen/ir/extfunc/struct.Signature.html" title="struct cranelift_codegen::ir::extfunc::Signature">Signature</a>)</code><a class='srclink' href='../src/wasmer_clif_fork_wasm/environ/dummy.rs.html#370-372' title='goto source code'>[src]</a></h4><h4 id='method.declare_func_import' class="method hidden"><code id='declare_func_import.v-1'>fn <a href='#method.declare_func_import' class='fnname'>declare_func_import</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;sig_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.SignatureIndex.html" title="struct wasmer_clif_fork_wasm::SignatureIndex">SignatureIndex</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;module: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;field: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>)</code><a class='srclink' href='../src/wasmer_clif_fork_wasm/environ/dummy.rs.html#374-389' title='goto source code'>[src]</a></h4><h4 id='method.declare_func_type' class="method hidden"><code id='declare_func_type.v-1'>fn <a href='#method.declare_func_type' class='fnname'>declare_func_type</a>(&amp;mut self, sig_index: <a class="struct" href="../wasmer_clif_fork_wasm/struct.SignatureIndex.html" title="struct wasmer_clif_fork_wasm::SignatureIndex">SignatureIndex</a>)</code><a class='srclink' href='../src/wasmer_clif_fork_wasm/environ/dummy.rs.html#391-393' title='goto source code'>[src]</a></h4><h4 id='method.declare_global' class="method hidden"><code id='declare_global.v-1'>fn <a href='#method.declare_global' class='fnname'>declare_global</a>(&amp;mut self, global: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Global.html" title="struct wasmer_clif_fork_wasm::Global">Global</a>)</code><a class='srclink' href='../src/wasmer_clif_fork_wasm/environ/dummy.rs.html#395-397' title='goto source code'>[src]</a></h4><h4 id='method.declare_global_import' class="method hidden"><code id='declare_global_import.v-1'>fn <a href='#method.declare_global_import' class='fnname'>declare_global_import</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;global: <a class="struct" href="../wasmer_clif_fork_wasm/struct.Global.html" title="struct wasmer_clif_fork_wasm::Global">Global</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;module: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;field: &amp;'data <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>)</code><a class='srclink' href='../src/wasmer_clif_fork_wasm/environ/dummy.rs.html#399-404' tit
src="../implementors/wasmer_clif_fork_wasm/trait.ModuleEnvironment.js">
</script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "wasmer_clif_fork_wasm";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>