frida-rust icon indicating copy to clipboard operation
frida-rust copied to clipboard

Can we pass message to user's Message Handler by value?

Open 7sDream opened this issue 3 months ago • 2 comments

I noticed that the Handler trait currently accepts Message by reference. However, since the framework no longer uses this Message internally, it would seem better to transfer ownership directly to the Handler, which would help reduce memeory allocate operations within the Handler(e.g. clone whole message/some string field).

I know it's a public Trait definition, modifying it would be a breaking change. However, I believe pass by value here is more Rust idiomatic, so I still put forward this as a suggestion. Feel free to close this if it's not feasible. 😉

7sDream avatar Sep 17 '25 10:09 7sDream

You can work up a PR for this change, and we'll see how it looks.

s1341 avatar Sep 17 '25 14:09 s1341

OK, I can try to make one during my free time on Sunday.

7sDream avatar Sep 19 '25 01:09 7sDream