dll-syringe
dll-syringe copied to clipboard
WIP: C Exports, C# Exports and Fixing CI Workflows
This PR builds on:
- https://github.com/OpenByteDev/dll-syringe/pull/19
- https://github.com/OpenByteDev/dll-syringe/pull/20
- https://github.com/OpenByteDev/dll-syringe/pull/21
So please address that first, as changes from those PRs will show as a diff here otherwise.
[This branch still needs some cleanup regarding string formatting, and error handling]
This PR adds C bindings (both dynamic and static libraries), as well as auto generated C# bindings. This includes tests against the C bindings, the C# bindings are untested. The bindings only cover the core API right now, now RPC. They're not yet perfect with regards to error handling, am in a rush, unfortunately.
Aside from that, some workflow changes have been made:
- Fixed CI Workflows [they now pass, previously they were very outdated and failed]
- CI builds static and dynamic C libraries + bindings.
- CI builds .NET NuGet library.
- CI now runs tests against WINE in addition to the standard tests.
- Fixed a bug in CI (features enabled by default)
- Publishing a tag now makes a release (on GitHub Releases, NuGet, crates.io)
You may want to make changes to these workflows. To suit your personal preferences, also because they currently reference the actions I made for my Reloaded libraries, in the time since I've started working with Rust (7-8 months ago).
The C dynamic libraries are built with into-x86-from-x64 out of the box.
They are approx 220kB for i686 and 300kB for x86_64.
For most people that's probably 'good enough', but not for me.
In the future I plan to:
- Replace
goblinwith own minimal PE parser that gets only info I need. - Replace
iced-x86with manual assembly. - Remove string formatting and unnecessary conditional code.
- Remove string conversions (if present). Instead expose direct APIs for ANSI (A) and UTF-16 (W)
I hope to achieve sub <50kB size.
I'll throw the ones that don't affect the public API as future PRs. After that, I'll probably hard fork the project to strip the functionality I don't need.