Mir 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Mir --version 1.0.0
                    
NuGet\Install-Package Mir -Version 1.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="Mir" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mir" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Mir" />
                    
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 Mir --version 1.0.0
                    
#r "nuget: Mir, 1.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.
#:package Mir@1.0.0
                    
#: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=Mir&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Mir&version=1.0.0
                    
Install as a Cake Tool

mir.net

.NET Implementation of Mir Ref-Counted Type System (MTS)

Features

  • Fast generic types and handles that are easy to construct, use, and pass between managed and unmanaged code.
  • Faster then Protocol Buffers as well as any other serialization library because it is complitely zero-copy.
  • Requires at least twice less user code comparing with Protocol Buffers.
  • D and C++ implementations are provided via Mir Algorithm
  • D, C++, and C# MTS implementations are self-contained. C# implementation requires neither Mir Algorithm nor D/C/C++ runtimes.
  • Hands-free. Just construct, pass, and forget. Mir objects hold all required information to destroy them and free memory.

The library is used in a large private codebase.

Install with NuGet

Basic Types

  • Array
  • Array slices
  • Matrices
  • Sorted dictionaries (Series)
  • Slim shared pointers
  • Shared Pointers with inheritance
  • POD small strings

Composed user-defined types

Mir types can be composed using other Mir types and C# POD types that don't require special marshaling. MirWrapper is a base class for all non-POD library and user-defined Mir types. It requires the structure payload (Impl) to be defined.

MirPtr and MirSlimPtr can be used to wrap a native type without defining its structure payload in C#.

Table of correspondence

(check the source repository if the table isn't rendered correctly because of the nuget issue)

D Type C# Type C++ Type
SlimRCPtr!Type MirSlimPtr<Type> mir_slim_rcptr<Type>
RCPtr!Type MirPtr<Type> mir_rcptr<Type>
RCArray!Type MirArray<Type, @> ×2 mir_rcarray<Type>
Slice!(RCI!Type) Slice<Type> ×2 mir_slice<mir_rci<Type>>
Slice!(RCI!Type, 2) Matrix<Type> ×2 mir_slice<mir_rci<Type>, 2>
Slice!(Type*) SliceView<Type, @> ×2 mir_slice<Type*>
Series!(RCI!Key, RCI!Value) Series<Key, Value, @> ×2 mir_series<mir_rci<Key>, mir_rci<Value>>
SmallString!N SmallStringN, N=4,31,32,64,128 mir::SmallString<N>
Series!(RCI!(RCArray!(const char)), RCI!Value) StringSeries<Value> mir_series<mir_rci<mir_rcarray<const char>>, mir_rci<Value>>

Name<... , @> ×2 - means a type has two declarations, Name<... > and Name<... , Impl>, where Impl is an unmanaged C# handle structure that describes non-POD Mir Type.

Composed Mir Type (CMT) is a type that is composed of CMT fields, library RefCounted fields, and POD structures and types.

Unmanaged C# handles should use byte instead of bool.

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.  net9.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework 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 tizen40 was computed.  tizen60 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.13 316 7/14/2023
1.0.12 419 5/15/2023
1.0.11 299 5/13/2023
1.0.10 536 3/7/2023
1.0.9 788 4/20/2022
1.0.8 587 4/20/2022
1.0.7 642 3/29/2022
1.0.6 591 3/27/2022
1.0.5 596 3/24/2022
1.0.4 595 3/24/2022
1.0.3 577 3/23/2022
1.0.2 738 3/18/2022
1.0.1 764 8/28/2020
1.0.0 680 4/23/2020