Share Threejs geometries with .wasm

I have a number of problems I need to solve using third party solvers written in c++.

I am hoping to save myself the memory overhead of doing the I/o by sharing memory between Threejs and my library.

Has anyone pursued this at all? I would need to essentially write c++ side geometries for Threejs.