Syncronously initializing CSG2?

How do I initialize CGS2 syncronously from within a non-async function?

If I use await BABYLON.InitializeCSG2Async();, it has to be within an async function. Then that function becomes asyncronous itself, right?

Can I avoid polling with IsCSG2Ready()?

Maybe I misunderstand async/await.

You can not really convert a promise based code in a synchronous one.

If I use await BABYLON.InitializeCSG2Async(); , it has to be within an async function. Then that function becomes asyncronous itself, right?

Yes and you could also keep the caller sync but in your function do something like:

BABYLON.InitializeCSG2Async()
  .then(() => { yourCode(); });
  .catch((e) => { yourErrorCode(e); });

That’s due to the limitation of wasm module size (4k) of WebAssembly.Module and WebAssembly.Instance constructors, which is the sync api to use wasm.
See this for more detail.
https://chromestatus.com/feature/5099433642950656
https://groups.google.com/a/chromium.org/g/blink-dev/c/nJw2zwaiJ2s/m/EYPgC5D3LwAJ