Supporting Rust & WASM in a library

Are there any Rust libraries that demonstrate how to support both Rust and WASM?

I have thought about options such as creating a dedicated WASM crate and creating wrappers over types, but I would like to know if there's a simpler way?

Thanks

WASM is a target to which Rust code can be compiled. It is not clear to me what is your question. Can you elaborate?

Sure. I want to export the types and functions to use in JS. This is what wasm-bindgen does, except I don't want this used in my main crate.