Webassembly and OpenFL/Lime

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!

1 Like

No news for webassemblies???

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

2 Likes

@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

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.

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…

I am very disappointed because emscripten always give out “SIMD” But I don’t use SIMD yet.

I tried openfl test emscripten -release -clean -Ddisable-simd and more arguments for emscripten. It won’t work yet.

AssertionError: SIMD is used, but not supported in WASM mode yet

I feel arguing to emscripten because SIMD is like ignorer for wasm. How do I find package from Ubuntu. but I can’t find here what is name of SIMD? But SIMD I haven’t to install simd packages under Ubuntu 18.04. I feel emscripten doesn’t allow me to use webassembly. - I am not jailed coder - just I am serious. I really don’t understand why emscripten always ignore with haxe into wasm?

It’s something in the C++ that makes it think that we’re trying to use SIMD functions, but to my knowledge, we’re not. This was not an issue with earlier Emscripten versions, so it may be a matter of trying to use emsdk to install older SDK versions to find the right one. That’s what I noticed when I went to another computer with a working (older) install, that this SIMD error was not thrown, and I was able to complete an asm.js build

Yes you are right, But I have to try with LearnOpenGL’s Github and it throws error: warning unresolved symbols glad_… I really don’t believe that. it is really impossible to support for outside header files and it can’t apply to unknown headers.

I really want know and which version you have got working webassembly-able website?

1.22.xx or 1.30.xx ???

The other machine had 1.37.14 installed

1 Like

I will try… If It works…

I have the same build error on Ubuntu.
I build the openfl-sample BunnyMark with “openfl build emscripten”, then fail to build:
“AssertionError: SIMD is used, but not supported in WASM mode yet”

Exactely same problem for me, the canvas seems work well, but i have just a black screen ! i be under win10. (sorry for my english).

Edit: Semble résolu…