On 05/09/2012 05:09 PM, John Clements wrote:
In particular, I would expect the JIT to be totally broken, and that
there would be a lot of painful parts related to linking to standard
libraries, but the resulting program could actually do client-side
compilation in a web browser, right?

Yep. My initial experiments in this direction suggested that getting it to compile and run with emscripten was Difficult. I didn't put very much effort into it though. I don't remember exactly where I got stuck, but the attached is a build script I was using to try to iterate closer and closer to an appropriately-configured and -compiled Racket.

Regards,
  Tony
#!/bin/sh
# First, mkdir .../racket/src/build, then from there, run this script.
EMSCRIPTEN_PATH=~/src/emscripten-racket/emscripten/tools
EMMAKEN_JUST_CONFIGURE=1 \
    RANLIB=$EMSCRIPTEN_PATH/emmaken.py \
    AR=$EMSCRIPTEN_PATH/emmaken.py \
    CXX=$EMSCRIPTEN_PATH/emmakenxx.py \
    CC=$EMSCRIPTEN_PATH/emmaken.py \
    ../configure \
    --host=i686-pc-linux-gnu \
    --target=i686-pc-linux-gnu \
    --enable-racket="`which racket`" \
    --disable-gracket \
    --disable-plot \
    --disable-jit \
    --disable-foreign \
    --disable-pthread \
    --disable-futures \
    --disable-places
sed -i bak -e 's:/\* #undef MZ_CAS_AVAILABLE \*/:#define MZ_CAS_AVAILABLE 1:' 
racket/mzconfig.h
echo '#define NO_TCP_SUPPORT 1' >> racket/mzconfig.h
echo '#define SCHEME_PLATFORM_LIBRARY_SUBPATH "js-emscripten-0.0"' > 
racket/src/schsys.h
touch racket/starter
_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev

Reply via email to