Install Chawan browser (and Nim) from source
Introduction
In my previous post about setting up my uConsole, I said that instead of using Firefox, I try using chawan, a TUI browser with (some) CSS, JS and images support. Sometime I still use Firefox, but try to limit its usage for when a page is really not usable in Chawan. The reason being the very limited CPU of the RaspberryPi 4 powering my uConsole (I could switch to a RaspberryPi 5 but other than for Firefox, I don’t see the need).
This post explained how I installed Chawan on a RaspberryPi (4) as Nim, the programming language used to develop Chawan, is not available in Debian Trixie.
Install Nim
First, install the required dependencies if you haven’t already:
sudo apt -y install build-essential openssl curl
Then, download the Nim source:
cd workspace/contrib/nim
wget https://nim-lang.org/download/nim-2.2.4.tar.xz
tar xf nim-2.2.4.tar.xz
cd nim-2.2.4
We can start the build process:
./build.sh
The next step is to build koch, the official maintenance script for Nim:
bin/nim c koch
./koch boot -d:release
And finaly install some Nim tools as well as Nimble, Nim’s package manager:
./koch tools
./koch nimble
Next step is to install everything in a more useful place than this working directory. I decided to install it locally for my user (in ~/.nimble and not system wide (but you could use /usr/bin or equivalent instead). I also copied the other binary files I compiled before in that same repository
./install.sh /home/<userName>/.nimble
cp ./bin/* /home/<userName>/.nimble/nim/bin/
And at last, add the ~/.nimble/nim/bin/ directory to your $PATH in your ~/.bashrc or ~/.zshrc or equivalent and then reload it, eg:
source ~/.zshrc
Just to try, you could run:
nim --version
If you don’t have an error and it shows the compiler version, you did it :). Example in my case:
➜ nim --version
Nim Compiler Version 2.2.4 [Linux: arm64]
Compiled at 2025-10-22
Copyright (c) 2006-2025 by Andreas Rumpf
active boot switches: -d:release
That took some time, specially on a raspberry pi, but we are done with Nim’s installation, now let’s focus on chawan!
Install Chawan
Let’s start by installing build dependencies that you don’t have yet on your system:
apt install libssh2-1-dev libssl-dev libbrotli-dev pkg-config make
Then, we download the source code of Chawan:
cd ~/workspace/contrib
git clone https://git.sr.ht/~bptato/chawan
cd chawan
And build Chawan:
make
sudo make install
And now you can start it and browse the web in your terminal with a better experience than elinks or w3m :).
Conclusion
While Chawan is still young, it is already a nice project and I can’t wait to see how awesome it will be in a year or two with a bit more css working and maybe some kind of tab management (but that’s because I’m a tab maniac). Thanks for bptato and all contributors!