NativeInterop 3.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package NativeInterop --version 3.0.0
NuGet\Install-Package NativeInterop -Version 3.0.0
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="NativeInterop" Version="3.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NativeInterop --version 3.0.0
#r "nuget: NativeInterop, 3.0.0"
#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.
// Install NativeInterop as a Cake Addin
#addin nuget:?package=NativeInterop&version=3.0.0

// Install NativeInterop as a Cake Tool
#tool nuget:?package=NativeInterop&version=3.0.0

Provides generic pointer operations for all of .NET, building on the capabilities provided by FSharp.NativeInterop.NativePtr, which this package extends with features like 64-bit capabilities, exposed in an OOP-friendly manner as NativePtr<T> and extension methods to System.IntPtr.

NativeArray, an array-like collection of items of unmanaged (blittable) type allocated on the unmanaged heap, supports 64-bit addressing and item access with and without bounds checks, utilizing the CPU's AGUs for address offset calculation where possible.

The included System.IO.Stream extension methods as well as the Buffer and Structure modules enable easy and efficient handling of structured binary data (convert array types, convert structs, access structs in an element-wise fashion, memcpy...).

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.1 is compatible.  netstandard1.2 was computed.  netstandard1.3 was computed.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed. 
.NET Framework net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Windows Phone wpa81 was computed. 
Windows Store netcore was computed.  netcore45 was computed.  netcore451 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on NativeInterop:

Package Downloads

Provides SIMD-accelerated operations (create, init, map, ...) on native arrays provided by the NativeInterop package Note for F# Users: The System.Numerics.Vectors package doesn't work out of the box for F# projects. Make sure to MANUALLY ADD <HintPath>..\packages\System.Numerics.Vectors.4.1.1\lib\net46\System.Numerics.Vectors.dll</HintPath> to the reference in your fsproj file!

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.2.0 2,075 2/24/2017
3.1.0 1,174 11/14/2016
3.0.2 950 11/7/2016
3.0.0 1,050 11/4/2016
2.4.3 1,088 4/17/2016
2.4.2 962 4/15/2016
2.4.1 985 3/5/2016
2.4.0 1,266 6/3/2015
2.3.5 1,187 4/28/2015
2.3.2 1,167 8/20/2014
2.3.1 1,080 7/10/2014
2.3.0 1,072 7/9/2014
2.2.1 1,082 7/2/2014
2.2.0 1,063 7/2/2014
2.1.0 1,116 6/20/2014
2.0.0 1,122 5/23/2014
1.4.1 1,134 5/18/2014
1.4.0 1,119 5/18/2014
1.2.1 1,367 4/28/2014
1.1.1 1,252 4/12/2014
1.1.0 1,283 4/12/2014
1.0.0 1,231 4/11/2014

major release - includes breaking changes to the API surface

   - all modules, classes and functions have been moved to namespace NativeInteropEx to avoid name clashes with FSharp.NativeInterop
   - .NET Standard 1.1 compatibility
   - Improved XML doc comments for all types and functions

   - NativePtr is now an F#-specific module containing inlined compile-time generic functions; use IntPtrEx instead if calling from other languages like C#
   - changed order of arguments of multiple functions
   - added functions ofNativeInt, toNativeInt and stackalloc
   - fixed ctor throws on length == 0

   - ctor now accepts ilsigptr<T> (typed native CLR pointer)

IntPtrEx (new):
   - maps the functionality of NativePtr to IntPtr extension methods for use from non-F# languages

   - added functions write, get and set
   - renamed function convert to read
   - removed obsolete APIs
   - eliminated use of inline IL; as a consequence, some arguments need to be passed by reference (which makes sense to avoid copies due to pass by value anyhow)

   - added function toStructureWithOffset (method ToStructure)    
   - memcpy (Copy): length argument is now of type nativeint (IntPtr)
   - removed obsolete APIs
   - removed duplicate APIs also found in Structure
   - renamed Convert to Copy (overloaded)

   - renamed from NativeArray64
   - type parameter further constrained to conform with System.Numerics.Vector<T> (in preparation for SIMD support)
   - enabled bounds check for all indexers in debug mode
   - more efficient indexer
   - added At indexed property which always performs bounds checking
   - added Get/Set methods for bounds-checked access from languages that don't support indexed properties
   - simplified IDisposable implementation
   - added specialized struct-based IEnumerator implementation, replaces Items property    

   - ofArray uses Buffer.memcpy to initialize the new NativeArray
   - zeroCreate now takes an explicit type parameter
   - all higher order functions are now inline
   - generalized type signatures
   - added multiple functions (fold2, prod, sum, dot, ...)
   - added RequireQualifiedAccess attribute
   - implemented extension methods for use from C# etc.

ReinterpretCast<T, U>:
   - added indexer (forwards to NativePtr<U>.Item)
   - simplified IDisposable implementation

   - Re-implemented readStructureArray to read structs one-by-one instead of creating a giant buffer