1 | ---
|
2 | default_highlighter: oils-sh
|
3 | ---
|
4 |
|
5 | Portability
|
6 | ===========
|
7 |
|
8 | What does your platform need to run Oils?
|
9 |
|
10 | These 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 |
|
19 | For matching extended globs like `@(*.cc|*.h)`, Oils relies on GNU libc
|
20 | support.
|
21 |
|
22 | - This is not a POSIX feature.
|
23 | - It's also unlike bash, which has its own extended glob support.
|
24 |
|
25 | TODO: when using other libc, using this syntax should be an error.
|
26 |
|
27 | ### Atomic Assignments
|
28 |
|
29 | The signal handler assumes that int and pointer assignments are atomic. This
|
30 | is 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 | <!--
|
37 | As of 2024, the GC object layout doesn't depend on endian-ness.
|
38 |
|
39 | Tagged pointers may change this. A value may be either a pointer, which
|
40 | implies its least significant bits are zero, or an immediate value.
|
41 |
|
42 | We will have some #ifdef for it.
|
43 | -->
|
44 |
|
45 | ## Extra Features
|
46 |
|
47 | ### USDT - Userland Statically-Defined Tracing
|
48 |
|
49 | Our 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 |
|
52 | The probe names and locations aren't stable across releases.
|
53 |
|
54 | ## "Enums" that are often extended
|
55 |
|
56 | Different 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 |
|
65 | Strings in Oils are byte strings, which are often UTF-8 encoded.
|
66 |
|
67 | We 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 |
|
70 | See the [Unicode doc][] for details on Unicode-aware operations.
|
71 |
|
72 | [Unicode doc]: unicode.html
|
73 |
|
74 | <!--
|
75 |
|
76 | TODO: ./configure could detect some of these
|
77 | -->
|