-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes to frida-gum to support nostd #83
Conversation
cce1359
to
06b3b3d
Compare
06b3b3d
to
b1a3677
Compare
This is a lot of changes, and adds a lot of maintenance burden. Can you help me understand why no_std is necessary? |
Hi. Thanks for the feedback. Most of the changes relate to changes to the “use” blocks at the top of files. Some of them were from tidying up (there were instances where some use statements were grouped into a single block, but others not). I don’t think there were many actual code changes. The rust std library is quite large and in turn has a dependency on large parts of libc. Many parts of it are duplicated in the core libraries. Since Frida-rust doesn’t need the features of the standard library it unnecessarily imposes this dependency on downstream consumers. Although I accept this won’t be a problem for many conventional rust applications, it seems sensible in any case to minimise the complexity of code injected into a target process, to both minimise code size and minimise interaction between Frida and the target. In my case, my application requires stringent control of the address space which isn’t possible when using rusts standard library. Perhaps the changes could be smaller and simpler if the dependency on std could be dropped all together rather than it being an optional feature? |
Thanks for the explanation. It is clearer to me now.
I think this is completely reasonable, actually. Instead of having an However, my reservations don't quite stop here. I would also really like to avoid adding dependencies as part of this migration. Namely, I don't understand the purpose of I hope this is reasonable. I am open to feedback, though I can see the value of this feature now (and this feature, as a default). |
The only issue with the ModuleMap is the dependency on
Do note that I have only considered moving All sounds perfectly reasonable. I'm happy to go away and re-work things, just let me know what is the best direction to follow. |
For now, I think we should just feature gate it. Then we can come back later.
This makes sense, we can drop it then because everything will be core after your changes (minus a few oddities like ModuleMap). Same goes for
Yup, makes sense. I don't think there is a good reason for moving frida-core to nostd, it is meant to run in hosted environments. |
Are you happy if I just feature gate the parts of module map that deal with paths? It would be very useful to keep the parts which don’t in the nostd build. |
Sure, that works for me. |
Great. Leave it with me for a bit. |
Superseded by #85 |
Changes to support building
frida-rust
asno_std
. A couple of APIs are excluded from themodule_map
when built with thenostd
feature, because of their dependency onsdt::path::Path
which I couldn't find ano_std
replacement for. But it should affect the majority of use cases.