-
Notifications
You must be signed in to change notification settings - Fork 5
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
Make elfinfo work in the browser #2
Comments
Actually here's a better webpack config for elfinfo in the browser. resolve: {
alias: {
'string_decoder': false // Elfinfo will try and pull this, but doesn't really need it. Plus the behavior of string_decoder is sort of broken in the browser
},
fallback: {
'path': false, // Elfinfo tries to pull path but doesn't really need it
'fs': false, // Elfinfo also tries to use fs but doesn't really need it either
'disassembler': false // Elfinfo wants to pull this, but we might not need to do any disassembly
}
}, |
Glad you think the library is cool! Making elfinfo work in the browser is a goal, however I have not had much time to work on it recently. |
Well, technically it does work in the browser. You just need to add some workarounds to prevent loading some node libraries, but if you do, it works pretty well. I still do think those workaround should not be needed, especially because most of the work is already done in the library 😄 |
Thanks for your feedback. I'll leave this issue open until I can get browser working properly. |
That's a pretty cool library, thanks for building it!
Small problem: it force-requires "fs" and "path". That prevents the code from loading in the browser.
Which is annoying, because the elfinfo actually runs really well in a browser. I made it work by adding this in Webpack:
I think we should not need to do this hack, but instead elfinfo should only require fs and path when actually needed.
The text was updated successfully, but these errors were encountered: