Skip to content

Commit

Permalink
deploy: 88ffb5d
Browse files Browse the repository at this point in the history
  • Loading branch information
xdoardo committed Jan 2, 2025
1 parent b84df63 commit 5407a11
Show file tree
Hide file tree
Showing 25 changed files with 84 additions and 60 deletions.
56 changes: 40 additions & 16 deletions crates/doc/src/wasmer_cli/commands/create_exe.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -2327,6 +2327,18 @@
<a href="#2327" id="2327">2327</a>
<a href="#2328" id="2328">2328</a>
<a href="#2329" id="2329">2329</a>
<a href="#2330" id="2330">2330</a>
<a href="#2331" id="2331">2331</a>
<a href="#2332" id="2332">2332</a>
<a href="#2333" id="2333">2333</a>
<a href="#2334" id="2334">2334</a>
<a href="#2335" id="2335">2335</a>
<a href="#2336" id="2336">2336</a>
<a href="#2337" id="2337">2337</a>
<a href="#2338" id="2338">2338</a>
<a href="#2339" id="2339">2339</a>
<a href="#2340" id="2340">2340</a>
<a href="#2341" id="2341">2341</a>
</pre></div><pre class="rust"><code><span class="doccomment">//! Create a standalone native executable for a given Wasm file.

</span><span class="kw">use </span><span class="self">self</span>::utils::normalize_atom_name;
Expand Down Expand Up @@ -4044,52 +4056,62 @@
}

<span class="kw">fn </span>filter_tarball_internal(p: <span class="kw-2">&amp;</span>Path, target: <span class="kw-2">&amp;</span>Triple) -&gt; <span class="prelude-ty">Option</span>&lt;bool&gt; {
<span class="kw">if </span>!p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>.ends_with(<span class="string">".tar.gz"</span>) {
<span class="comment">// [todo]: Move this description to a better suited place.
//
// The filename scheme:
// FILENAME := "wasmer-" [ FEATURE ] OS PLATFORM .
// FEATURE := "wamr-" | "v8-" | "wasmi-" .
// OS := "darwin" | "linux" | "linux-musl" | "windows" .
// PLATFORM := "aarch64" | "amd64" | "gnu64" .
//
// In this function we want to select only those version where features don't appear.

</span><span class="kw">let </span>filename = p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>;

<span class="kw">if </span>!filename.ends_with(<span class="string">".tar.gz"</span>) {
<span class="kw">return </span><span class="prelude-val">None</span>;
}

<span class="kw">if </span>target.environment == Environment::Musl &amp;&amp; !p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>.contains(<span class="string">"musl"</span>)
|| p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>.contains(<span class="string">"musl"</span>) &amp;&amp; target.environment != Environment::Musl
<span class="kw">if </span>filename.contains(<span class="string">"wamr"</span>) || filename.contains(<span class="string">"v8"</span>) || filename.contains(<span class="string">"wasmi"</span>) {
<span class="kw">return </span><span class="prelude-val">None</span>;
}

<span class="kw">if </span>target.environment == Environment::Musl &amp;&amp; !filename.contains(<span class="string">"musl"</span>)
|| filename.contains(<span class="string">"musl"</span>) &amp;&amp; target.environment != Environment::Musl
{
<span class="kw">return </span><span class="prelude-val">None</span>;
}

<span class="kw">if let </span>Architecture::Aarch64(<span class="kw">_</span>) = target.architecture {
<span class="kw">if </span>!(p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>.contains(<span class="string">"aarch64"</span>)
|| p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>.contains(<span class="string">"arm64"</span>))
{
<span class="kw">if </span>!(filename.contains(<span class="string">"aarch64"</span>) || filename.contains(<span class="string">"arm64"</span>)) {
<span class="kw">return </span><span class="prelude-val">None</span>;
}
}

<span class="kw">if let </span>Architecture::X86_64 = target.architecture {
<span class="kw">if </span>target.operating_system == OperatingSystem::Windows {
<span class="kw">if </span>!p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>.contains(<span class="string">"gnu64"</span>) {
<span class="kw">if </span>!filename.contains(<span class="string">"gnu64"</span>) {
<span class="kw">return </span><span class="prelude-val">None</span>;
}
} <span class="kw">else if </span>!(p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>.contains(<span class="string">"x86_64"</span>)
|| p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>.contains(<span class="string">"amd64"</span>))
{
} <span class="kw">else if </span>!(filename.contains(<span class="string">"x86_64"</span>) || filename.contains(<span class="string">"amd64"</span>)) {
<span class="kw">return </span><span class="prelude-val">None</span>;
}
}

<span class="kw">if let </span>OperatingSystem::Windows = target.operating_system {
<span class="kw">if </span>!p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>.contains(<span class="string">"windows"</span>) {
<span class="kw">if </span>!filename.contains(<span class="string">"windows"</span>) {
<span class="kw">return </span><span class="prelude-val">None</span>;
}
}

<span class="kw">if let </span>OperatingSystem::Darwin = target.operating_system {
<span class="kw">if </span>!(p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>.contains(<span class="string">"apple"</span>)
|| p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>.contains(<span class="string">"darwin"</span>))
{
<span class="kw">if </span>!(filename.contains(<span class="string">"apple"</span>) || filename.contains(<span class="string">"darwin"</span>)) {
<span class="kw">return </span><span class="prelude-val">None</span>;
}
}

<span class="kw">if let </span>OperatingSystem::Linux = target.operating_system {
<span class="kw">if </span>!p.file_name()<span class="question-mark">?</span>.to_str()<span class="question-mark">?</span>.contains(<span class="string">"linux"</span>) {
<span class="kw">if </span>!filename.contains(<span class="string">"linux"</span>) {
<span class="kw">return </span><span class="prelude-val">None</span>;
}
}
Expand Down Expand Up @@ -4459,6 +4481,8 @@

<span class="kw">let </span>status = response.status();

<span class="macro">log::info!</span>(<span class="string">"GitHub api response status: {status}"</span>);

<span class="kw">let </span>body = response
.bytes()
.map_err(anyhow::Error::new)
Expand Down Expand Up @@ -4558,7 +4582,7 @@

<span class="kw">if </span>assets.len() != <span class="number">1 </span>{
<span class="kw">return </span><span class="prelude-val">Err</span>(<span class="macro">anyhow!</span>(
<span class="string">"GitHub API: more that one release selected for target {target_triple}: {assets:?}"
<span class="string">"GitHub API: more than one release selected for target {target_triple}: {assets:#?}"
</span>));
}

Expand Down
2 changes: 1 addition & 1 deletion crates/doc/wasmer/engine/trait.CompilerConfig.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
deterministically across different architectures.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.default_features_for_target" class="method"><h4 class="code-header">fn <a href="#method.default_features_for_target" class="fn">default_features_for_target</a>(&amp;self, _target: &amp;<a class="struct" href="../struct.Target.html" title="struct wasmer::Target">Target</a>) -&gt; <a class="struct" href="../sys/struct.Features.html" title="struct wasmer::sys::Features">Features</a></h4></section></summary><div class="docblock"><p>Gets the default features for this compiler in the given target</p>
</div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CT%3E-for-Box%3Cdyn+CompilerConfig%3E" class="impl"><a href="#impl-From%3CT%3E-for-Box%3Cdyn+CompilerConfig%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.81.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for <a class="struct" href="https://doc.rust-lang.org/1.81.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../sys/trait.CompilerConfig.html" title="trait wasmer::sys::CompilerConfig">CompilerConfig</a>&gt;<div class="where">where
T: <a class="trait" href="../sys/trait.CompilerConfig.html" title="trait wasmer::sys::CompilerConfig">CompilerConfig</a> + 'static,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.81.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(other: T) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.81.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../sys/trait.CompilerConfig.html" title="trait wasmer::sys::CompilerConfig">CompilerConfig</a>&gt;</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-CompilerConfig-for-Cranelift" class="impl"><a class="src rightside" href="../../src/wasmer_compiler_cranelift/config.rs.html#190">source</a><a href="#impl-CompilerConfig-for-Cranelift" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../sys/trait.CompilerConfig.html" title="trait wasmer::sys::CompilerConfig">CompilerConfig</a> for <a class="struct" href="../sys/struct.Cranelift.html" title="struct wasmer::sys::Cranelift">Cranelift</a></h3></section><section id="impl-CompilerConfig-for-LLVM" class="impl"><a class="src rightside" href="../../src/wasmer_compiler_llvm/config.rs.html#266">source</a><a href="#impl-CompilerConfig-for-LLVM" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../sys/trait.CompilerConfig.html" title="trait wasmer::sys::CompilerConfig">CompilerConfig</a> for <a class="struct" href="../sys/struct.LLVM.html" title="struct wasmer::sys::LLVM">LLVM</a></h3></section><section id="impl-CompilerConfig-for-Singlepass" class="impl"><a href="#impl-CompilerConfig-for-Singlepass" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../sys/trait.CompilerConfig.html" title="trait wasmer::sys::CompilerConfig">CompilerConfig</a> for <a class="struct" href="../sys/struct.Singlepass.html" title="struct wasmer::sys::Singlepass">Singlepass</a></h3></section></div><script src="../../trait.impl/wasmer_compiler/compiler/trait.CompilerConfig.js" data-ignore-extern-crates="wasmer_compiler_singlepass,wasmer_compiler_cranelift,wasmer_compiler_llvm" async></script></section></div></main></body></html>
T: <a class="trait" href="../sys/trait.CompilerConfig.html" title="trait wasmer::sys::CompilerConfig">CompilerConfig</a> + 'static,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.81.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(other: T) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.81.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../sys/trait.CompilerConfig.html" title="trait wasmer::sys::CompilerConfig">CompilerConfig</a>&gt;</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-CompilerConfig-for-Cranelift" class="impl"><a href="#impl-CompilerConfig-for-Cranelift" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../sys/trait.CompilerConfig.html" title="trait wasmer::sys::CompilerConfig">CompilerConfig</a> for <a class="struct" href="../sys/struct.Cranelift.html" title="struct wasmer::sys::Cranelift">Cranelift</a></h3></section><section id="impl-CompilerConfig-for-LLVM" class="impl"><a href="#impl-CompilerConfig-for-LLVM" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../sys/trait.CompilerConfig.html" title="trait wasmer::sys::CompilerConfig">CompilerConfig</a> for <a class="struct" href="../sys/struct.LLVM.html" title="struct wasmer::sys::LLVM">LLVM</a></h3></section><section id="impl-CompilerConfig-for-Singlepass" class="impl"><a href="#impl-CompilerConfig-for-Singlepass" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../sys/trait.CompilerConfig.html" title="trait wasmer::sys::CompilerConfig">CompilerConfig</a> for <a class="struct" href="../sys/struct.Singlepass.html" title="struct wasmer::sys::Singlepass">Singlepass</a></h3></section></div><script src="../../trait.impl/wasmer_compiler/compiler/trait.CompilerConfig.js" data-ignore-extern-crates="wasmer_compiler_singlepass,wasmer_compiler_cranelift,wasmer_compiler_llvm" async></script></section></div></main></body></html>
2 changes: 1 addition & 1 deletion crates/doc/wasmer/sys/engine/struct.Engine.html

Large diffs are not rendered by default.

Loading

0 comments on commit 5407a11

Please sign in to comment.