-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: cbindings - allowing libwaku.so (dynamic) library #1730
Conversation
Do you know why is the confutils imported in the nat.nim? It seems like a pretty low-level library? Would it make sense to take a look at that and try to remove the dependency on confutils (if possible/feasible), rather than copy over the file? |
Yes, it imports Actually, I think the |
Well, I meant to contribute to the nim-eth repository and then update the dependency if/when they merge it - It's fine to keep the file around until that happens with a note and a link to the upstream PR/issue. But up to you, I am just not a big fan of keeping copied files from external repositories around:) Makes maintenance harder in case of security issues in dependencies etc. Or at least file an issue on nim-eth asking if it is possible for them to remove the dependency by moving the parseCmdArg outside of nat.nim and see what they say?:) |
I absolutely agree mate. I don't like either that so I will raise an issue for them and see what they say :) |
Hi @vpavlin, I've created the next PR but I can't add reviewers into it. |
Awesome! |
In order to help the review, perhaps it's a good idea to split the nat changes to a separate PR first? What changes were introduced from the original Also, I assume there's no way we can create a wrapper for the nim-eth nat module that reuses some of the functionality rather than rewrite everything (I haven't checked how widely the imported |
I believe the only real solution is to get this fixed upstream (i.e. in the dependency), but I agree that to unblock this PR until upstream fixed, very clean and explicit changes to the forked nat.nim are necessary. |
04d13d9
to
264baa8
Compare
@Ivansete-status Good idea to convert PRs like this one to "Draft" while it's not ready to be merged. |
3df88b9
to
494b2f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THis looks way cleaner:) Thanks! LGTM
Description
This PR aims for adding the option to create a dynamic linking library (libwaku.so.)
To change the type of library just pass
STATIC=true
to the Makefile command, and it will generate a libwaku.a. If nothing is passed, it builds dynamic library by default.How to use it
Create cwaku_example
make cwaku_example STATIC=true -j8
make cwaku_example -j8
Generate the library itself:
make libwaku -j8
.`-> produces: build/libwaku.so
make libwaku STATIC=true -j8
`-> produces: build/libwaku.a
Issue
#1632