[plt-scheme] Requiring compiled modules

From: Noel Welsh (noelwelsh at gmail.com)
Date: Wed Mar 25 12:23:26 EDT 2009

On Wed, Mar 25, 2009 at 1:55 PM, Matt Jadud <jadudm at gmail.com> wrote:

> I want to compile a module to bytecode and require it without the
> source file. I skimmed through the mzc docs, tried using "mzc --make",
> and... I think I don't know how to require it in properly.
> How do I
> 1. Compile a module to bytecode and

  mzc my-file.ss

will compile the file and all its dependencies

> 2. require it in so that

require will automatically load bytecode in preference to source if
the bytecode is newer than the source

> 3. I can distribute a module to my students that I want them to use,
> but don't want them to have the source for?

Not sure, but perhaps nuking the source and keeping the compiled
directory will work. You could build a .plt using mzc or perhaps using
the planet command line tool. You'll need an info.ss for this to work.


Posted on the users mailing list.