[DX] plugin support at the library level #480
AnomalRoil
started this conversation in
UX reports
Replies: 1 comment
-
I have exactly the same problem. I'd love to get plugin support at the library level |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My use case is really that of a developer using
age
as a library, so with the recentage
v1.1.0 release that brought official plugin support, I figured I'd start trying to use plugins. I'm starting slowly, just trying to use the Yubikey-agent plugin for now.However, as a developer, I'm facing quite a few DX issues, which I'd love to discuss here.
My first issue is that it seems that currently the native, exported
ParseIdentities
method is only supporting X25519 identities:age/parse.go
Lines 21 to 23 in 8e3f74c
Is there any specific reasons for expecting users of the library not to want plugin support?
Or maybe any guidance as to how this should happen for a library user?
Now, there are unexported methods in your main CLI package that support plugins:
age/cmd/age/parse.go
Lines 198 to 210 in 8e3f74c
So I figured, sure enough, I could just copy the required code in my own codebase, but here comes my second issue:
the package
plugin
is currently in theage
internals: "filippo.io/age/internal/plugin", which means I cannot import it to useplugin.NewIdentity
in my code.I could have tried to copy the whole plugin package in turn, but then I would have to also copy the
bech32
andformat
ones...I realize that plugins are basically just executed as binaries by
age
and so I guess I could as well just invoke theage
binary directly in my code, but then it's not really acting as a library anymore.So, what's your take on the plugin part and
age
as a library? It would be nice to easily have hardware token support for many use-cases.Beta Was this translation helpful? Give feedback.
All reactions