Here is an example of how you might create a custom wrapper to interact with TensorFlow.js in Rust:
You can also use wasm-bindgen to define structs and return them to the JavaScript side. And also create some utility function for the tensors manipulation. Note that this is just a simple example, you can use this approach to make more complex operation, and also use it as a base for creating a more robust wrapper.
You can find more information and examples in the official documentation of wasm-bindgen: https://rustwasm.github.io/wasm-bindgen/