OutWit.Communication.Serializers.ProtoBuf 3.1.0

dotnet add package OutWit.Communication.Serializers.ProtoBuf --version 3.1.0
                    
NuGet\Install-Package OutWit.Communication.Serializers.ProtoBuf -Version 3.1.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="OutWit.Communication.Serializers.ProtoBuf" Version="3.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OutWit.Communication.Serializers.ProtoBuf" Version="3.1.0" />
                    
Directory.Packages.props
<PackageReference Include="OutWit.Communication.Serializers.ProtoBuf" />
                    
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 OutWit.Communication.Serializers.ProtoBuf --version 3.1.0
                    
#r "nuget: OutWit.Communication.Serializers.ProtoBuf, 3.1.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 OutWit.Communication.Serializers.ProtoBuf@3.1.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=OutWit.Communication.Serializers.ProtoBuf&version=3.1.0
                    
Install as a Cake Addin
#tool nuget:?package=OutWit.Communication.Serializers.ProtoBuf&version=3.1.0
                    
Install as a Cake Tool

OutWit.Communication.Serializers.ProtoBuf

protobuf-net serialization for WitRPC method parameters, return values and event arguments — on the client and the server — as an opt-in plugin, so nobody who does not use protobuf pays for its dependencies.

Overview

Since 3.1.0 the WitRPC core packages carry only what every setup needs: MemoryPack for the message envelope and JSON as the default payload serializer. protobuf-net lives here. Reference this package on both ends and call WithProtoBuf():

using OutWit.Communication.Client;
using OutWit.Communication.Client.Tcp.Utils;
using OutWit.Communication.Serializers.ProtoBuf;

var client = WitClientBuilder.Build(options =>
{
    options.WithTcp("localhost", 5000);
    options.WithProtoBuf();             // parameters, results, event args
});

The server side is symmetrical: options.WithProtoBuf() on WitServerBuilder with the same using. WithProtoBuf(Action<ProtoBufOptions>) applies a protobuf-net configuration process-wide.

Why this exists: bring your own models

The serializer is protobuf-net. Code-first protobuf models — [ProtoContract] / [ProtoMember(n)], or [DataContract] / [DataMember(Order = n)] as used with protobuf-net.Grpc and WCF-era contracts — move over WitRPC unchanged. You swap the transport, not the models.

Proto-first gRPC (protoc / Grpc.Tools) generates Google.Protobuf messages, which protobuf-net does not read. For those, use OutWit.Communication.Serializers.GoogleProtobuf instead.

Only the payloads are yours to choose. WitRPC's own message envelope always travels as MemoryPack, independently of this package.

Migration from 3.0

WithProtoBuf() used to live in the core client/server packages. Add this package and the using OutWit.Communication.Serializers.ProtoBuf; line; the call sites stay as they were. The MessageSerializerProtoBuf class moved to the same namespace.

License

Licensed under the Apache License, Version 2.0. See LICENSE.

Attribution (optional)

If you use OutWit.Communication.Serializers.ProtoBuf in a product, a mention is appreciated (but not required), for example: "Powered by WitRPC (https://witrpc.io/)".

Trademark / Project name

"WitRPC" and the WitRPC logo are used to identify the official project by Dmitry Ratner.

You may:

  • refer to the project name in a factual way (e.g., "built with WitRPC");
  • use the name to indicate compatibility (e.g., "WitRPC-compatible").

You may not:

  • use "WitRPC" as the name of a fork or a derived product in a way that implies it is the official project;
  • use the WitRPC logo to promote forks or derived products without permission.
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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 is compatible.  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 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 is compatible.  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

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
3.1.0 43 8/29/2026