{"id":17693056,"url":"https://github.com/nihlus/advanceddlsupport","last_synced_at":"2025-04-09T05:10:09.061Z","repository":{"id":42178559,"uuid":"114506473","full_name":"Nihlus/AdvancedDLSupport","owner":"Nihlus","description":"Delegate-based C# P/Invoke alternative - compatible with all platforms and runtimes.","archived":false,"fork":false,"pushed_at":"2024-09-04T16:16:17.000Z","size":1287,"stargazers_count":494,"open_issues_count":9,"forks_count":30,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-11-24T20:37:30.005Z","etag":null,"topics":["c","coreclr","csharp","dotnet","hacktoberfest","native","netstandard","pinvoke"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nihlus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/supported_constructs.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Nihlus","patreon":"jargon","ko_fi":"jaxxie"}},"created_at":"2017-12-17T03:24:05.000Z","updated_at":"2024-11-20T07:36:20.000Z","dependencies_parsed_at":"2024-12-13T20:10:26.949Z","dependency_job_id":"80650014-3c53-4bcc-b971-f0cbf8de0c68","html_url":"https://github.com/Nihlus/AdvancedDLSupport","commit_stats":{"total_commits":405,"total_committers":13,"mean_commits":"31.153846153846153","dds":"0.23456790123456794","last_synced_commit":"3639dfb5758a677784a29601f236448ddbf8b869"},"previous_names":["firwood-software/advancedlsupport","firwood-software/advanceddlsupport"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nihlus%2FAdvancedDLSupport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nihlus%2FAdvancedDLSupport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nihlus%2FAdvancedDLSupport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nihlus%2FAdvancedDLSupport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nihlus","download_url":"https://codeload.github.com/Nihlus/AdvancedDLSupport/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980837,"owners_count":21027808,"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","coreclr","csharp","dotnet","hacktoberfest","native","netstandard","pinvoke"],"created_at":"2024-10-24T13:44:06.152Z","updated_at":"2025-04-09T05:10:09.041Z","avatar_url":"https://github.com/Nihlus.png","language":"C#","funding_links":["https://github.com/sponsors/Nihlus","https://patreon.com/jargon","https://ko-fi.com/jaxxie","https://ko-fi.com/H2H176VD'","https://www.patreon.com/jargon"],"categories":[],"sub_categories":[],"readme":"# AdvancedDLSupport\nAlternative approach to your usual P/Invoke!\n\n[![Join the chat at https://discord.gg/fDy5Vhb](https://img.shields.io/badge/chat-on%20discord-7289DA.svg)](https://discord.gg/fDy5Vhb)\n\nUse C# interfaces to bind to native code - quick and easy usage of C API in C# code, on any platform. \nGone are the days of broken `DllImport` and annoying workarounds for the different runtimes.\n\nFully compatible with Mono, .NET Framework, .NET Core, and .NET Standard. Compatible with Mono DLL mapping on all \nplatforms and runtimes. Configurable and adaptible.\n\n\n## Why use ADL?\n1) Modern API - no more static classes, no more `extern`. Use your native API as if it were first-class objects.\n2) Flexibility - Inject your native API into your classes, change the library scanning logic, mix your managed and\n   native code.\n3) [Speed][indirect-calls] - ADL is blazing fast, and gives your native interop an edge. See performance increases that\n   are at least 2 and up to 8 times faster than other, existing solutions.\n4) [Easy to use][quickstart] - Not only is ADL simple to set up and get working, it's a breeze to maintain, and reduces \n   clutter in your codebase.\n\nRead the [Docs][9], or install via NuGet and [get started][quickstart].\n\n\n## Features\n* Supports all the typical P/Invoke patterns and constructs\n* Seamlessly mix native functions and managed code\n* Use more complex types, such as `Nullable\u003cT\u003e` and `string` without any extra code\n* Select library architectures at runtime\n* Select library names at runtime\n* Swappable native library search algorithms\n* Import global variables \n* Optional lazy loaded symbols\n* Optional Mono DllMap support\n\n\n## Basic Usage\n\n1. Declare your interface\n\n\t```cs\n\tpublic interface IMyNativeLibrary\n\t{\n\t\tlong MyNativeGlobal { get; set; }\n\t\tint MyNativeMultiply(int a, int b);\n\t\tvoid MyOtherNativeFunction(MyStruct strct, ref MyStruct? maybeStruct);\n\t}\n\t```\n\n2. Activate it\n\t```cs\n\tconst string MyLibraryName = \"MyLibrary\";\n\n\tvar activator = new NativeLibraryBuilder();\n\tvar library = activator.ActivateInterface\u003cIMyNativeLibrary\u003e(MyLibraryName);\n\t```\n\n3. Use it\n\n\t```cs\n\tlibrary.MyNativeGlobal = 10;\n\n\tvar result = library.MyNativeMultiply(5, 5);\n\n\tvar myStruct = new MyStruct();\n\tMyStruct? myOtherStruct = null;\n\n\tlibrary.MyOtherNativeFunction(myStruct, ref myOtherStruct);\n\t```\n\nSee the [Quickstart][quickstart] for more information.\n\n\n## Installation\nGet it on NuGet!\n\n\n## Support me\n[![Become a Patron][patreon-button]][patreon]\n\u003ca href='https://ko-fi.com/H2H176VD' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi2.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\n\n## License\nIf the library's license doesn't fit your project or product, please [contact us][14]. Custom licensing options are \navailable, and we are always open to working something out that fits you - be it modified, commercial, or otherwise.\n\nAdvancedDLSupport's public release is licensed under the [GNU Lesser General Public License, Version 3 (LGPLv3)][12]. \nSee the [LICENSE][13] for details. Without the support of the open-source movement, it would never have existed.\n\n \n[2]: https://travis-ci.org/Firwood-Software/AdvancedDLSupport\n[6]: https://ci.appveyor.com/project/Nihlus/advancedlsupport-dnwes\n\n[9]: https://nihlus.github.io/AdvancedDLSupport\n\n[quickstart]: docs/quickstart.md\n[indirect-calls]: docs/indirect-calling.md\n\n[12]: https://www.gnu.org/licenses/lgpl-3.0.txt\n[13]: LICENSE\n[14]: mailto:jarl.gullberg@gmail.com\n\n[patreon-button]: https://c5.patreon.com/external/logo/become_a_patron_button.png (Become a Patron)\n[patreon]: https://www.patreon.com/jargon\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihlus%2Fadvanceddlsupport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnihlus%2Fadvanceddlsupport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihlus%2Fadvanceddlsupport/lists"}