Exploring the Compiler

An implicit require "prelude" gets inserted into the beginning of all crystal programs, and will either load this file, or a different crystal file if the --prelude <new-prelude> build option is provided.

I don’t quite understand what you’re saying, but, i use this hack too add some crack code before run an crystal application. e.g. like following:

crystal run --prelude hacked_prelude "$@"

Assume following is the content of hacked_prelude.cr

require "prelude"

# others code need to run before run app

This feature almost same as the usage of $RUBYOPT ENV for Ruby.