Racket CS modules are compiled to native code so you can ship those around and reverse-engineering them would be about as hard as reverse-engineering any other natively-compiled code. You’d have to compile these separately for every platform you want to target. I believe there’s a way to ship modules in “linklet” form, which is platform-independent, and Racket CS will convert those to native code on first run, but I’ve never tried it.
Thank you for writting this.
With regards to distribution options with racket,
Is there a way to ship platform independent, but hard to reverse engineer ‘precompiled’ binaries ?
For example for deploying closed-source software into a private enterprise (where the servers are controlled by customers)
Racket CS modules are compiled to native code so you can ship those around and reverse-engineering them would be about as hard as reverse-engineering any other natively-compiled code. You’d have to compile these separately for every platform you want to target. I believe there’s a way to ship modules in “linklet” form, which is platform-independent, and Racket CS will convert those to native code on first run, but I’ve never tried it.
Here’s the output of running
raco decompile
on the compiled version of the app in the post: https://gist.github.com/Bogdanp/64a7ef659d6376fff918e3cb23518f9bThe serendipity is high right now as I have Dr Racket open right now and am working on a web app. Thanks a ton @bogdan.
Interesting. Any experience with cross-compilation? Apparently there’s:
https://docs.racket-lang.org/raco/cross-system.html
But doesn’t appear to have a lot of convenience around it (eg: no “raco add-target win64; easily compile for win64”)?
I’d never tried it before, but it seems to work great. I downloaded a build of Racket CS for linux to
~/Downloads/racket
and then ran the following:Someone could definitely make this easier by providing a package to add a
raco
command like the one you’ve suggested.Interesting. I have enjoyed doing some scheme in the past.