# How to pass rich data from a Wasm host to a Kotlin guest?

**URL:** <https://discuss.kotlinlang.org/t/how-to-pass-rich-data-from-a-wasm-host-to-a-kotlin-guest/29527>\
**Category:** WebAssembly\
**Created:** [November 15, 2024, 1:47pm UTC](https://discuss.kotlinlang.org/t/how-to-pass-rich-data-from-a-wasm-host-to-a-kotlin-guest/29527 "2024-11-15T13:47:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![bashor](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/bashor/32/1431_2.png) [@bashor](https://discuss.kotlinlang.org/u/bashor)\
**Post date:** [November 19, 2024, 8:45pm UTC](https://discuss.kotlinlang.org/t/how-to-pass-rich-data-from-a-wasm-host-to-a-kotlin-guest/29527/3 "2024-11-19T20:45:32Z")

</div>

Right, the only safe way now to work with linear memory is within the `withScopedMemoryAllocator` block.

---

_[View the full topic](https://discuss.kotlinlang.org/t/how-to-pass-rich-data-from-a-wasm-host-to-a-kotlin-guest/29527)._
