{"id":23042737,"url":"https://github.com/voltstro-studios/voltrpc","last_synced_at":"2025-07-21T23:34:30.478Z","repository":{"id":37209332,"uuid":"386323572","full_name":"Voltstro-Studios/VoltRpc","owner":"Voltstro-Studios","description":"VoltRpc - An RPC library which is designed to be both simple to use and fast.","archived":false,"fork":false,"pushed_at":"2024-01-24T11:51:12.000Z","size":1030,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-01-25T10:53:05.009Z","etag":null,"topics":["csharp","csharp-rpc","csharp-sourcegenerator","csharp-tcp","dotnet","dotnet-core","dotnet-standard","dotnet6","interprocess-communication","ipc","named-pipes","rpc","rpc-library","tcp"],"latest_commit_sha":null,"homepage":"https://projects.voltstro.dev/VoltRpc/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Voltstro-Studios.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-07-15T14:42:13.000Z","updated_at":"2024-01-24T11:46:32.000Z","dependencies_parsed_at":"2023-01-17T14:01:35.306Z","dependency_job_id":"53ef236d-24c9-4798-b2c9-3ebaa3c6bfd3","html_url":"https://github.com/Voltstro-Studios/VoltRpc","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voltstro-Studios%2FVoltRpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voltstro-Studios%2FVoltRpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voltstro-Studios%2FVoltRpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voltstro-Studios%2FVoltRpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Voltstro-Studios","download_url":"https://codeload.github.com/Voltstro-Studios/VoltRpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229874521,"owners_count":18137787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","csharp-rpc","csharp-sourcegenerator","csharp-tcp","dotnet","dotnet-core","dotnet-standard","dotnet6","interprocess-communication","ipc","named-pipes","rpc","rpc-library","tcp"],"created_at":"2024-12-15T20:34:47.200Z","updated_at":"2024-12-15T20:34:47.966Z","avatar_url":"https://github.com/Voltstro-Studios.png","language":"C#","readme":"\u003cimg align=\"right\" width=\"15%\" src=\"https://raw.githubusercontent.com/Voltstro-Studios/VoltRpc/master/media/icon.svg\"\u003e\n\n# VoltRpc\n\n[![License](https://img.shields.io/github/license/Voltstro-Studios/VoltRpc)](/LICENSE.md)\n[![NuGet](https://img.shields.io/nuget/v/VoltRpc?label=NuGet)](https://www.nuget.org/packages/VoltRpc/)\n[![NuGet Download Count](https://img.shields.io/nuget/dt/VoltRpc?label=Downloads\u0026logo=nuget\u0026color=blue\u0026logoColor=blue)](https://www.nuget.org/packages/VoltRpc/)\n[![Build Status](https://img.shields.io/azure-devops/build/Voltstro-Studios/63163ef8-da1d-42b6-b8b9-689420a730e5/9?logo=azure-pipelines)](https://dev.azure.com/Voltstro-Studios/VoltRpc/_build/latest?definitionId=9\u0026branchName=master)\n[![Docs Status](https://img.shields.io/uptimerobot/status/m794227043-7e2bf837661fcd75d2af6804?label=Docs)](https://projects.voltstro.dev/VoltRpc/latest/)\n[![Discord](https://img.shields.io/badge/Discord-Voltstro-7289da.svg?logo=discord)](https://discord.voltstro.dev)\n\nVoltRpc - An RPC library which is designed to be both simple to use and fast.\n\n## Features\n\n- Its fast (See the [benchmarks](#benchmarks))\n- Supports all built-in C# value types, including:\n    - `Bool`\n    - `Byte`\n    - `Char`\n    - `Decimal`\n    - `Double`\n    - `Float`\n    - `Int`\n    - `Long`\n    - `SByte`\n    - `Short`\n    - `UInt`\n    - `ULong`\n    - `UShort`\n- Supports these built-in .NET types: (More to be added)\n    - `String`\n    - `DateTime`\n    - `TimeSpan`\n    - `Uri`\n    - `Guid`\n    - `Vector2`\n    - `Vector3`\n    - `Vector4`\n    - `Plane`\n    - `Quaternion`\n    - `Matrix3x2`\n    - `Matrix4x4`\n- Supports arrays for any type\n- Easily support [custom types](https://projects.voltstro.dev/VoltRpc/articles/types/#custom-types) by implementing a `TypeReadWriter\u003cT\u003e`\n- Proxy generated by using a [.NET Source Generator](https://projects.voltstro.dev/VoltRpc/articles/proxy-generation/)\n- Simple to use\n\n## Getting Started\n\n### Installation\n\nVoltRpc can be installed from [NuGet](https://nuget.org/packages/VoltRpc). You will also need the proxy generator (also on [NuGet](https://www.nuget.org/packages/VoltRpc.Proxy.Generator/)). \n\n```xml\n\u003cItemGroup\u003e\n    \u003cPackageReference Include=\"VoltRpc\" Version=\"3.2.0\" /\u003e\n    \u003cPackageReference Include=\"VoltRpc.Proxy.Generator\" Version=\"2.3.0\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\n### Example\n\nFor a more in-depth example, see the [Overview](https://projects.voltstro.dev/VoltRpc/articles/overview/) or [Setup](https://projects.voltstro.dev/VoltRpc/articles/setup/).\n\nThere is also a [demo project](https://github.com/Voltstro-Studios/VoltRpc/tree/master/src/Demo) included.\n\n```csharp\n[GenerateProxy(GeneratedName = \"TestProxy\")]\npublic interface ITestInterface\n{\n  public void DoSomethingCool();\n  public int GetTheCoolValue();\n}\n\npublic class TestInterface : ITestInterface\n{\n  public void DoSomethingCool()\n  {\n    Console.WriteLine(\"Something Cool!\");\n  }\n\n  public int GetTheCoolValue()\n  {\n    return 69;\n  }\n}\n\npublic class Program\n{\n  IPEndPoint ip = new(IPAddress.Loopback, 7767);\n\n  TestInterface test = new();\n\n  //Host\n  Host host = new TCPHost(ip);\n  host.AddService\u003cITestInterface\u003e(test);\n  host.StartListening().ConfigureAwait(false);\n\n  //Client\n  Client client = new TCPClient(ip);\n  client.AddService\u003cITestInterface\u003e();\n  client.Connect();\n\n  //Now we can call to method like it was normal C#\n  TestProxy proxy = new(client);\n  proxy.DoSomethingCool();\n}\n```\n\n## Benchmarks\n\n``` ini\nBenchmarkDotNet=v0.13.1, OS=Windows 10.0.19044.1826 (21H2)\nIntel Core i5-10600KF CPU 4.10GHz, 1 CPU, 12 logical and 6 physical cores\n.NET SDK=6.0.302\n  [Host]     : .NET 6.0.7 (6.0.722.32202), X64 RyuJIT\n  Job-TDLHXN : .NET 6.0.7 (6.0.722.32202), X64 RyuJIT\n\nJit=Default  Platform=AnyCpu  Runtime=.NET 6.0  \n```\n\n![Pipes Non-Array](media/PipesBenchmarkNonArrays.png)\n\n![Pipes Non-Array](media/PipesBenchmarkArrays.png)\n\n(Currently, the in-built arrays are quite a lot slower, we are looking into fixing this in a later release)\n\n|               Method |      message |         array |             Mean |          Error |         StdDev |\n|--------------------- |------------- |-------------- |-----------------:|---------------:|---------------:|\n|            **BasicVoid** |            **?** |             **?** |         **6.311 μs** |      **0.0517 μs** |      **0.0432 μs** |\n|          BasicReturn |            ? |             ? |         7.444 μs |      0.0589 μs |      0.0551 μs |\n|          ArrayReturn |            ? |             ? |        21.389 μs |      0.3943 μs |      0.6695 μs |\n|            ArrayFast |            ? |             ? |     1,579.432 μs |     10.1223 μs |      9.4684 μs |\n|   **BasicParameterVoid** | **Hello World!** |             **?** |         **7.128 μs** |      **0.0390 μs** |      **0.0346 μs** |\n| BasicParameterReturn | Hello World! |             ? |         8.287 μs |      0.0364 μs |      0.0304 μs |\n|   **ArrayParameterVoid** |            **?** |      **Byte[25]** |        **18.423 μs** |      **0.3675 μs** |      **0.6140 μs** |\n| ArrayParameterReturn |            ? |      Byte[25] |        28.647 μs |      0.5643 μs |      0.9112 μs |\n|   **ArrayParameterVoid** |            **?** | **Byte[8294400]** | **2,705,942.687 μs** | **11,965.3253 μs** | **11,192.3727 μs** |\n| ArrayParameterReturn |            ? | Byte[8294400] | 5,416,337.679 μs | 21,036.1040 μs | 18,647.9583 μs |\n\nFor more info on these benchmarks see [Benchmarks](https://projects.voltstro.dev/VoltRpc/articles/benchmarks/).\n\n## Authors\n\n**Voltstro** - *Initial work* - [Voltstro](https://github.com/Voltstro)\n\n## License\n\nThis project is licensed under the MIT license – see the [LICENSE.md](https://github.com/Voltstro-Studios/VoltRpc/blob/master/LICENSE.md) file for details.\n\n## Credits\n\n- [Mirror](https://github.com/vis2k/Mirror) \n  - [`NetworkReader.cs`](https://github.com/vis2k/Mirror/tree/50e6bb11016257c505c39380b6aa7f957bb6048e/Assets/Mirror/Runtime/NetworkReader.cs) used as a base for [`BufferedReader.cs`](/src/VoltRpc/IO/BufferedReader.cs)\n  - [`NetworkWriter.cs`](https://github.com/vis2k/Mirror/tree/50e6bb11016257c505c39380b6aa7f957bb6048e/Assets/Mirror/Runtime/NetworkWriter.cs) used as a base for [`BufferedWriter.cs`](/src/VoltRpc/IO/BufferedWriter.cs)\n- Parts of [`BufferedStream.cs`](https://github.com/dotnet/runtime/blob/release/5.0/src/libraries/System.Private.CoreLib/src/System/IO/BufferedStream.cs) from the .NET Runtime was also used in the reader. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoltstro-studios%2Fvoltrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoltstro-studios%2Fvoltrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoltstro-studios%2Fvoltrpc/lists"}