Skip to content

Commit 16f62ec

Browse files
committed
Polish README
1 parent 64a098a commit 16f62ec

File tree

1 file changed

+41
-37
lines changed

1 file changed

+41
-37
lines changed

README.md

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,53 +10,65 @@ This plugin provides OpenTelemetry tracing support for Lingua Franca programs. I
1010

1111
## Building the Plugin
1212

13-
### Step 1: Build (choose one)
13+
<a id="step-1-clone"></a>
14+
### Step 1: Clone the repository with submodules
1415

15-
`build.sh` is a thin wrapper around CMake. Step 1 **configures + builds** (it does not install). Choose one:
16+
```bash
17+
git clone --recurse-submodules https://github.com/lf-lang/lf-trace-xronos.git
18+
cd lf-trace-xronos
19+
```
1620

17-
#### 1a) Configure/build for the system prefix (default CMake prefix)
21+
<a id="step-2-dashboard"></a>
22+
### Step 2: Install the Xronos Dashboard
1823

1924
```bash
20-
./build.sh
25+
pip install xronos-dashboard
2126
```
2227

23-
This produces:
24-
- `lib/liblf-trace-impl.a`
25-
- A build directory with cached dependencies under `build/_deps/`
28+
Please see [here](https://docs.xronos.com/dashboard.html#installation) for more information.
29+
30+
<a id="step-3-build"></a>
31+
### Step 3: Build (choose one)
32+
33+
<a id="option-a"></a>
34+
#### Option A) Build for the system path (e.g., `/usr/local/`)
35+
36+
```bash
37+
./build.sh
38+
```
2639

27-
#### 1b) Configure/build for a user-chosen prefix (install anywhere you like)
40+
This option gives you the *cleanest* LF programs later (see [5a](#5a)).
2841

29-
Choose any `PREFIX` directory you want. Installation will populate:
30-
- `<PREFIX>/include`
31-
- `<PREFIX>/lib`
32-
- `<PREFIX>/lib/cmake/lf-trace-xronos`
42+
<a id="option-b"></a>
43+
#### Option B) Build for a custom path (install anywhere you like)
3344

34-
Example (configure/build for this repo’s `./install` directory; this is what CI uses):
45+
Example - build for an `install/` directory within the repo:
3546

3647
```bash
3748
./build.sh --prefix "$(pwd)/install"
3849
```
3950

40-
### Step 2: Install
51+
<a id="step-4-install"></a>
52+
### Step 4: Install
4153

42-
Installing is a separate step (required to use the plugin from LF). Run this after Step 1:
54+
Installing is a separate step (required to use the plugin from LF). Run this after [Step 3](#step-3-build):
4355

4456
```bash
4557
./build.sh --install
4658
```
4759

4860
(Use `sudo` only if your chosen prefix requires it.)
4961

50-
**Note:** Dependencies are cached in `build/_deps/` and won't be re-downloaded on subsequent builds unless you delete that directory.
62+
<a id="step-5-using"></a>
63+
## Step 5: Using the Plugin from Lingua Franca (three supported flows)
5164

52-
## Step 3: Using the Plugin from Lingua Franca (three supported flows)
65+
- If you chose **[Option A](#option-a)** (system prefix), use **[5a](#5a)**.
66+
- If you chose **[Option B](#option-b)** (user-chosen prefix), use **[5b](#5b)** or **[5c](#5c)**.
5367

54-
- If you chose **1a (system prefix)**, use **3a**.
55-
- If you chose **1b (user-chosen prefix)**, use **3b** or **3c**.
68+
<a id="5a"></a>
69+
### 5a) System package on default CMake search path (cleanest LF file)
5670

57-
### 3a) System package on default CMake search path (cleanest LF file)
58-
59-
Install the plugin to the system prefix (see above), then in your `.lf`:
71+
Install the plugin to the system prefix, then in your `.lf`:
6072

6173
```lf
6274
target C {
@@ -70,11 +82,12 @@ target C {
7082

7183
See a working example in `tests/src/TracePluginSystemPath.lf`.
7284

73-
### 3b) Package + explicit path (no system install; easy to remove)
85+
<a id="5b"></a>
86+
### 5b) Package + explicit path (no system install; easy to remove)
7487

75-
Install the plugin to a user-chosen prefix (Step 1b + Step 2), then in your `.lf` set `path` to that prefix.
88+
Install the plugin to a user-chosen prefix ([Option B](#option-b) + [Step 4](#step-4-install)), then in your `.lf` set `path` to that prefix.
7689

77-
Example (install prefix is this repo’s `./install`, referenced relative to the `.lf` file):
90+
Example (install prefix is this repo’s `install/`, referenced relative to the `.lf` file):
7891

7992
```lf
8093
target C {
@@ -89,9 +102,10 @@ target C {
89102

90103
See a working example in `tests/src/TracePluginUserPath.lf`.
91104

92-
### 3c) Custom CMake integration (most flexible; dev-focused)
105+
<a id="5c"></a>
106+
### 5c) Custom CMake integration (most flexible; dev-focused)
93107

94-
Use `plugin.cmake` to link everything from an install directory and pass `LF_TRACE_INSTALL` (set to the Step 1b install prefix):
108+
Use `plugin.cmake` to link everything from an install directory and pass `LF_TRACE_INSTALL` (set to the [Option B](#option-b) install prefix):
95109

96110
```lf
97111
target C {
@@ -136,16 +150,6 @@ The `build.sh` script supports several options:
136150
- `--install`: Install to the configured prefix
137151
- `--clean`: Clear top-level CMake cache files (keeps `build/_deps/`)
138152

139-
## Troubleshooting
140-
141-
### Missing symbols at link time
142-
143-
If you encounter linker errors for missing symbols:
144-
145-
1. **CoreFoundation symbols** (macOS): Should be automatically linked by `plugin.cmake`
146-
2. **c-ares symbols**: Check if c-ares is installed system-wide or ensure it's in the install directory
147-
3. **Other missing symbols**: Ensure `./build.sh` completed successfully and the install directory contains all libraries
148-
149153
### Rebuilding dependencies
150154

151155
To force a complete rebuild (including re-downloading dependencies):

0 commit comments

Comments
 (0)