Recommended Posts

This seems to be promoted as an alternative to browser plugins, a way to write native code for the browser. I wondered if anyone has played with it or investigated much? I was particularly interested in how much you'd have to hack exist code to make it fit into NaCl. Say you have an app using a 3D engine or D3D/GL - is it a mighty rewrite?

0

Share this post

Link to post

Share on other sites

Its supposed to be relatively straight-forward, however I believe there's no support for inline assembly. Assembly intrinsics for SIMD are supported however, IIRC, so you could port any legacy assembly or SIMD code and still work.

There are a number of security features in place that you have to be mindful of, however -- for example the compiler restricts alignment so that it can better detect certain kinds of attacks or overflow issues, and it disallows self-modifying code for similar reasons.

Also, I believe the graphics API is OpenGL|ES-based, so its not a 1-to-1 port from OpenGL, nor is Direct3D possible last I had heard.