Abstracting over threadpool and current_thread runtimes (tokio)

It depends on the exact things you are trying to do, but you might be out of luck. Rust isn't very flexible over Send. Some discussion here:

There was a bunch of discussion about how to spawn from libraries here, maybe it interests you: