nico / demumble

A better c++filt and a better undname.exe, in one binary.
Apache License 2.0
339 stars 50 forks source link

Form repository into library + executable #39

Open eyalroz opened 2 months ago

eyalroz commented 2 months ago

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?

nico commented 3 weeks ago

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

eyalroz commented 3 weeks ago

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.