tch is a crate wrapping the libtorch C++ library. I'm no FFI expert, but I assume this is fine as Rust's aliasing and mutability guarantees do not extend into C++ memory.
there's a choice for the api design, and apparently the author of tch-rs chose to mimic the C++ api. quoting the very first paragraph of the readme file:
The goal of the tch crate is to provide some thin wrappers around the C++ PyTorch api (a.k.a. libtorch). It aims at staying as close as possible to the original C++ api. More idiomatic rust bindings could then be developed on top of this.
if you don't like the api design of this libtorchbinding crate, an alternative to tch is candle, which should feel more idiomatic.
note, the implementation of candle still has reference semantics and interior mutability, it uses internal locks (an Arc<RwLock<...>>, to be specific) , similar to libtorch, but the api is mostly value based. it actually takes non trivial effort to do in-place modifications.