Ubiquity.NET.InteropHelpers 20.1.8-alpha.0.2

This is a prerelease version of Ubiquity.NET.InteropHelpers.

Requires NuGet 4.9.0 or higher.

dotnet add package Ubiquity.NET.InteropHelpers --version 20.1.8-alpha.0.2
                    
NuGet\Install-Package Ubiquity.NET.InteropHelpers -Version 20.1.8-alpha.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ubiquity.NET.InteropHelpers" Version="20.1.8-alpha.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ubiquity.NET.InteropHelpers" Version="20.1.8-alpha.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Ubiquity.NET.InteropHelpers" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ubiquity.NET.InteropHelpers --version 20.1.8-alpha.0.2
                    
#r "nuget: Ubiquity.NET.InteropHelpers, 20.1.8-alpha.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ubiquity.NET.InteropHelpers@20.1.8-alpha.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ubiquity.NET.InteropHelpers&version=20.1.8-alpha.0.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Ubiquity.NET.InteropHelpers&version=20.1.8-alpha.0.2&prerelease
                    
Install as a Cake Tool

About

Ubiquity.NET.InteropHelpers helper support common to low level interop libraries. While this library is intended to support the Ubiquity.NET.Llvm interop requirements there isn't anything bound to that library in the support here. That is it is independent and a useful library for any code base providing interop support.

Key Features

  • String handling
    • A lot of interop deals with strings in some form or another and handling them is a major amount of effort for most interop libraries. The support provided here enables lazy evaluation/marshalling and encoding of native strings and managed strings. These allow a simple byte[] to store a native string and ONLY marshals to a UTF16 managed string once when needed. This allows storing and passing strings in their native form for FAST retrieval from a native call and then providing that same string as an in parameter in another call. All without the need to marshal from native and then back again just for the call. This is a MAJOR performance enhancement for APIs that deal in strings.
  • Delegates and NativeCallbacks as Function pointers
    • Function pointers are a new feature of C# that makes for very high performance interop scenarios. However, sometimes the callback for a function pointer actually needs additional data not part of the parameters of the function to work properly. This library provides support for such scenarios where a delegate is used to "capture" the data while still supporting AOT scenarios. (NOTE: Marshal.GetFunctionPointerForDelegate() must dynamically emit a thunk that contains the proper signature and the captured "this" pointer so is NOT AOT friendly) The support offered in this library, though a bit more tedious, is AOT friendly.
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Ubiquity.NET.InteropHelpers:

Package Downloads
Ubiquity.NET.Llvm.Interop

.NET Low Level Interop Bindings for Ubiquity.LibLLVM []. Direct use of this low level API is **STRONGLY** discouraged, instead you should use the Ubiquity.NET.Llvm package, which provides a full C# object model projection of the LLVM APIs on top of this library.

Ubiquity.NET.Runtime.Utils

General use Support for interpreters/runtimes

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
20.1.8-alpha.0.2 488 7/22/2025
20.1.8-alpha.0.1 21 7/18/2025
20.1.8-alpha 113 7/16/2025