To enable this optimization, instead of running
rake, you can simple run the following command:
My test shows that the file size has been further reduced to only 401k!
Notice that now the linking time is longer than the normal case, so I suggest you only use optimization mode only when releasing your code, and continue with the non-optimization option when developing.
There's also a small API changes from what I described in the tutorial. Now the HTMl skeleton for invoking webruby looks like following:
WEBRUBY serves as a function instead of an object. With each run of
WEBRUBY(), you can have a separate webruby instance for running Ruby code. The mruby state,
mrb, is now encapsulated in the returned object of
WEBRUBY(). You do not need to specify it manually now.
Personally, I think this new API is a little simpler. However, if you have other opinions, please feel free to leave a comment here:)