Can you use drywall mud on hardiboard?
I don't see why not.  Hardiboard has even more texture than sheetrock for mud adhesion and at least as good of moisture absorption, so mud should adhere quite well.  Certainly the flex of Hardiboard is less than sheetrock, so there should be no issues with flexing causing cracking of dried mud.

But why would you want to?  Hardiboard is at least three times the cost of sheetrock and harder to install.