.NET Low Level Interop support library to aid in native code interop scenarios
$ dotnet add package Ubiquity.NET.InteropHelpersUbiquity.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.
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.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.[!NOTE] The .NET Standard 2.0 build of this library is reduced in functionality to what is supported in that runtime. This include all of the source generated marshaling that is available in .NET7+. There's no support for poly filling such a thing.