<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ffi on Strathweb. A free flowing tech monologue.</title>
    <link>https://www.strathweb.com/categories/ffi/</link>
    <description>Recent content in Ffi on Strathweb. A free flowing tech monologue.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 09 May 2024 07:06:14 +0000</lastBuildDate><atom:link href="https://www.strathweb.com/categories/ffi/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Running Microsoft&#39;s Phi-3 Model in an iOS app with Rust</title>
      <link>https://www.strathweb.com/2024/05/running-microsoft-phi-3-model-in-an-ios-app-with-rust/</link>
      <pubDate>Thu, 09 May 2024 07:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2024/05/running-microsoft-phi-3-model-in-an-ios-app-with-rust/</guid>
      <description>&lt;p&gt;Last month, &lt;a href=&#34;https://azure.microsoft.com/en-us/blog/introducing-phi-3-redefining-whats-possible-with-slms/&#34;&gt;Microsoft released&lt;/a&gt; the exciting new minimal AI model, Phi-3 mini. It&amp;rsquo;s a 3.8B model that can outperform many other larger models, while still being small enough to run on a phone. In this post, we&amp;rsquo;ll explore how to run the Phi-3 model inside a SwiftUI iOS application using the minimalist ML framework for Rust, called &lt;a href=&#34;https://github.com/huggingface/candle&#34;&gt;candle&lt;/a&gt;, and built by the nice folks at HuggingFace.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet WASI applications in .NET 8.0</title>
      <link>https://www.strathweb.com/2023/09/dotnet-wasi-applications-in-net-8-0/</link>
      <pubDate>Wed, 27 Sep 2023 09:06:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/09/dotnet-wasi-applications-in-net-8-0/</guid>
      <description>&lt;p&gt;At the end of &lt;a href=&#34;https://www.strathweb.com/2022/12/dotnet-wasi-applications-in-the-cloud/&#34;&gt;last year&lt;/a&gt; I blogged about using .NET 7 and the prototype &lt;a href=&#34;https://github.com/SteveSandersonMS/dotnet-wasi-sdk&#34;&gt;dotnet WASI SDK&lt;/a&gt; from Steve Sanderson to build WASM-WASI applications. That SDK is now deprecated and the WASI workload has instead been integrated into the main .NET 8, which will ship in November this year. The workload is still flagged as experimental, but there is now commitment from the .NET runtime and SDK teams to make the WASM-WASI experience first class in .NET.&lt;/p&gt;
&lt;p&gt;In this post we will explore where this workload is at today, and what we can and can&amp;rsquo;t do with it at this stage.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Calling Rust code from Swift on iOS and macOS</title>
      <link>https://www.strathweb.com/2023/07/calling-rust-code-from-swift/</link>
      <pubDate>Tue, 25 Jul 2023 08:00:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/07/calling-rust-code-from-swift/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://www.strathweb.com/2023/06/calling-rust-code-from-csharp/&#34;&gt;last post&lt;/a&gt; we covered how &lt;a href=&#34;https://github.com/mozilla/uniffi-rs&#34;&gt;UniFFI&lt;/a&gt; can be used to elegantly create C bindings and generate bridge C# code that allows for calling native code written in Rust from a C# program. Today, we are going to build upon that, and we will show - in a true cross platform fashion - how the same core Rust library we used last time around, and the same toolchain that we have already set up, can be used to generate similar bindings for Swift. This will enable us to reuse our native Rust code in an iOS or macOS application.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Calling Rust code from C#</title>
      <link>https://www.strathweb.com/2023/06/calling-rust-code-from-csharp/</link>
      <pubDate>Thu, 22 Jun 2023 08:00:14 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2023/06/calling-rust-code-from-csharp/</guid>
      <description>&lt;p&gt;There are plenty of reasons to be excited about Rust. Rust provides cross-platform compatibility and can compile to nearly any platform, including Windows, iOS, Android, and many more. One of Rust&amp;rsquo;s core features is its focus on memory safety. It accomplishes this through its ownership model, which helps prevent common bugs such as null pointer dereferencing, dangling pointers, and data races.&lt;/p&gt;
&lt;p&gt;All of this makes Rust an excellent alternative to C++/C for implementing shared logic and algorithms, spanning many different platforms.&lt;/p&gt;
&lt;p&gt;In this post we shall see how we can integrate Rust into program written in C# - and how a native library built with Rust can be called into from a .NET application.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
