Ubiquity.NET.InteropHelpers
20.1.8-alpha.0.2
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
<PackageReference Include="Ubiquity.NET.InteropHelpers" Version="20.1.8-alpha.0.2" />
<PackageVersion Include="Ubiquity.NET.InteropHelpers" Version="20.1.8-alpha.0.2" />
<PackageReference Include="Ubiquity.NET.InteropHelpers" />
paket add Ubiquity.NET.InteropHelpers --version 20.1.8-alpha.0.2
#r "nuget: Ubiquity.NET.InteropHelpers, 20.1.8-alpha.0.2"
#:package Ubiquity.NET.InteropHelpers@20.1.8-alpha.0.2
#addin nuget:?package=Ubiquity.NET.InteropHelpers&version=20.1.8-alpha.0.2&prerelease
#tool nuget:?package=Ubiquity.NET.InteropHelpers&version=20.1.8-alpha.0.2&prerelease
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 anin
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.
- 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
- 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 | Versions 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. |
-
net9.0
- Ubiquity.NET.Extensions (>= 20.1.8-alpha.0.2)
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 |