add small stub for interrupt callbacks, and refactor for weird rust
failure handling