Moosh is PHP. It's not compiled.
Although I don't completely understand what you're trying to do I think I may have done something similar. I wrote a plugin within Moodle to 'queue' backup tasks in a table and then ran Moosh in the background (using cron) to pick up those tasks and execute them.
I'd be very reluctant to re-code the backup software. It's *very* complicated and (in my experience anyway) you're unlikely to get any help with it.