Building a release executable


When a RimStone application is built, by default it is a development build. It does not have optimizations (which are included in a release build), including the LTO (Link Time Optimization). In order to include all these optimizations, you must create a release build.

The LTO essentially treats your application source code as one with all the RimStone's source code, and optimizes it all together as if they are in a single source code. Well, it's a bit more complicated than that, but the end result is very much like that - meaning faster performance, sometimes 2x and even more.

To  make a release build, use "--release" with rim:
rim -q --release

Note that both release and development build have debugging information in them; release has the minimum amount and debugging has a lot. That's a good thing because this information in general doesn't affect performance but can be very useful when there's a problem. To be sure, RimStone provides built-in signal interceptor that will give you a full source-code stack when there's an issue, so using gdb for debugging info is more as a backup in case you can't figure it out based on the information provided.

One more thing: release build takes a lot longer to build than the development one. Working in all possible optimizations, including LTO, is a big job, but worth it when you need a final performant product. But when developing your application day-in day-out, don't use a release build - do it only when ready for production or peformance testing.


Copyright (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.