Caution
This browser is not guranteed to be safe. While it does try to follow basic security practices, some things may be unsafe. Use at your own risk. This is also a work in progress. Expect instability from time to time, and report bugs as needed.
A lightweight browser that can load and render basic websites.
The reason I began this project is because there didn't exist any other modern, performant and lightweight browser that could run on my Futijsu Lifebook P1510 a little bit smoother. Another reason of this project is to test my own knowledge, and mostly just for fun. This may not make it to the final goal.
There is some basic UI, with tabs that can be clicked on and closed. Some buttons that can be clicked on. And a input bar that can be clicked on and typed.
- nlohmann/json - MIT
- backward-cpp - MIT
- Dear ImGui - MIT
- tinyxml2 - Zlib
- libcurl - curl license
- Get networking and graphics working
- win32
- Get window creation working
- Input
- Software renderer
- Hardware renderer
- X11
- Get window creation working
- Input
- Software renderer
- Hardware renderer
- Draw the received HTML data from networking
- win32
- Get a basic subset of HTML working
- TODO
- Get the full subset of HTML working
- TODO
- Get the V8 JavaScript engine working
- TODO
Currently, only 2 platforms are supported.
This project uses libcurl. libcurl requires a certificate file in order to attempt HTTPS connections. Get it here. After you download the certificate file, rename it to cacert.pem and move it to the project folder.
You shouldn't need to do any other major steps to get it building other than getting the libcurl binary in the right place.
This would have had an automatic building process but I couldn't quite get OpenSSL to build in Windows
- Go to https://curl.se/download.html
- Scroll down until you find "Windows 64-bit binary the curl project" highlighted in yellow. Click on the version number.
- As of writing, this project currently uses libcurl 8.11.1
- You can get that information in the app logs
- Click on "curl for 64-bit".
- Extract the recently-downloaded ZIP file and rename the curl folder to
curl64. Then put it in the project folder. - If you're using a 32-bit machine, follow the same steps but select
32-bitinstead. And rename the folder tocurl32.
This project uses CMake and Ninja. I develop this on Windows using Visual Studio Code with the C/C++, CMake, and CMake Tools extensions. Then you need the MSVC compiler (which can be obtained by installing it from Microsoft's official site, or by downloading Visual Studio 2022 and installing "Game development for C++" without anything but MSVC).
If you're using Visual Studio Code, it's as simple as setting the preset to x64 Debug (Windows) and just clicking the little play button (Launch).
If you're using 32-bit, select the x86 Debug (Windows) preset.
Otherwise, here are the commands that Visual Studio Code runs. Note that the file paths are specific to my setup. I will sort it out to something more user-friendly at one point.
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_INSTALL_PREFIX=C:/Stuff/programming/c++/tinyweb/out/install/x64-debug -SC:/Stuff/programming/c++/tinyweb -BC:/Stuff/programming/c++/tinyweb/out/build/x64-debug -G Ninja
cmake --build C:/Stuff/programming/c++/tinyweb/out/build/x64-debug --parallel 6 --target tinyweb
This is a LOT easier since you have a package manager out of the box. But first, make sure you install the following packages:
sudo apt install pkg-config g++ cmake ninja git libx11-dev
You can simply install libcurl4-openssl-dev via apt or whatever package manager you have.
sudo apt install libcurl4-openssl-dev
This project uses CMake and Ninja. I develop this on Ubuntu 22.04.5 LTS using Visual Studio Code with the C/C++, CMake, and CMake Tools extensions. Then you need the gcc and g++ compiler, both of which can be easily installed via apt.
If you're using Visual Studio Code, it's as simple as setting the preset to x64 Debug (Linux) and just clicking the little play button (Launch).
If you're using 32-bit, select the x86 Debug (Linux) preset.
Otherwise, here are the commands that Visual Studio Code runs. Note that the file paths are specific to my setup. I will sort it out to something more user-friendly at one point.
/usr/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/home/voxelstice/source/tinyweb/out/install/x64-debug-linux -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_INSTALL_PREFIX=/home/voxelstice/source/tinyweb/out/install/x64-debug-linux -S/home/voxelstice/source/tinyweb -B/home/voxelstice/source/tinyweb/out/build/x64-debug-linux -G Ninja
cmake --build /home/voxelstice/source/tinyweb/out/build/x64-debug-linux --parallel 6 --target tinyweb