There is a way to pass user object to wasm in WAVM: https://github.com/WAVM/WAVM/issues/138#issuecomment-483036386.