[resending -- gmane seems to have dropped my earlier email]
dan...@fablefactory.com.br writes:
> It would be really nice to run dart snapshots just as executable files
> on console, just like it is possible to do with luaJIT or Java.
These worked for me:
sudo update-binfmts --package dart \
--install dart-script /usr/bin/dart \
--magic '\xf5\xf5\xdc\xdc'
sudo update-binfmts --package dart \
--install dart-jit /usr/bin/dart \
--magic '\xdc\xdc\xf6\xf6'
This is for dart 2.0.0-dev.32.0 on a 64 bit Ubuntu 16.04 system. Make
the snapshots executable, and it should work.
I don't know if the magic numbers for the snapshots are correct, or will
change in the future. The numbers are the same for 1.24.3 on Mac
OS. The docs at
https://github.com/dart-lang/sdk/wiki/Snapshots say
These snapshots are CPU architecture specific, so a snapshot created
by an x64 VM cannot run on an IA32 VM or vice versa. Also, because
different code is generated in production mode and checked mode, an
app snapshot created in production mode cannot be run in checked mode
or vice versa.
Faried.