mirror of
https://github.com/huggingface/xet-core.git
synced 2026-06-04 13:30:29 +08:00
Currently, session runtime routing is split between XetSession and XetRuntime. This PR centralizes runtime routing in XetRuntime, moving all wrapper structs there. Now, bridge_async / bridge_sync work universally to bring from async and sync runtimes. This PR also changes the default behavior to having the default new() method auto-detect whether the process can run inside an existing tokio runtime with valid features enabled vs. creating a new one. Also, then, with_tokio_handle() errors out if the provided tokio handle doesn't have the correct features.