demumble icon indicating copy to clipboard operation
demumble copied to clipboard

Form repository into library + executable

Open eyalroz opened this issue 1 year ago • 2 comments

c++filt is great, but - it is also useful to be able to demangle in code. Since the functionality is already here, why not rearrange this project so that one of the targets is a (C++ I guess) library for demangling, and the executable uses it?

eyalroz avatar Sep 10 '24 22:09 eyalroz

That's already kinda the setup -- the main binary is all of 187 lines. What concretely would you change?

nico avatar Nov 03 '24 14:11 nico

I would:

  1. Add a(n aptly-named) library target in the CMakeLists.txt
  2. Have the executable target depend on the library target
  3. (Add cmake --install support for the library ; this takes some CMake voodoo)
  4. Potentially, streamline the interface between the executable and the library so that the latter is easy to use and difficult to abuse)
  5. Specify and document the library's API clearly, e.g. in the README.md file.

eyalroz avatar Nov 03 '24 15:11 eyalroz