4 ms·
You could use the XCode linker to embed your JS/WASM code in the binary as a read-only resource/section, and then run it using JIT-less V8. Interpreted code is
by 0815test 8y ago
You could use the XCode linker to embed your JS/WASM code in the binary as a read-only resource/section, and then run it using JIT-less V8. Interpreted code is generally more compact than a native ISA like ARM64, so this could be useful in order to reduce app size.
- k__ 8y agoAlso, to use the same engine for all platforms
- saagarjha 8y ago> You could use the XCode linker to embed your JS/WASM code in the binary as a read-only resource/section, and then run it using JIT-less V8. Or just read it from a file?
- 0815test 8y agoIt needs to be embedded in the binary, because code that is not so embedded has different rules applied to it. So, it has to be done either in the compiler (e.g. as compile-time const arrays, which will then be part of the rodata section) or in the linker; the latter is arguably a bit easier.
- DonHopkins 8y agoThat's a lot like what Unity3D used to do with Mono CLR byte code on iOS. But now it uses IL2CPP to compile it into C++.