OILS / doc / portability.md View on Github | oilshell.org

77 lines, 47 significant
1---
2default_highlighter: oils-sh
3---
4
5Portability
6===========
7
8What does your platform need to run Oils?
9
10These are some notes that supplement [INSTALL](INSTALL.html).
11
12<div id="toc">
13</div>
14
15## Issues in the core of Oils
16
17### GNU libc for extended globs
18
19For matching extended globs like `@(*.cc|*.h)`, Oils relies on GNU libc
20support.
21
22- This is not a POSIX feature.
23- It's also unlike bash, which has its own extended glob support.
24
25TODO: when using other libc, using this syntax should be an error.
26
27### Atomic Assignments
28
29The signal handler assumes that int and pointer assignments are atomic. This
30is a common and widespread assumption.
31
32- Related: [Atomic vs. Non-Atomic
33 Operations](https://preshing.com/20130618/atomic-vs-non-atomic-operations/)
34 by Jeff Preshing
35
36<!--
37As of 2024, the GC object layout doesn't depend on endian-ness.
38
39Tagged pointers may change this. A value may be either a pointer, which
40implies its least significant bits are zero, or an immediate value.
41
42We will have some #ifdef for it.
43-->
44
45## Extra Features
46
47### USDT - Userland Statically-Defined Tracing
48
49Our C++ code has `DTRACE_PROBE()` macros, which means we can use tools like
50`bpftrace` on Linux to make low-overhead queries of runtime behavior.
51
52The probe names and locations aren't stable across releases.
53
54## "Enums" that are often extended
55
56Different Unix implementations often extend:
57
58- the list of signals
59- the list of [ulimit][] resources, which correspond to flags
60
61[ulimit]: ref/chap-builtin-cmd.html#ulimit
62
63## Unicode
64
65Strings in Oils are byte strings, which are often UTF-8 encoded.
66
67We use `libc` functions that may depend on the global locale setting, like
68`glob()`. We currently assume your libc is configured to use UTF-8.
69
70See the [Unicode doc][] for details on Unicode-aware operations.
71
72[Unicode doc]: unicode.html
73
74<!--
75
76TODO: ./configure could detect some of these
77-->