You're sort of describing the design idea common in unix-y areas to build libfoo that does all the work, then a foo frontend that makes tasks useable from the command line. I don't know how widely used this model is, but it's certainly out there.
The difference is that in what I've described, the ABI is the common interface and an RPC server would be just another consumer of the library.
The difference is that in what I've described, the ABI is the common interface and an RPC server would be just another consumer of the library.