{"id":37059233,"url":"https://github.com/meiktranel/nxports","last_synced_at":"2026-01-14T06:40:46.513Z","repository":{"id":35075463,"uuid":"174744880","full_name":"MeikTranel/NXPorts","owner":"MeikTranel","description":"A platform agnostic tool to export .NET functions at build time.","archived":false,"fork":false,"pushed_at":"2024-09-09T21:18:51.000Z","size":190,"stargazers_count":46,"open_issues_count":10,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-01T09:37:14.402Z","etag":null,"topics":["dotnet","msbuild","pinvoke"],"latest_commit_sha":null,"homepage":null,"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/MeikTranel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-09T20:51:30.000Z","updated_at":"2025-05-18T18:23:13.000Z","dependencies_parsed_at":"2024-06-21T03:56:00.463Z","dependency_job_id":"c979a727-8471-4641-9367-27150bd53b18","html_url":"https://github.com/MeikTranel/NXPorts","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/MeikTranel/NXPorts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeikTranel%2FNXPorts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeikTranel%2FNXPorts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeikTranel%2FNXPorts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeikTranel%2FNXPorts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MeikTranel","download_url":"https://codeload.github.com/MeikTranel/NXPorts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeikTranel%2FNXPorts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dotnet","msbuild","pinvoke"],"created_at":"2026-01-14T06:40:45.846Z","updated_at":"2026-01-14T06:40:46.490Z","avatar_url":"https://github.com/MeikTranel.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NXPorts\n\n[![CI](https://github.com/MeikTranel/NXPorts/workflows/CI/badge.svg)](https://github.com/MeikTranel/NXPorts/actions)\n[![NuGet Gallery Release](https://img.shields.io/nuget/v/NXPorts.svg)](https://www.nuget.org/packages/NXPorts/)\n[![codecov](https://codecov.io/gh/MeikTranel/NXPorts/branch/master/graph/badge.svg?token=DPMCO9NGN5)](https://codecov.io/gh/MeikTranel/NXPorts)\n\nA MSBuild-integrated library/tool to expose entrypoints in .NET assemblies to the platform invocation system or short `PInvoke`.\nIt allows you to build .NET libraries that can be called from any development platform that supports `PInvoke`, including **C++**, **C**, **Rust**, **Delphi**, **Python** and so on...\n\n## Getting Started\n\nTo get started you only have to add the `NXPorts` package to your project. That's it. `NXPorts` will automatically generate exports as\npart of your build now. Some samples are available [here](./samples).\n\n### Prerequisites\n\nThis software itself will run on any system that supports developing .NET software - it does **not** have any dependencies on\n`ildasm.exe`, `ilasm.exe` or any other windows-only libraries.\n\nKeep in mind that `Reverse PInvoke` - calling PInvoke entrypoints **in .NET assemblies** - is only officially supported\nin the .NET Framework. It may work in other runtimes as well, but your mileage may vary.\n\nSee [Compatibility Docs](./docs/Compatibility.md) for more info.\n\n### Sample\n\nThe following code will result in an exported function named `SampleExportFunc`.\n\n```CSharp\npublic static class Exports {\n  [DllExport(alias:\"SampleExportFunc\")]\n  public static double Add(double a, double b)\n  {\n      return a + b;\n  }\n}\n```\n\n## Building from Source\n\nTo build packages by yourself all you have to do is the dotnet cli like this:\n\n```shell\n  dotnet pack\n```\n\nThis will restore, build and pack all available projects. Testing this project is just as simple:\n\n```shell\n  dotnet test\n```\n\n## Releasing NXPorts\n\nTo start releasing a new NXPorts version you just have close the associated milestone.\nGitHub actions will then generate a checklist issue with further guidance.\n\n**Fundamentals**:\n\n- We're releasing to ``production`` (as in NuGet Gallery) from `tagged` builds\n- We're releasing ``canary`` builds from master to our canary feed (GPR)\n\n## Contributing\n\nI am more than happy to take in PRs.\nDocumentation regarding Marshalling, PE32 or PInvoke (especially on non-NETFX runtimes) counts\njust as much as a valuable contribution as any other code PR.\n\nTo me writing issues is also just as valuable. I may not list every issue reporter in the release notes, but\nespecially during the initial development timeline knowing the shortcomings of the software is absolutely invaluable.\n\n### Guidelines\n\n* Please consider writing an issue first\n* Please target PRs towards the `master` branch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeiktranel%2Fnxports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeiktranel%2Fnxports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeiktranel%2Fnxports/lists"}