Best way to integrate xplr into another project #210
-
Hey! I'd like to integrate xplr to gpg-tui for file selection. By integration I mean using it just for selecting a file. See gpg-tui#2. First option is to run Second option is using the library to run xplr TUI. I'm not sure how easy that'd be so that's why I'm asking here. Which one do you think is better? What are the downsides? Do you have any other suggestions/ideas? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I'd first go with the command option and see if there's any limitation. I haven't checked but cargo should have an option for adding external crate bin as dependency. If not, another option would be to add a simple plugin interface that can auto install binaries, and can be reused to support other non-rust binaries too. For e.g. fzf. If you prefer tooling to be tightly integrated, xplr can be used as a library but I would like to add some final polish to the API first. You then can't use fzf and have to go with options like skim which also provides a library API, which you can use right away. So if you want to go this path, try integrating skim and let me know. I'll then polish the xplr lib and make it ready for integration. |
Beta Was this translation helpful? Give feedback.
I'd first go with the command option and see if there's any limitation. I haven't checked but cargo should have an option for adding external crate bin as dependency. If not, another option would be to add a simple plugin interface that can auto install binaries, and can be reused to support other non-rust binaries too. For e.g. fzf.
If you prefer tooling to be tightly integrated, xplr can be used as a library but I would like to add some final polish to the API first. You then can't use fzf and have to go with options like skim which also provides a library API, which you can use right away. So if you want to go this path, try integrating skim and let me know. I'll then polish the xplr l…