{"id":13431689,"url":"https://github.com/msgpack/msgpack-cli","last_synced_at":"2025-05-14T08:08:06.174Z","repository":{"id":3375260,"uuid":"4422685","full_name":"msgpack/msgpack-cli","owner":"msgpack","description":"MessagePack implementation for Common Language Infrastructure / msgpack.org[C#]","archived":false,"fork":false,"pushed_at":"2024-07-12T19:41:26.000Z","size":39712,"stargazers_count":838,"open_issues_count":85,"forks_count":175,"subscribers_count":62,"default_branch":"master","last_synced_at":"2025-04-12T13:50:53.136Z","etag":null,"topics":["c-sharp","messagepack","msgpack","serialization"],"latest_commit_sha":null,"homepage":"http://msgpack.org","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msgpack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-05-23T16:48:45.000Z","updated_at":"2025-04-08T19:52:44.000Z","dependencies_parsed_at":"2024-04-28T08:25:07.014Z","dependency_job_id":"4b251d63-6d1e-477f-907d-9bd1e904a0c9","html_url":"https://github.com/msgpack/msgpack-cli","commit_stats":{"total_commits":3142,"total_committers":66,"mean_commits":47.60606060606061,"dds":"0.34691279439847234","last_synced_commit":"90c699a0243644e9da08c089a41de1cfcd54335d"},"previous_names":[],"tags_count":63,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msgpack%2Fmsgpack-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msgpack%2Fmsgpack-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msgpack%2Fmsgpack-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msgpack%2Fmsgpack-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msgpack","download_url":"https://codeload.github.com/msgpack/msgpack-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101557,"owners_count":22014908,"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":["c-sharp","messagepack","msgpack","serialization"],"created_at":"2024-07-31T02:01:05.099Z","updated_at":"2025-05-14T08:08:06.143Z","avatar_url":"https://github.com/msgpack.png","language":"C#","readme":"# MessagePack for CLI\n\n## CI Status\n\n|**Configuration**|**Status**|\n|:--|:--|\n|Release                             |[![Build status release](https://ci.appveyor.com/api/projects/status/5ln7u7efwjepj6o8?svg=true)](https://ci.appveyor.com/project/yfakariya/msgpack-cli-x2p85)|\n|Debug (.NET Core 2.0)               |[![Build status debug (.NET Core 2.0)](https://ci.appveyor.com/api/projects/status/dlc0v4rrolwj0t2t?svg=true)](https://ci.appveyor.com/project/yfakariya/msgpack-cli)|\n|Debug (.NET Core 2.0)               |[![Build status debug (.NET Core 1.0)](https://ci.appveyor.com/api/projects/status/avurf519all92v5u?svg=true)](https://ci.appveyor.com/project/yfakariya/msgpack-cli-g3guk)|\n|Debug (.NET Framework 4.x)          |[![Build status debug (.NET Framework 4.x)](https://ci.appveyor.com/api/projects/status/np6723q2uiqofr1a?svg=true)](https://ci.appveyor.com/project/yfakariya/msgpack-cli-nuf62)|\n|Debug (Code DOM)]                   |[![Build status debug (Code DOM)](https://ci.appveyor.com/api/projects/status/1mw78wkxx50jvab1?svg=true)](https://ci.appveyor.com/project/yfakariya/msgpack-cli-rhnh0)|\n|Debug (miscs)]                      |[![Build status debug (miscs)](https://ci.appveyor.com/api/projects/status/avufc51yu2cm6idw?svg=true)](https://ci.appveyor.com/project/yfakariya/msgpack-cli-bo856)|\n|Debug (.NET Framework 3.5)          |[![Build status debug (.NET Framework 3.5)](https://ci.appveyor.com/api/projects/status/cjp8phlnbwj7gkj9?svg=true)](https://ci.appveyor.com/project/yfakariya/msgpack-cli-3jme9)|\n|Debug (.NET Framework 3.5 Code DOM) |[![Build status debug (.NET Framework 3.5 Code DOM)](https://ci.appveyor.com/api/projects/status/1mw78wkxx50jvab1?svg=true)](https://ci.appveyor.com/project/yfakariya/msgpack-cli-rhnh0)|\n\n## What is it?\n\nThis is MessagePack serialization/deserialization for CLI (Common Language Infrastructure) implementations such as .NET Framework, Silverlight, Mono (including Moonlight.)\nThis library can be used from ALL CLS compliant languages such as C#, F#, Visual Basic, Iron Python, Iron Ruby, PowerShell, C++/CLI or so.\n\n## Usage\n\nYou can serialize/deserialize objects as following:\n\n1. Create serializer via `MessagePackSerializer.Get` generic method. This method creates dependent types serializers as well.\n2. Invoke serializer as following:\n  * `Pack` method with destination `Stream` and target object for serialization.\n  * `Unpack` method with source `Stream`.\n\n```c#\n// Creates serializer.\nvar serializer = MessagePackSerializer.Get\u003cT\u003e();\n// Pack obj to stream.\nserializer.Pack(stream, obj);\n// Unpack from stream.\nvar unpackedObject = serializer.Unpack(stream);\n```\n\n```vb\n' Creates serializer.\nDim serializer = MessagePackSerializer.Get(Of T)()\n' Pack obj to stream.\nserializer.Pack(stream, obj)\n' Unpack from stream.\nDim unpackedObject = serializer.Unpack(stream)\n```\n\n**For production environment, you should instantiate own `SerializationContext` and manage its lifetime. It is good idea to treat it as singleton because `SerializationContext` is thread-safe.**\n\n## Features\n\n* Fast and interoperable binary format serialization with simple API.\n* Generating pre-compiled assembly for rapid start up.\n* Flexible MessagePackObject which represents MessagePack type system naturally.\n\n**Note: AOT support is limited yet. Use [serializer pre-generation](https://github.com/msgpack/msgpack-cli/wiki/Xamarin-and-Unity) with `mpu -s` utility or API.**  \nIf you do not pre-generated serializers, MsgPack for CLI uses reflection in AOT environments, it is slower and it sometimes causes AOT related error (`ExecutionEngineException` for runtime JIT compilation). **You also have to call `MessagePackSerializer.PrepareType\u003cT\u003e` and companions in advance to avoid AOT related error.** See [wiki](https://github.com/msgpack/msgpack-cli/wiki/Xamarin-and-Unity) for details.\n\n## Documentation\n\nSee [wiki](https://github.com/msgpack/msgpack-cli/wiki)\n\n## Installation\n\n* Binary files distributed via the NuGet package [MsgPack.Cli](http://www.nuget.org/packages/MsgPack.Cli/).\n* You can extract binary (DLL) file as following:\n  1. Download *.zip file from [GitHub Release page](https://github.com/msgpack/msgpack-cli/releases/).\n  2. Extract it.\n  3. Under the `bin` directory, binaries are there!\n    * For mono, you can use `net461` or `net35` drops as you run with.\n    * For Unity, `unity3d` drop is suitable.\n\n## How to build\n\n### For .NET Framework\n\n1. Install Visual Studio 2017 (Community edition is OK) and 2015 (for MsgPack.Windows.sln).\n    * You must install .NET Framework 3.5, 4.x, .NET Core, and Xamarin dev tools to build all builds successfully.\n      If you do not want to install options, edit `\u003cTargetFrameworks\u003e` element in `*.csproj` files to exclude platforms you want to exclude.\n2. Install latest .NET Core SDK.\n3. Run with Visual Studio Developer Command Prompt:\n\n    msbuild MsgPack.sln /t:Restore\n    msbuild MsgPack.sln\n\n  Or (for Unity 3D drops):\n\n    msbuild MsgPack.compats.sln /t:Restore\n    msbuild MsgPack.compats.sln\n\n  Or (for Windows Runtime/Phone drops and Silverlight 5 drops):\n\n    msbuild MsgPack.Windows.sln /t:Restore\n    msbuild MsgPack.Windows.sln\n\n  Or (for Xamarin unit testing, you must have Xamarin Business or upper license and Mac machine on the LAN to build on Windows):\n\n    msbuild MsgPack.Xamarin.sln /t:Restore\n    msbuild MsgPack.Xamarin.sln\n\nOr open one of above solution files in your IDE and run build command in it.\n\n### For Mono\n\n1. Install latest Mono and .NET Core SDK.\n2. Now, you can build MsgPack.sln and MsgPack.Xamarin.sln with above instructions and `msbuild` in latest Mono. Note that `xbuild` does not work because it does not support latest csproj format.\n\n### Own Unity 3D Build\n\nFirst of all, there are binary drops on github release page, you should use it to save your time.   \nBecause we will not guarantee source code organization compatibilities, we might add/remove non-public types or members, which should break source code build.  \nIf you want to import sources, you must include just only described on MsgPack.Unity3D.csproj.  \nIf you want to use \".NET 2.0 Subset\" settings, you must use just only described on MsgPack.Unity3D.CorLibOnly.csproj file, and define `CORLIB_ONLY` compiler constants.\n\n### Xamarin Android testing\n\nIf you run on Windows, it is recommended to use HXM instead of Hyper-V based emulator.  \nYou can disable Hyper-V from priviledged (administrator) powershell as follows:\n\n```powershell\nDisable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor\n```\n\nIf you want to use Hyper-V again (such as for Docker for Windows etc.), you can do it by following in priviledged (administrator) powershell:\n\n```powershell\nEnable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor\n```\n\n#### Xamarin Android Trouble shooting tips\n\n* **Q:** Javac shows compilation error.\n  * **A:** Rebuild the test project and try it run again.\n\n### Xamarin iOS testing\n\nYou must create provisoning profiles in your MacOS devices.  \nSee [Xamarin documents about provisining](https://developer.xamarin.com/guides/ios/getting_started/installation/device_provisioning/free-provisioning/) for details.\n\nThere are bundle IDs of current iOS tests:\n\n* `org.msgpack.msgpack-cli-xamarin-ios-test`\n* `org.msgpack.msgpack-cli-xamarin-ios-test-packer`\n* `org.msgpack.msgpack-cli-xamarin-ios-test-unpacker`\n* `org.msgpack.msgpack-cli-xamarin-ios-test-unpacking`\n* `org.msgpack.msgpack-cli-xamarin-ios-test-timestamp`\n* `org.msgpack.msgpack-cli-xamarin-ios-test-arrayserialization`\n* `org.msgpack.msgpack-cli-xamarin-ios-test-mapserialization`\n\n*Note that some reflection based serializer tests failed with AOT related limitation.*\n\n#### Xamarin iOS Trouble shooting tips\n\nSee [Xamarin's official trouble shooting docs first.](https://developer.xamarin.com/guides/ios/getting_started/installation/windows/connecting-to-mac/troubleshooting/)\n\n* **Q:** An error occurred while running unit test project.\n  * **A:** Rebuild the project and rerun it. Or, login your Mac again, ant retry it.\n* **Q:** It is hard to read English.\n  * **A:** You can read localized Xamarin docs with putting `{region}-{lang}` as the first component of URL path such as `https://developer.xamarin.com/ja-jp/guides/...`.\n\n## Maintenance\n\n### MsgPack.Windows.sln\n\nThis solution contains Silverlight5 and (old) UWP project for backward compability. They are required Visual Studio 2015 to build and test.  \nYou can download Visual Studio 2015 community edition from [here](https://visualstudio.microsoft.com/vs/older-downloads/).\n\n**You do not have to install Visual Studio 2015 as long as you don't edit/test/build Silverlight and/or old UWP project.**\n\n## See also\n\n* GitHub Page           : http://cli.msgpack.org/\n* Wiki (documentation)  : https://github.com/msgpack/msgpack-cli/wiki\n* API Reference         : http://cli.msgpack.org/doc/top.html\n* Issue tracker         : https://github.com/msgpack/msgpack-cli/issues\n* MSBuild reference     : http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx\n* Mono xbuild reference : http://www.mono-project.com/Microsoft.Build\n","funding_links":[],"categories":["Frameworks, Libraries and Tools","框架, 库和工具","Serialization","序列化","Identifiers"],"sub_categories":["Serialization","序列化","GUI - other"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsgpack%2Fmsgpack-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsgpack%2Fmsgpack-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsgpack%2Fmsgpack-cli/lists"}