upb icon indicating copy to clipboard operation
upb copied to clipboard

can not build for wasm because setjmp

Open calvin2021y opened this issue 3 years ago • 4 comments

to build with wasm32-unknown-wasi, need remove setjmp for wasm target

calvin2021y avatar Jul 16 '22 06:07 calvin2021y

setjmp is a major part of upb's error handling. While eventual support for wasm is desired, this is not a thing we will be starting for a number of months.

fowles avatar Jul 16 '22 14:07 fowles

If there is away to replace setjmp with a slow speed solution for wasm, please give some tips. disable error handing for wasm also acceptable.

with UPB tiny size, it is very suit for deploy protobuf into browser or other platform support wasm.

calvin2021y avatar Jul 17 '22 06:07 calvin2021y

Disabling error handling is not acceptable for us. It would require significant code rework to avoid setjmp/longjmp here.

fowles avatar Jul 17 '22 15:07 fowles

Ugh. The trend in upb is actually to move towards more setjmp/longjmp, not less, because of how much simpler and more efficient it makes everything else.

ericsalo avatar Sep 07 '22 17:09 ericsalo