Skip to content

Commit

Permalink
deploy: becf35f
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbinth committed Aug 10, 2023
1 parent 3b6f964 commit 74cb401
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
9 changes: 9 additions & 0 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,15 @@ <h4 id="importing-modules"><a class="header" href="#importing-modules">Importing
end
</code></pre>
<p>In the above example we import <code>std::math::u64</code> module from the <a href="user_docs/assembly/../stdlib/main.html">standard library</a>. We then execute a program which pushes two 64-bit integers onto the stack, and then invokes a 64-bit addition procedure from the imported module.</p>
<p>We can also define aliases for imported modules. For example:</p>
<pre><code>use.std::math::u64-&gt;bigint

begin
push.1.0
push.2.0
exec.bigint::checked_add
end
</code></pre>
<p>The set of modules which can be imported by a program can be specified via a Module Provider when instantiating the <a href="https://crates.io/crates/miden-assembly">Miden Assembler</a> used to compile the program.</p>
<h4 id="re-exporting-procedures"><a class="header" href="#re-exporting-procedures">Re-exporting procedures</a></h4>
<p>A procedure defined in one module can be re-exported from a different module under the same or a different name. For example:</p>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.json

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions user_docs/assembly/code_organization.html
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,15 @@ <h4 id="importing-modules"><a class="header" href="#importing-modules">Importing
end
</code></pre>
<p>In the above example we import <code>std::math::u64</code> module from the <a href="../stdlib/main.html">standard library</a>. We then execute a program which pushes two 64-bit integers onto the stack, and then invokes a 64-bit addition procedure from the imported module.</p>
<p>We can also define aliases for imported modules. For example:</p>
<pre><code>use.std::math::u64-&gt;bigint

begin
push.1.0
push.2.0
exec.bigint::checked_add
end
</code></pre>
<p>The set of modules which can be imported by a program can be specified via a Module Provider when instantiating the <a href="https://crates.io/crates/miden-assembly">Miden Assembler</a> used to compile the program.</p>
<h4 id="re-exporting-procedures"><a class="header" href="#re-exporting-procedures">Re-exporting procedures</a></h4>
<p>A procedure defined in one module can be re-exported from a different module under the same or a different name. For example:</p>
Expand Down

0 comments on commit 74cb401

Please sign in to comment.