Skip to content
PaskalCPP
Libraries

Vendor libraries

The C and C++ libraries bundled with PaskalCPP, each brought into a program by one import: graphics, windows and input, audio, physics, 3D models, video, compression, a SQL database, scripting, tile maps, JSON and XML, networking, an entity component system, a user-interface toolkit and the stb single-file libraries.

A vendor unit sets the include path, library path and link libraries its library needs on each official target and #includes its headers, so a program writes only import raylib; and calls the library's own C or C++ API (InitWindow, sf::RenderWindow). Nothing else is set up: the names are the library's, as its own documentation spells them. See C++ mixing for how C and C++ mix with PaskalCPP code.

The libraries

UnitLibraryVersionWhat it is
raylibraylib6.2games and graphics: windows, input, 2D / 3D drawing, audio
rlglraylib's rlgl6.2raylib's OpenGL layer (shaders, vertex buffers, render batch, blend state); built into raylib's library, import rlgl; adds only its header
rlimguirlImGuimain 1550009, Dear ImGui 1.93.0 (docking branch)Dear ImGui drawn through raylib, docking and its other docking-branch features included
sdl3SDL3.4.18windows, input, audio, GPU and platform services
sdl_gpSDL_gpupstreama 2D painter over SDL3's GPU API
sfmlSFML3.1.0C++ multimedia: graphics, windows, audio, network
glfwGLFW3.5.1windows, OpenGL contexts and input
box2dBox2D3.2.02D physics
miniaudiominiaudio0.11.25audio playback, capture and decoding
cgltfcgltf1.15glTF 2.0 loading and writing
pl_mpegpl_mpegupstreamMPEG-1 video and MP2 audio decoding
zlibzlib1.3.2deflate compression
minizipminizipzlib 1.3.2.zip archives, password-encrypted included (zlib's own minizip)
zstdZstandard1.5.7zstd compression, streaming and dictionaries
sqliteSQLite3.54.1an embedded SQL database, in one file or in memory (FTS5, R*Tree, math functions and JSON built in)
luaLua5.5.1a small, fast scripting language embedded in the program
mojoalmojoALupstreamOpenAL 1.1 over SDL3's audio: 3D positional sound
tmxlitetmxlite1.4.5Tiled maps: .tmx maps, .tsx tilesets, .tx templates, every layer encoding
ldtkloaderLDtkLoader1.5.3.1LDtk projects: .ldtk projects and .ldtkl level files
pugixmlpugixml1.16XML reading and writing, XPath
yyjsonyyjson0.13.0fast JSON reading and writing
enetENet1.3.18reliable, ordered packets over UDP, connections and channels
flecsflecs4.1.6an entity component system (its C++ API)
ravenRavenmain 69877f5 (0.1.2 + 8 commits)user interfaces: widgets, layout, themes, interfaces described in XML (drawn inside a raylib program by raven_raylib)
mirMIR1.0.0a lightweight JIT compiler: functions built through its C API, or C compiled by its c2mir frontend, generated to native code at runtime
stb_*stbupstreamfifteen single-file libraries (below)

The stb units are stb_c_lexer, stb_divide, stb_ds, stb_dxt, stb_easy_font, stb_herringbone_wang_tile, stb_hexwave, stb_image, stb_image_write, stb_include, stb_leakcheck, stb_perlin, stb_rect_pack, stb_truetype and stb_vorbis.

  • Each library is its official release, built from source for both official targets with the bundled Zig toolchain (SFML: its official prebuilt static libraries); "upstream" marks a library with no release tags, taken from its upstream sources. Raven is built from its main branch: its latest release, 0.1.2, cannot be built as tagged (its build lists a source file the tag does not contain), and main holds 0.1.2 and the fixes after it. Each sits in res\libs\vendor\<name> as include\, lib\<target>\ and the library's LICENSE.
  • Three libraries are built with fixes over their release: tmxlite loads zstd-compressed layers (the release never decodes them) and skips a base64 layer shorter than the layer instead of reading past it; LDtkLoader's bundled optional is renamed out of a name libc++ owns, which broke the Windows link; MIR's two lazy code generation modes work on Windows (four bugs in its Windows code crashed a function's first call or its first basic block). Each fix is dropped once upstream ships it.
  • MIR's JIT'd code has no unwind information, so a C++ exception must never travel through a JIT'd function: a host routine that JIT'd code calls catches its own exceptions. On Windows a longjmp over JIT'd code needs _setjmp(buf, NULL). Code c2mir generates calls the C runtime's memcpy / memset / memmove, which the program hands to MIR like any other import (mir_ext's MirLoadStdC). The mir_ext unit (mir_ext) wraps all of this, so a program using MIR writes no C++; the examples in res\examples\mir use it.
  • raven keeps, beside its LICENSE, the NOTICE, THIRD_PARTY.md and licenses\ folder its Apache-2.0 license asks to travel with it.
  • tmxlite brings in zlib, pugixml and zstd itself, so a Tiled map's every layer encoding (CSV, base64, zlib, gzip, zstd) loads with only import tmxlite;.
  • The libraries are static and linked into the program: bin\ holds only the program, and its .pdb at debug on Windows.
  • A Linux build links the system libraries a vendor library needs (libX11, libGL and their kin) from res\libs\vendor\linux64\lib, and headers zig does not ship for Linux (GL/gl.h) come from res\libs\vendor\linux64\include, so a vendor import builds the same way on both targets. The program runs against the libraries the Linux system has.
  • stb_image_resize2 and stb_sprintf were removed in 0.2: upstream moved both headers to its deprecated folder, and PaskalCPP ships only what the current upstream holds.

raylib_ext and sfml_ext add PaskalCPP's own extensions on top of raylib and SFML: see raylib_ext and sfml_ext. rlimgui_ext runs Dear ImGui inside raylib_ext's frame window, at its virtual resolution: see rlimgui_ext. raven_raylib makes Raven the user interface of a raylib program: raylib keeps the window, the loop, the audio and the game's drawing, Raven lays out and draws its widgets over it (an XML window, its theme, its fonts and images), and a raylib render texture can be shown inside a Raven widget: see raven_raylib.

A library that loads files can load them from the shared password zip assets.zip as well, through HookIO (HookIO):

  • mojoal_ext, sqlite_ext, tmxlite_ext and ldtk_ext add load forms that take an IO or a zip entry (archive, entry, password): see mojoal_ext, sqlite_ext, tmxlite_ext and ldtk_ext. tmxlite_ext and ldtk_ext also load a map's tilesets and images and draw it with raylib, so a map loads and draws in a few lines.
  • Lua's luaL_loadfile, yyjson's yyjson_read_file and every Raven load (a theme, an XML window and the images and fonts it names, a font, a texture) already read through HookIO as they are: an io:// path from RegisterIO reaches the zip with no extension unit. Raven's live reload follows files on disk by their time stamps, so a file it loaded from a zip is never reloaded.
  • ENet and flecs load no files.

Examples

Every bundled example in res\examples builds on both official targets with no reports. Open the folder from the editor with File > Show Examples (The editor).

LibraryExamples
raylibraylib\BasicWindow, RaylibZip (textures, a font, sounds and music from the shared password zip assets.zip), RaylibVideo
rlImGuirlimgui\Editor, Simple
SDL3sdl3\SdlWindow
SDL_gpsdl_gp\Painter
SFMLsfml\Network, Shapes; with sfml_ext: DefaultFont, ExtWindow, MessageBoxes, Mixer, VideoPlayer, ZipAssets, ZipPlayer
GLFWglfw\GlfwWindow
Box2Dbox2d\FallingBoxes, Playground
miniaudiominiaudio\MiniaudioDecode, PlaySound
cgltfcgltf\RoundTrip
pl_mpegpl_mpeg\PlmpegDecode
zlibzlib\Compress (compress and uncompress a text, its crc32 checked)
minizipminizip\PasswordZip (a password-encrypted .zip written beside the program and read back)
SQLitesqlite\SqliteBasics; with sqlite_ext: SqliteZip (a database read from assets.zip)
Lualua\LuaScripting, LuaScriptingZip (a script luaL_loadfile reads from assets.zip)
mojoALwith mojoal_ext: mojoal\Mojoal3DSound, Mojoal3DSoundZip
tmxlitewith tmxlite_ext: tmxlite\TiledTown, TiledTownZip
LDtkLoaderwith ldtk_ext: ldtkloader\LdtkTown, LdtkTownZip
yyjsonyyjson\JsonConfig (a settings file with defaults, written back), JsonConfigZip
ENetenet\EnetChat (a server and three clients in one program)
flecsflecs\FlecsBoids (a flock of boids run by flecs systems, drawn with raylib)
Ravenwith raven_raylib: raven\RavenRaylib, RavenRaylibZip (a window, its theme, image and font from assets.zip), RavenGameUI (a game's menus, settings, HUD, inventory and dialogue, designed in XML), RavenEditor (a 3D scene editor: menus, a scene tree, an inspector, raylib's scene in a Viewport)
stbstb\FontGlyph, Noise, VorbisInfo
Consoleconsole\ConsoleDemo

The twelve stb units no example uses import together into one program on both official targets:

modules_stb.pcpp
module exe modules_stb;

import
  stb_c_lexer,
  stb_divide,
  stb_ds,
  stb_dxt,
  stb_easy_font,
  stb_herringbone_wang_tile,
  stb_hexwave,
  stb_image,
  stb_image_write,
  stb_include,
  stb_leakcheck,
  stb_rect_pack;

begin
  println("12 stb units imported");
end.