Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

100
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda