Hacker News new | ask | show | jobs
by bcg1 3380 days ago
If you have these compiling with a modern toolchain, you may wish to ditch the python subprocess wrapper and compile them with something like emscripten (compile to javascript) or NestedVM (compile to JVM bytecode). Then you won't be exposing 30 year old unsafe code directly to the internet... at least it would sandboxed. If you use emscripten you could even have the programs run client side.

I have a fork of NestedVM that I've been using with success but I don't have any simple examples for you:

https://github.com/bgould/nestedvm

Here is an example of compiling the Apache Thrift compiler to run on the JVM:

https://github.com/bgould/thrift/tree/nestedvm/contrib/neste...

And I have a version of the toolchain precompiled as a docker image:

https://hub.docker.com/r/bcg1/nestedvm/ https://github.com/bgould/thrift/blob/nestedvm/contrib/neste...

1 comments

Very nice, thanks! Third time I read something like this today, so worth considering I guess. Thanks a lot for the links!