Logo

index : 0x2lib

Library extension for Jai

  • summary
  • about
  • tree
  • log
  • branches
https://git.ptrace.dev/public/0x2lib.git
git@git.ptrace.dev:repos/public/0x2lib.git
PY: 4%
JAI: 89%
MD: 4%
GT: 4%

Extension for the Jai Standard Library

A collection of high-level APIs.

Note: This library reached not 1.0.0 yet. APIs will change.

Targets

Currently, only Linux support.

Modules

| Module Name    | Description                                | Dependency |
+----------------+--------------------------------------------+------------+
| 0x2_Bitpack    | Packing multiple numeric values into one   | -          |
| 0x2_Colored    | HSL <> RGB <> Hex conversion               | -          |
| 0x2_Crashed    | Crash handler which provides location info | addr2line  |
| 0x2_Datefmt    | Python-like date formatter                 | -          |
| 0x2_Lexer      | It lexes bytes                             | -          |
| 0x2_Math       | Things I missed in the stdlib              | -          |
| 0x2_Qtrace     | Very small and simple profiler             | -          |
| 0x2_Rectcut    | Building UI layouts by dividing rectangles | -          |
| 0x2_Stringpad  | Pads a string with any character           | -          |
| 0x2_Termcolors | Colors for your terminal                   | -          |
| 0x2_Seccomp    | Restricts syscalls                         | -          |
| 0x2_Landlock   | Restricts FS & Network                     | -          |

Usage

Copy what you need into your projects modules directory. Be aware, that some 0x2 modules might depend on other 0x2 modules. Dependencies are noted in the table above.

For understanding how those modules work, you can visit the test directory and peek at the individual files.

About

Crashed

Currently Jai does not provide location information in their stack trace.
This module by solarium.technology provides it.

Note: You need addr2line from binutils.

Rectcut

Instead of doing some common layout voodoo, you "cut" your layout into rectangles which depend on each other and are responsive to changes.

I found the idea at halt.software, solarium.technology implemented it in Jai, and I modified it further.

Compiler Version

beta 0.2.030, built on 2 July 2026.

License

All modules provide two licenses (always at the end of the file), MIT or Public Domain you can choose from.

This is inspired from stb.

LLM

All bugs are made by a human.

EXPAND COLLAPSE
Name
Size
Modified (UTC)
.gitignore
38 b
2026-08-16
raw
0x2_Bitpack.jai
4 kB
2026-08-16
raw
0x2_Colored.jai
11 kB
2026-08-16
raw
0x2_Crashed.jai
5 kB
2026-08-16
raw
0x2_Datefmt.jai
5 kB
2026-08-16
raw
0x2_Landlock.jai
13 kB
2026-08-16
raw
0x2_Lexer.jai
10 kB
2026-08-16
raw
0x2_Math.jai
5 kB
2026-08-25
raw
0x2_Qtrace.jai
6 kB
2026-08-17
raw
0x2_Rectcut.jai
5 kB
2026-08-16
raw
0x2_Seccomp.jai
19 kB
2026-08-16
raw
0x2_String.jai
4 kB
2026-08-22
raw
0x2_Termcolors.jai
17 kB
2026-08-16
raw
README.md
3 kB
2026-08-16
raw
VERSION
397 b
2026-08-16
raw
desc.gt
26 b
2026-08-16
raw
---
---
assertion.jai
844 b
2026-08-24
raw
bitpack.jai
328 b
2026-08-16
raw
colored.jai
2 kB
2026-08-16
raw
datefmt.jai
474 b
2026-08-16
raw
landlock.jai
2 kB
2026-08-16
raw
lexer.jai
2 kB
2026-08-16
raw
math.jai
3 kB
2026-08-24
raw
rectcut.jai
993 b
2026-08-16
raw
run_tests.jai
2 kB
2026-08-25
raw
seccomp.jai
3 kB
2026-08-16
raw
string.jai
423 b
2026-08-22
raw
termcolors.jai
2 kB
2026-08-16
raw
---
---
seccomp_collect_syscalls.py
7 kB
2026-08-16
raw
Copyright 2026  E766CB298A6D1E64 | Git-Thing heavily inspired by cgit