demumble
demumble copied to clipboard
Form repository into library + executable
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?
That's already kinda the setup -- the main binary is all of 187 lines. What concretely would you change?
I would:
- Add a(n aptly-named) library target in the CMakeLists.txt
- Have the executable target depend on the library target
- (Add cmake --install support for the library ; this takes some CMake voodoo)
- Potentially, streamline the interface between the executable and the library so that the latter is easy to use and difficult to abuse)
- Specify and document the library's API clearly, e.g. in the README.md file.