Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

103
Vistas
WASM with thread support not working on Google Chrome iOS

I have some threaded (pthread) & non-threaded WASM processes running perfectly in several versions of Google Chrome in Android, Mac OS X, Windows, etc across different machines.

I was lucky enough to get hands on an iPhone13 for testing (iOS 15.3, Chrome 97.0.4692.84). Cross Origin isolation is enabled and SharedArrayBuffer, which is needed for threaded WASM, is supported in this iOS version (https://caniuse.com/sharedarraybuffer).

Unfortunately the WASM code does not run and it stops on the first call to WASM from Javascript.

If i disable USE_PTHREADS on the emscripten compilation then the non threaded WASM works but obviously the threaded one doesn't.

My compilation is done using:

emcc -std=c++11 -O3 -s ALLOW_MEMORY_GROWTH=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -s EXPORTED_RUNTIME_METHODS='["getValue"]' -s test.cpp -o test.js

Do you have any insight on why (Chrome) on iOS is failing even though there is support for things to run properly? I have some feedback of other people that claim threaded WASM running on iOS so any insight would be helpful.

I can provided barebones/example code if necessary.

Thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Just in case someone hits this issue:

-s ALLOW_MEMORY_GROWTH=1 is the root cause of the issue. For things to work in iOS Safari/Chrome then this flag needs to be disabled -s ALLOW_MEMORY_GROWTH=0

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda