What if toolkit library is missing?
You can choose to not install any toolkit libraries when you setup RimStone (see install-rimstone). So what happens when at some point you write code that requires one of those libraries?
The answer is simple: RimStone will tell you that the library is missing and even show you the installation instructions to install it!
Here's an example of what that looks like in practicality.
Suppose you have a service that fetches Google web page (like in this article):
cat << 'EOF' > fetch.rim
begin-handler /fetch public
call-web "https://google.com" response text response-headers head
print-out head new-line
print-out text new-line
end-handler
EOF
Copied!
Now, since you didn't install the toolkit libraries, you may not have the "libcurl" library, which is a standard library used for things like fetching web pages. If you try to make your application:
rim -k get-page -q
Copied!
You will get:
RimStone: Required library [libcurl4-openssl-dev] is not installed. You can install it from command line with:
RimStone: sudo apt -y install libcurl4-openssl-dev
RimStone: Please install it and try again, reading file [fetch.rim], line [5].
There are errors in making your application (complete log at /home/user/.rimstone/apps/web/.bld/.make.output).
Copied!
So, like I mentioned above, you will get a clear message as to what the problem is, and even how to remedy it, so if you do as suggested (this is for Ubuntu, the exact name of the library may be different for you):
sudo apt -y install libcurl4-openssl-dev
Copied!
Now you can try again:
rim -k get-page -q
Copied!
RimStone will detect that a new library was installed, and it will:
- Recompile RimStone itself. This is because RimStone operates as a high-performance system and always uses LTO (Link Time Optimizations), which it applies not just to your code, but to itself as well!
- After that, it will make your application.
So, here's what you might see:
Recompiling RimStone objects due to change in installed libraries; this happens only when libraries used by RimStone are installed or removed. Please wait for it to complete.
Cleaning up RimStone for build.
..............................................................Built RimStone binaries (devel)
..............................................................Built RimStone binaries (release)
Built RimStone binaries (devel)
Creating RimStone directories (devel)
Copying RimStone binaries (devel)
Built RimStone binaries (release)
Creating RimStone directories (release)
Copying RimStone binaries (release)
RimStone objects recompiled, continuing.
Copied!
And voila, your application is now ready, just run it:
rim -r --req="/fetch" --exec
Copied!
You will see the source code for Google web page.
Regardless of which exact library (or libraries) you're missing, the process described above is the same. RimStone will guide you through it until done!
Copyright (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.