-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
multimanifest extension support #1397
Conversation
Not a big deal, we can adapt the armory, it will just take some time to rework all the existing manifests. |
I had the idea of doing something a bit different for 1.6: one extension artifact supporting multiple entrypoints, and thus multiple commands in the client. This means we could have a single DLL with 3 exports that would become 3 commands, all in one manifest. It's doable with your scheme, but I need to see if we can optimize that or not. |
With multiple manifests in the same file you'd be able to just have multiple manifests with different entrypoints to support the DLL's like you described. The only way that this approach is less efficient is there will be duplicated copies of the DLL in the .sliver-client folder, but unless you have hundreds of functions to call in a giant DLL, I don't see that being too much of an issue. I'd also like to add the ability to reload/unload multiple commands - so the multimanifest structure might need to change a bit from just a straight up array, to something like:
This would also probably help armory, but happy to defer to how you mob decide you want to do it. The failover manifest loading behaviour should work with that structure as well - but failover will only get us so far, so probably want to decide on a suitably flexible structure sooner rather than later |
Updates as discussed in Slack. tl;dr:
Also, had to add extensions back to the CLI - I suspect this will slightly break #1353. In saying that, I think the extensions CLI probably needs a little love as well (install vs load, etc) |
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.
Minor change, otherwise looks good. I'll have a look at the other PR soon.
Card
IDK what a Card is
Details
Allowed for extension manifests to be in an array, as well as a single json object. This should allow for a single manifest per repo in the cases where multiple BOF's (or multiple DLL's I guess) are present, and the structure of the repo might make having manifests per-folder a bit tricky.
This seems to work mostly pretty seamlessly with current extension functionality, but I haven't thoroughly tested everything in anger.
One of the parts I'm not completely sure about is how this will impact armory - as it seems armory relies on the manifest being coupled to a single command (which is not really going to work with multimanifest).
The other part is how tar.gz files are handled (related to above I assume), I've worked around it here but I can see the way this function works being misleading to anyone who wants to fiddle with extensions in the future.