Skip to content

Rewrite bindings to .NET 9 - #20

Open
AeonLucid wants to merge 5 commits into
frida:mainfrom
AeonLucid:rewrite-net-core
Open

Rewrite bindings to .NET 9#20
AeonLucid wants to merge 5 commits into
frida:mainfrom
AeonLucid:rewrite-net-core

Conversation

@AeonLucid

@AeonLucid AeonLucid commented Aug 7, 2025

Copy link
Copy Markdown

This is a rewrite to support .NET 9, in this pull request I'll descibe the set up of the repository.
I tried my best to follow the standard of the other frida repositories so it can be integrated in the build system.

The project is divided into three libraries.

Closes #16

Build system

For windows it's important to build with -md flag, for example .\configure.bat --host=windows-x86_64-md.

Command Artifact
make build-library build\src\Frida.NET\Frida.NET.0.0.0.nupkg
make build-library-bindings build\src\Frida.NET.Bindings\Frida.NET.Bindings.0.0.0.nupkg
make build-runtime build\src\Frida.NET.Runtime\Frida.NET.Runtime.win-x64.0.0.0.nupkg

Version is replaced with meson.project_version(), so this should be the actual Frida version when integrated.

Frida.NET

This is a wrapper around the bindings to improve developer experience. The gir.core bindings are not pretty to work with. The result is that a developer can write this code and it just works.

var deviceManager = new FridaDeviceManager();

foreach (var device in deviceManager.EnumerateDevices())
{
    Console.WriteLine($"{device.Type} {device.Name}");
}
Local | Local System
Remote | Local Socket
Remote | GDB Remote Stub

Frida.NET.Bindings

These are bindings generated by gir.core/GirTool from the Frida-1.0.gir file.

They are ran through the helper.py script to make everything internal. This is to not clutter the namespace and confuse the developer. The internals are only visible to the Frida.NET library.

Frida.NET.Runtime.*

This contains the Frida.dll, Frida.dylib or Frida.so file depending on the operating system.


@AeonLucid
AeonLucid marked this pull request as ready for review August 8, 2025 03:51
@AeonLucid AeonLucid changed the title WIP: Rewrite bindings to .NET 9 Rewrite bindings to .NET 9 Aug 8, 2025
@nblog

nblog commented Aug 11, 2025

Copy link
Copy Markdown

@AeonLucid Hello,
Would it be possible to consider including frida-rpc as part of the planned feature set for this project? You may refer to the following implementation for inspiration and technical reference:
ScriptWithRpc.cs from the lenacloud/frida-netstandard repository.

This addition could be valuable for enhancing RPC capabilities within the .NET bindings.
Thank you for considering this suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migration to .NET unified runtime

2 participants