Webassembly and OpenFL/Lime


#1

Hello everyone, how is your development now? I am sorry for long busy. I listened about news about emscripten. But i have tried yesterday. No success because it looks like emscripten from github or from package of Ubuntu 18.04 can’t work. But LLVM has issue now.

I want say sorry for old time. I want respect you because Internet is meaning public thing.

I have tried emscripten sdk but it works fine for successful compilation with Shading but it looks only black canvas and i have tried DisplayingBitmap is same black canvas. Is emsdk very buggy?

I am new for webassemblies. I never used since 2014. But i am blind because Unity3D is fast to able webassemblies because I tried creating website format and I saw shat are data, js and wasm? But Unity 3D generates no wasm fils just embedding in data. Now I test emscripten with OpenFL examlles but @singmajesty said DisplayingBitmap works fine. But I test and I see nothing picture of Bitmap in browser. It looks like only black full canvas.

Now I saw files for webassemblies like wasm in nautilus wow.

I already upgrade and try emsdk with incoming64.

Thanks and kind regards!


#2

No news for webassemblies???


#3

Hi,

I installed the emsdk again, fresh, on Linux. Using the latest emsdk environment, I found some minor issues I resolved in the development Lime codebase, but I got stuck trying to rebuild Lime, as the emsdk says that there are SIMD instructions, and fails to compile because these are not supported. I checked and checked, and could not find any where in our code that SIMD instructions were being used. I enabled some in the process of checking for “pixman” when compiling for the desktop, but otherwise the libraries “sdl2” and “mojoal” were the ones I found with SIMD instructions, and neither is built when targeting Emscripten/WebAssembly.

Unfortunately, I cannot test if I cannot rebuild Lime. If it builds and runs, we could look at what is wrong. In my experience, WebAssembly was not really faster than standard JavaScript. In fact, in some browsers it worked much worse and crashed the browser.

I’d be happy to help, though we’ve limited our investment in WebAssembly due to the complexity of updating the toolchain of Emscripten (we’ve especially seen issues on Windows) and not a lot of clear benefits


#4

@singmajesty yeah i have tried fresh installation. It doesn’t help me. I have not experience about Webassembly. So sad I have tested but it looks black canwas if i type “openfl test emscripten-asm” but i don’t build lime rebuild emscripten because it is sometimes incompatible. And it looks black.

I will check LLVM of Mono Project / Github because it looks like very stable LLVM. I will copy to lime from github and pass to emscripten build like lime rebuild emscripten and lime rebuild hxcpp emscripten. I will try tomorrow evening. Please remember LLVM really new feature for all computers, laptops, mobile phones and tablets and televisions and more. Since Visual Studio 2017 has new excited features like clang2 and thin statical libraries. I am surprised because Mono’s mkbundle said clang2 need to install and bit later I found LLVM because it is like small and can work whatever architect like x86 or x64 or arm etc into Webassembly or strong binary. That is why I need to know about emscripten but it seems not good like only JavaScript. It is really hard to find. Thanks I need learn more about webassemblies and I will resolve for cpp2wasm or js2wasm etc


#5

I tried again here on another machine (running Windows) that already had Emscripten version 1.37.14 installed. It rebuilt successfully, and Lime “HelloWorld” worked properly using lime test emscripten. I just tested “DisplayingABitmap” as well, and that worked, too.

I tried WebAssembly with HelloWorld, but it had an error while emitting the final file:

subprocess.CalledProcessError: Command '['C:/Program Files/Emscripten/clang/e1.37.14_64bit/binaryen\\bin\\asm2wasm', '../bin/HelloWorld.temp.asm.js', '--total-memory=16777216', '--emit-potential-traps', '-O2', '--mem-init=../bin/HelloWorld.js.mem', '--mem-base=1024', '--wasm-only', '-o', '../bin/HelloWorld.wasm']' returned non-zero exit status -1073740791

I can only assume this is improved in later releases, but the SIMD error is blocking me from testing that out properly.


#6

I am not ready because i am using Ubuntu 18.04.1 and i will try again don’t worry me! I will try evening today. Ps I am using not longer for Windows because Windows is really shit operating system.

// EDIT

I have tested: Wow It works fine for me Ubuntu 18.04
lime rebuild emscripten -64 -clean

than I create test with Away3D Shading
openfl test emscripten = error because it need “SIMD”

I think we need install from emsdk list any deps if you are not sure just all important but current architecture x64 or x86.

I think safe before I let compilations of clang, upstream, binaryem and sdk incoming and tags etc… If you are not sure to install important sometimes llvm has simd support

Thanks I will try…