Re:WebAssembly: a binary format for the web
by david_ar on Sunday November 01, 2015 @08:14PM
(#10489351)
I'd argue Haskell has the best support for this: http://safehaskell.scs.stanford.edu
Re:WebAssembly: a binary format for the web
by codygman on Monday November 02, 2015 @07:59AM
(#10491564)
Example:
source:
https://github.com/chrisdone/tryhaskell
For those that just want to see the sandboxing part, I think most of the magic is in mueval but I could be wrong:
Re:WebAssembly: a binary format for the web
by fanf2 on Tuesday November 03, 2015 @01:47PM
(#10501610)
Difficult, yes. There was an attempt by Google at a capability-secure JavaScript called Caja <http://www.links.org/?p=271>. I think it failed mainly because taming the standard library and DOM was too hard - there were too many leaks of ambient authority.
Re:WebAssembly: a binary format for the web
by frame_perfect on Monday November 02, 2015 @02:33AM
(#10490536)
In Lua, you can set the allocation function (for memory limits) and I think you can set time limits by using coroutines.
Probably because it is stupidly difficult to do robustly, especially when the language and standard libraries weren't originally designed to do that.
Lua is perhaps best positioned for this given how tightly you can lock it down (you can remove the 'require' function that loads other modules). But even this is considered not robustly secure against untrusted code.
http://lua-users.org/wiki/SandBoxes