Serify 0.1.0

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

serify — C# worker library

C# / .NET worker library for serify, a cross-language serialization conformance harness.

You define a schema and test cases once; each target language ships a small worker program that serializes and deserializes the data, and the serify CLI drives every worker through the same cases and compares their output byte-for-byte. This package is what a C# worker references.

Install

dotnet add package Serify

Usage

[SerifyModel] plus one [SerifyField] per property is the binding. You supply the byte layout and register it per format:

using System.Collections.Generic;
using Serify;

[SerifyModel]
internal sealed class UserRecord
{
    [SerifyField("user_id")] public ulong UserId { get; set; }
    [SerifyField] public string Username { get; set; } = "";
    [SerifyField] public float Score { get; set; }

    public byte[] Marshal() { /* your byte layout */ }
    public static UserRecord Unmarshal(byte[] data) { /* its inverse */ }
}

internal static class Program
{
    private static void Main()
    {
        Serify.Worker.RunSuite(new Dictionary<string, TypeEntry>
        {
            ["user"] = TypeEntry.Model<UserRecord>(new()
            {
                ["binary"] = (u => u.Marshal(), UserRecord.Unmarshal),
            }),
        });
    }
}

[SerifyField("key")] renames a property's schema key; a bare [SerifyField] uses the property name. Nested classes work by attributing the nested type.

RunSuite takes over stdin/stdout to speak the NDJSON protocol the CLI drives, so a worker's own output must go to stderr.

Documentation

Full documentation, the protocol spec, and reference workers for all nine languages live in the main repository.

License

Apache-2.0

Product Compatible and additional computed target framework versions.
.NET 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 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. 
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
0.1.0 68 8/19/2026