Logo

index : 0x2lib

Library extension for Jai

  • summary
  • about
  • tree
  • log
  • branches
<< path: root/public/0x2lib.git/html/README.md blob: d5523847307ca91899b48b33aea6d780654dc87e [raw] [clear marker]

        
0# Extension for the Jai Standard Library
1
2A collection of high-level APIs.
3
4Note: This library reached not 1.0.0 yet. APIs will change.
5
6
7## Targets
8Currently, only Linux support.
9
10
11## Modules
12```
13| Module Name | Description | Dependency |
14+----------------+--------------------------------------------+------------+
15| 0x2_Bitpack | Packing multiple numeric values into one | - |
16| 0x2_Colored | HSL <> RGB <> Hex conversion | - |
17| 0x2_Crashed | Crash handler which provides location info | addr2line |
18| 0x2_Datefmt | Python-like date formatter | - |
19| 0x2_Lexer | It lexes bytes | - |
20| 0x2_Math | Things I missed in the stdlib | - |
21| 0x2_Qtrace | Very small and simple profiler | - |
22| 0x2_Rectcut | Building UI layouts by dividing rectangles | - |
23| 0x2_Stringpad | Pads a string with any character | - |
24| 0x2_Termcolors | Colors for your terminal | - |
25| 0x2_Seccomp | Restricts syscalls | - |
26| 0x2_Landlock | Restricts FS & Network | - |
27```
28
29
30## Usage
31
32Copy what you need into your projects `modules` directory. Be aware, that some `0x2` modules
33might depend on other `0x2` modules. Dependencies are noted in the table above.
34
35For understanding how those modules work, you can visit the `test` directory and peek at the
36individual files.
37
38
39## About
40
41### Crashed
42Currently Jai does not provide location information in their stack trace.
43This module by [solarium.technology](https://solarium.technology) provides it.
44
45Note: You need `addr2line` from `binutils`.
46
47
48### Rectcut
49Instead of doing some common layout voodoo, you "cut" your layout into rectangles which depend
50on each other and are responsive to changes.
51
52I found the idea at [halt.software](https://halt.software/p/rectcut-for-dead-simple-ui-layouts),
53[solarium.technology](https://solarium.technology) implemented it in Jai,
54and I modified it further.
55
56
57## Compiler Version
58```
59beta 0.2.030, built on 2 July 2026.
60```
61
62
63## License
64All modules provide two licenses (always at the end of the file), MIT or Public Domain you can
65choose from.
66
67This is inspired from [stb](https://github.com/nothings/stb/blob/master/docs/why_public_domain.md).
68
69
70## LLM
71All bugs are made by a human.
72
73
74
Copyright 2026  E766CB298A6D1E64 | Git-Thing heavily inspired by cgit