Skip to content

Commit

Permalink
Built artifacts of 35bcf8a [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
mhammond committed Dec 11, 2023
1 parent 07f3893 commit 41969b8
Show file tree
Hide file tree
Showing 372 changed files with 1,013 additions and 1,490 deletions.
1 change: 0 additions & 1 deletion futures.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ <h2 id="example"><a class="header" href="#example">Example</a></h2>
<p>This code uses <code>asyncio</code> to drive the future to completion, while our exposed function is used with <code>await</code>.</p>
<p>In Rust <code>Future</code> terminology this means the foreign bindings supply the &quot;executor&quot; - think event-loop, or async runtime. In this example it's <code>asyncio</code>. There's no requirement for a Rust event loop.</p>
<p>There are <a href="https://docs.rs/uniffi_core/latest/uniffi_core/ffi/rustfuture/index.html">some great API docs</a> on the implementation that are well worth a read.</p>
<p>See the <a href="https://github.com/mozilla/uniffi-rs/tree/main/fixtures/foreign-executor">foreign-executor fixture</a> for more implementation details.</p>

</main>

Expand Down
2 changes: 1 addition & 1 deletion internals/api/implementors/core/fmt/trait.Debug.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internals/api/implementors/core/marker/trait.Freeze.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internals/api/implementors/core/marker/trait.Send.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internals/api/implementors/core/marker/trait.Sync.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internals/api/implementors/core/marker/trait.Unpin.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions internals/api/search-index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internals/api/source-files.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -566,10 +566,6 @@
<a href="#566" id="566">566</a>
<a href="#567" id="567">567</a>
<a href="#568" id="568">568</a>
<a href="#569" id="569">569</a>
<a href="#570" id="570">570</a>
<a href="#571" id="571">571</a>
<a href="#572" id="572">572</a>
</pre></div><pre class="rust"><code><span class="comment">/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Expand All @@ -592,7 +588,6 @@
<span class="kw">mod </span>compounds;
<span class="kw">mod </span>custom;
<span class="kw">mod </span>enum_;
<span class="kw">mod </span>executor;
<span class="kw">mod </span>external;
<span class="kw">mod </span>miscellany;
<span class="kw">mod </span>object;
Expand Down Expand Up @@ -905,8 +900,6 @@
}
FfiType::ForeignBytes =&gt; <span class="string">&quot;ForeignBytes.ByValue&quot;</span>.to_string(),
FfiType::ForeignCallback =&gt; <span class="string">&quot;ForeignCallback&quot;</span>.to_string(),
FfiType::ForeignExecutorHandle =&gt; <span class="string">&quot;USize&quot;</span>.to_string(),
FfiType::ForeignExecutorCallback =&gt; <span class="string">&quot;UniFfiForeignExecutorCallback&quot;</span>.to_string(),
FfiType::RustFutureHandle =&gt; <span class="string">&quot;Pointer&quot;</span>.to_string(),
FfiType::RustFutureContinuationCallback =&gt; {
<span class="string">&quot;UniFffiRustFutureContinuationCallbackType&quot;</span>.to_string()
Expand Down Expand Up @@ -974,7 +967,6 @@
Type::CallbackInterface { name, .. } =&gt; {
Box::new(callback_interface::CallbackInterfaceCodeType::new(name))
}
Type::ForeignExecutor =&gt; Box::new(executor::ForeignExecutorCodeType),
Type::Optional { inner_type } =&gt; {
Box::new(compounds::OptionalCodeType::new(<span class="kw-2">*</span>inner_type))
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,8 @@
<a href="#521" id="521">521</a>
<a href="#522" id="522">522</a>
<a href="#523" id="523">523</a>
<a href="#524" id="524">524</a>
<a href="#525" id="525">525</a>
</pre></div><pre class="rust"><code><span class="comment">/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Expand All @@ -543,7 +545,6 @@
<span class="kw">mod </span>compounds;
<span class="kw">mod </span>custom;
<span class="kw">mod </span>enum_;
<span class="kw">mod </span>executor;
<span class="kw">mod </span>external;
<span class="kw">mod </span>miscellany;
<span class="kw">mod </span>object;
Expand Down Expand Up @@ -881,9 +882,7 @@
FfiType::ForeignBytes =&gt; <span class="string">&quot;_UniffiForeignBytes&quot;</span>.to_string(),
FfiType::ForeignCallback =&gt; <span class="string">&quot;_UNIFFI_FOREIGN_CALLBACK_T&quot;</span>.to_string(),
<span class="comment">// Pointer to an `asyncio.EventLoop` instance
</span>FfiType::ForeignExecutorHandle =&gt; <span class="string">&quot;ctypes.c_size_t&quot;</span>.to_string(),
FfiType::ForeignExecutorCallback =&gt; <span class="string">&quot;_UNIFFI_FOREIGN_EXECUTOR_CALLBACK_T&quot;</span>.to_string(),
FfiType::RustFutureHandle =&gt; <span class="string">&quot;ctypes.c_void_p&quot;</span>.to_string(),
</span>FfiType::RustFutureHandle =&gt; <span class="string">&quot;ctypes.c_void_p&quot;</span>.to_string(),
FfiType::RustFutureContinuationCallback =&gt; <span class="string">&quot;_UNIFFI_FUTURE_CONTINUATION_T&quot;</span>.to_string(),
FfiType::RustFutureContinuationData =&gt; <span class="string">&quot;ctypes.c_size_t&quot;</span>.to_string(),
}
Expand Down Expand Up @@ -942,7 +941,6 @@
Type::CallbackInterface { name, .. } =&gt; {
Box::new(callback_interface::CallbackInterfaceCodeType::new(name))
}
Type::ForeignExecutor =&gt; Box::new(executor::ForeignExecutorCodeType),
Type::Optional { inner_type } =&gt; {
Box::new(compounds::OptionalCodeType::new(<span class="kw-2">*</span>inner_type))
}
Expand Down Expand Up @@ -1002,6 +1000,12 @@
<span class="prelude-val">Ok</span>(as_ct.as_codetype().literal(literal))
}

<span class="comment">// Get the idiomatic Python rendering of an individual enum variant&#39;s discriminant
</span><span class="kw">pub fn </span>variant_discr_literal(e: <span class="kw-2">&amp;</span>Enum, index: <span class="kw-2">&amp;</span>usize) -&gt; <span class="prelude-ty">Result</span>&lt;String, askama::Error&gt; {
<span class="kw">let </span>literal = e.variant_discr(<span class="kw-2">*</span>index).expect(<span class="string">&quot;invalid index&quot;</span>);
<span class="prelude-val">Ok</span>(Type::UInt64.as_codetype().literal(<span class="kw-2">&amp;</span>literal))
}

<span class="kw">pub fn </span>ffi_type_name(type_: <span class="kw-2">&amp;</span>FfiType) -&gt; <span class="prelude-ty">Result</span>&lt;String, askama::Error&gt; {
<span class="prelude-val">Ok</span>(PythonCodeOracle::ffi_type_label(type_))
}
Expand Down
Loading

0 comments on commit 41969b8

Please sign in to comment.