---
title: "Symbol Library Linker"
description: "link symbol unit files to an output symbol library file"
source: "https://github.com/log-10x/modules/tree/main/pipelines/compile/units/link/unit.yaml"
icon: "material/merge"

---
Combine symbol units into a single output symbol library file
used by the 10x [run](https://doc.log10x.com/run/) pipeline to generate shared [TenXTemplates](https://doc.log10x.com/run/transform/ "Transform log and trace events into well-defined TenXObjects") schemas for input log/trace events.

This phase is analogous to a [linker](<https://en.wikipedia.org/wiki/Linker_(computing)>){target="\_blank"} that
takes one or more object files (i.e., symbol units) generated during a compilation process and combines them into a single library file for use at run time.

### :material-zip-box-outline: Symbol Library

To dynamically create class and metadata information at run time, the 10x [compile](https://doc.log10x.com/compile/) pipeline scans GitHub and container repos ahead-of-time to generate [symbol libraries](https://doc.log10x.com/run/symbol/ "Import symbol libraries from files to transform events into well-defined TenXObjects"), similar to package artifacts (e.g., npm, .jar, .NET assembly).

The 10x [run](https://doc.log10x.com/run/) pipeline utilizes symbol library files to assign a shared [TenXTemplate](https://doc.log10x.com/run/template/ "Import joint JSON schemas files to expand events into well-defined TenXObjects.") (i.e., _hidden class_) to input log/trace events with the same [structure](https://doc.log10x.com/run/transform/structure "Structure input events into well-defined TenXObjects"), creating a cached optimized schema for each event type.

Operating on typed TenXObjects enables direct access to [symbol](https://doc.log10x.com/run/transform/structure/#symbols) and [variable](https://doc.log10x.com/run/transform/structure/#variables) values at runtime without repeatedly parsing JSON structures or evaluating complex, brittle regular expressions for each event.

### :material-file-tree: File Structure

Each symbol library `.10x.tar` archive file contains:

- A `.10x.json` file combining the symbol unit files generated during the [scan](https://doc.log10x.com/compile/scan/ "Capture symbol values from source code/binary files and link to an output symbol library") phase.
- A `.10x.pb` Protocol Buffer file which provides a reverse in-mem index of the symbols values contained within the JSON for fast loading and random access. To learn more see the [.proto IDL](https://github.com/log-10x/pipeline-extensions/blob/main/api-extensions/src/main/proto/FsSymbolUnitsIndex.proto){target="\_blank"}.

## :material-wrench-outline: Config Files

To configure the Symbol library linker unit, [:material-cog: Edit](https://doc.log10x.com/config/app/#module-config "Learn how to edit app and module configurations") these files.  

Below is the default configuration from: [link/config.yaml](https://github.dev/log-10x/config/blob/main/pipelines/compile/link/config.yaml "link/config.yaml"){target="\_blank"}.  
  
<div class="edit-options">
    <a class="md-button tenx-edit-online-button" data-tooltip="Edit online on github.dev" href="https://github.dev/log-10x/config/blob/main/pipelines/compile/link/config.yaml" target="_blank" rel="noopener noreferrer">
        <span class="twemoji" style="margin-right: 0.3rem;">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path>
            </svg>
        </span> Edit Online
    </a>
    <button class="md-button tenx-config.yaml0-edit-button" data-tooltip="Edit configuration file" data-dialog-id="config-yaml0-dialog">
        <span style="margin-right: 0.3rem;">
            <span class="twemoji">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                    <path d="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"></path>
                </svg>
            </span>
        </span>Edit Locally
    </button>
</div>

<dialog id="config-yaml0-dialog" class="md-dialog md-dialog--editor">
    <div class="editor-dialog-wrapper">
        <div class="editor-dialog-header">
            <span class="editor-dialog-title">Edit config.yaml Locally</span>
            <div class="editor-header-actions">
                <button class="editor-toolbar-btn yaml-editor-locations" data-tooltip="Save">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M5 20h14v-2H5v2m14-9h-4V3H9v8H5l7 7 7-7Z"></path></svg>
                </button>
                <button class="editor-toolbar-btn yaml-editor-reset" data-tooltip="Reset to default">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"></path></svg>
                </button>
                <button class="editor-toolbar-btn yaml-editor-copy" data-tooltip="Copy to clipboard">
                    <svg class="icon-copy" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"></path></svg>
                    <svg class="icon-check" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" style="display:none;"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg>
                </button>
                <span class="header-divider"></span>
                <button class="editor-toolbar-btn yaml-editor-fullscreen" data-tooltip="Fullscreen">
                    <svg class="icon-maximize" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z"></path></svg>
                    <svg class="icon-minimize" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" style="display:none;"><path fill="currentColor" d="M5,16H8V19H10V14H5V16M14,14V19H16V16H19V14H14M16,5V8H19V10H14V5H16M10,5V10H5V8H8V5H10Z"></path></svg>
                </button>
                <span class="header-divider"></span>
                <button class="editor-toolbar-btn editor-dialog-close" onclick="closeDialog('config-yaml0-dialog')" data-tooltip="Close">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg>
                </button>
            </div>
        </div>
        <div class="editor-dialog-content">
            <div class="yaml-editor-container"></div>
        </div>
        <div class="yaml-editor-statusbar">
            <span class="yaml-editor-status"></span>
        </div>
    </div>
    <!-- Locations Popup -->
    <div class="locations-popup" style="display: none;">
        <div class="locations-popup-content">
            <div class="locations-popup-header">
                <span class="locations-header-label">Download and save to:</span>
                <button class="locations-popup-close" aria-label="Close">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
                        <path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
                    </svg>
                </button>
            </div>
            <ul class="locations-list">
                <li>
                    <span class="location-label">Linux / Docker / macOS
                        <span class="help-icon" data-tooltip="Default system location. The engine automatically reads configs from here at startup. Best for production deployments.">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M11 18h2v-2h-2v2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2 2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4Z"/></svg>
                        </span>
                    </span>
                    <div class="location-path-row">
                        <code class="default-path location-path" data-tooltip=""
                            data-copy-osx="/etc/log10x/config/compile/link/config.yaml"
                            data-copy-nix="/etc/log10x/config/compile/link/config.yaml"
                            data-copy-win="C:\log10x\configs/compile/link/config.yaml"></code>
                        <button class="copy-btn" data-tooltip="Copy path">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">
                                <path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"></path>
                            </svg>
                        </button>
                    </div>
                </li>
                <li>
                    <span class="location-label">Custom directory
                        <span class="help-icon" data-tooltip="Set TENX_CONFIG environment variable to point to a custom config directory. Useful when you want configs in a non-standard location.">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M11 18h2v-2h-2v2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2 2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4Z"/></svg>
                        </span>
                    </span>
                    <div class="location-path-row">
                        <code class="location-path" data-tooltip="$TENX_CONFIG/compile/link/config.yaml">$TENX_CONFIG/compile/link/config.yaml</code>
                        <button class="copy-btn" data-tooltip="Copy path">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">
                                <path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"></path>
                            </svg>
                        </button>
                    </div>
                </li>
                <li>
                    <span class="location-label">Within cloned repo
                        <span class="help-icon" data-tooltip="First run: git clone github.com/log-10x/config. Then save the file to this path within the cloned folder. Use for version control.">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M11 18h2v-2h-2v2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2 2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4Z"/></svg>
                        </span>
                    </span>
                    <div class="location-path-row">
                        <code class="location-path" data-tooltip="./pipelines/compile/link/config.yaml">./pipelines/compile/link/config.yaml</code>
                        <button class="copy-btn" data-tooltip="Copy path">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">
                                <path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"></path>
                            </svg>
                        </button>
                    </div>
                </li>
            </ul>
            <div class="locations-popup-footer">
                <button class="locations-download-btn" title="Download config file">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">
                        <path fill="currentColor" d="M5 20h14v-2H5v2m14-9h-4V3H9v8H5l7 7 7-7Z"></path>
                    </svg>
                    <span>Download</span>
                </button>
            </div>
        </div>
    </div>
</dialog>

<template class="tenx-config-schema" data-encoding="base64">ewogICJ0eXBl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Zvcm0vc3ltYm9sLyNjb250ZXh0cykuIFRoaXMgb3B0aW9uIHJlZHVjZXMgdGhlIHNpemUgb2YgdGhlIG91dHB1dCBzeW1ib2wgbGlicmFyeSBmaWxlIGJ5IG9taXR0aW5nIHN5bWJvbCB0eXBlcyBub3QgcmVxdWlyZWQgYXQgcnVuIHRpbWUuICBGb3IgcG9zc2libGUgdmFsdWVzLCBzZWU6IFtjb250ZXh0c10oaHR0cHM6Ly9kb2MubG9nMTB4LmNvbS9ydW4vdHJhbnNmb3JtL3N5bWJvbC8jY29udGV4dHMpLiAoRGVmYXVsdDogW1wicGFja2FnZVwiLFwiY2xhc3NcIixcImVudW1cIixcImxvZ1wiLFwidGV4dFwiLFwiZXhlY1wiXSkiLAogICAgICAgICAgIml0ZW1zIiA6IHsKICAgICAgICAgICAgInR5cGUiIDogInN0cmluZyIKICAgICAgICAgIH0sCiAgICAgICAgICAiZGVmYXVsdCIgOiBbCiAgICAgICAgICAgICJwYWNrYWdlIiwKICAgICAgICAgICAgImNsYXNzIiwKICAgICAgICAgICAgImVudW0iLAogICAgICAgICAgICAibG9nIiwKICAgICAgICAgICAgInRleHQiLAogICAgICAgICAgICAiZXhlYyIKICAgICAgICAgIF0KICAgICAgICB9LAogICAgICAgICJmaWxlTmFtZUZpbHRlcnMiIDogewogICAgICAgICAgInR5cGUiIDogWwogICAgICAgICAgICAiYXJyYXkiLAogICAgICAgICAgICAic3RyaW5nIiwKICAgICAgICAgICAgIm51bGwiCiAgICAgICAgICBdLAogICAgICAgICAgIm1hcmtkb3duRGVzY3JpcHRpb24iIDogIlJlZ2V4IHBhdHRlcm5zIHRvIGV4Y2x1ZGUgc3ltYm9sIGZpbGVzIGZyb20gb3V0cHV0IHN5bWJvbCBsaWJyYXJ5XG5cbkZpbHRlcnMgc3ltYm9sIGZpbGVzIHRvIGV4Y2x1ZGUgZnJvbSBbb3V0cHV0U3ltYm9sTGlicmFyeUZpbGVdKGh0dHBzOi8vZG9jLmxvZzEweC5jb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JvbEZvbGRlcl0oaHR0cHM6Ly9kb2MubG9nMTB4LmNvbS9jb21waWxlL3NjYW4vI291dHB1dHN5bWJvbGZvbGRlcikgdGhhdCB0aGUgY3VycmVudCBydW4gZGlkIG5vdCBpdHNlbGYgc2Nhbiwgc28gYSBmb2xkZXIgb2YgcHJlLWNvbXBpbGVkIHVuaXRzIGNhbiBiZSBsaW5rZWQgaW50byBhIFtzeW1ib2wgbGlicmFyeV0oaHR0cHM6Ly9kb2MubG9nMTB4LmNvbS9jb21waWxlL2xpbmsvI291dHB1dHN5bWJvbGxpYnJhcnlmaWxlKSB3aXRoIG5vIHNvdXJjZSBzY2FuLiBEZWZhdWx0IGZhbHNlOiBvbmx5IHVuaXRzIHRoaXMgcnVuIHNjYW5uZWQgYXJlIG1lcmdlZC4gKEFjY2VwdHMgYm9vbGVhbiBvciBzdHJpbmcgd2l0aCAkPSBwcmVmaXggZm9yIHJ1bnRpbWUgZXZhbHVhdGlvbikgKERlZmF1bHQ6IGZhbHNlKSIsCiAgICAgICJkZWZhdWx0IiA6IGZhbHNlCiAgICB9CiAgfSwKICAiYWRkaXRpb25hbFByb3BlcnRpZXMiIDogZmFsc2UKfQ==</template>

```yaml
# 🔟❎ 'compile' merge configuration

# Combine symbol units into a single output symbol library file.
# To learn more see https://doc.log10x.com/compile/link/

# Set the 10x pipeline to 'compile'
tenx: compile

# ============================ Symbol Library Output ==========================

# 'outputSymbolLibraryFile' specifies location of output symbol library file which
#  links the contents of 'outputSymbolFolder' to a single .json artifact and a
#  compressed .zip version for use at run time by 10x 'run' pipelines.
#  If a local output dir exists write to it, otherwise use the pipeline's temp folder.
#  To learn more see https://doc.log10x.com/compile/link

outputSymbolLibraryFile: $=TenXEnv.get("TENX_OUTPUT_SYMBOL_LIBRARY_FILE", path("data/shared/symbols", "<tenx.io.tmpdir>") + "/" + TenXEnv.get("runtimeName", "symbols") + ".10x.tar")


# ============================ Symbol Filter options ==========================

# The options below control which symbol files and values are merged into 'outputSymbolLibraryFile'

symbol:

  # 'fileNameFilters', exclude test files from symbol library
  fileNameFilters:

    # ── Java ───────────────────────────────────────
    - ^.*(Test|Tests|TestCase|TestSuite)\.java$     # *Test.java, *TestCase.java, *TestSuite.java
    - ^Test.*\.java$                                # TestFoo.java (legacy)

    # ── JavaScript / TypeScript ────────────────────
    - ^.*\.(test|spec)\.(js|jsx|ts|tsx|mjs|cjs)$    # *.test.js, *.spec.tsx

    # ── Python ─────────────────────────────────────
    - ^test_.+\.py$                                 # test_utils.py
    - ^.+_test\.py$                                 # utils_test.py
    - ^test(s|case|cases|suite|suites)?\.py$        # test.py, tests.py, testcase.py, testcases.py, testsuite.py

    # ── Scala ──────────────────────────────────────
    - ^.*(Spec|Test|Suite)\.scala$                  # *Spec.scala, *Test.scala, *Suite.scala

    # ── C# ─────────────────────────────────────────
    - ^.*(Test|Tests|TestCase|TestSuite)\.cs$       # *Test.cs, *TestCase.cs, *TestSuite.cs

    # ── Go ─────────────────────────────────────────
    - ^.*_test\.go$                                 # *_test.go
    # Note: testdata.go is usually a data file, not test code → not filtered here

    # ── C++ ───────────────────────────────────────
    - ^.*(_test|Test|Tests)s?\.(cpp|cc|cxx|hpp|h|hxx)$  # *_test.cpp, *Test.hpp, *Tests.cpp

  # 'folderFilters', patterns to exclude files by folder
  # Plain name (e.g., "test") → matches direct parent folder only
  # Regex (e.g., "[/\\]vendor[/\\]") → matches anywhere in full path
  folderFilters:
    - test           # direct parent is "test"
    - tests          # direct parent is "tests"
    - __tests__      # Jest convention
    - spec           # RSpec/Jasmine convention
    - specs          # RSpec/Jasmine convention
    - unit           # unit test folder
    - integration    # integration test folder
    - e2e            # e2e tests (Cypress, Playwright)
    - end-to-end     # alternate e2e naming
    - acceptance     # acceptance test folder
    - testdata       # Go test data folder
    - fixtures       # test fixtures folder
    - mocks          # mock implementations folder
    - "[/\\\\]vendor[/\\\\][a-z]+\\.[a-z]"   # Go vendored deps (vendor/domain.tld pattern)

  # 'types' controls the types of symbols written into 'outputSymbolLibraryFile'
  #  for reflective use at runtime.
  #  Narrowing the this list reduces the size of the output 10x symbols file. Possible values:
  types:
    - class   # source code class/interface name (e.g. 'AcmeLogic')
    - enum    # source code enum/literal name (e.g. 'severity: {error,warn,debug}')
    - log     # source code print format passed to a logging method/stream (e.g. 'err("could not connect to %s",..');
    - exec    # string value extracted from a binary executable input file (e.g. via 'strings' nix command)
    # - method # code method/function name (e.g. 'foo')
    # - const  # string constant assigned into a variable or method arg (e.g. 'greeting = "hello world"')
    # - text    # string value, usually read from a config file (e.g. JSON/XML/YAML field name)
    # - package # source code package/namespace/module name (e.g. 'com.acme.core')
```

## :material-menu: Options

Specify the options below to [configure](/config "configure") the Symbol library linker:

|Name|Description|
|---|---|
|[outputSymbolLibraryFile](#outputsymbollibraryfile "location of output symbol library file")|Location of output symbol library file|
|[maxSymbolUnitFileSize](#maxsymbolunitfilesize "max file size for 'outputSymbolLibraryFile' before it is split into chunks")|Max file size for 'outputSymbolLibraryFile' before it is split into chunks|
|[symbolTypes](#symboltypes "token types read from input source/binary files written to output")|Token types read from input source/binary files written to output|
|[symbolFileNameFilters](#symbolfilenamefilters "regex patterns to exclude symbol files from output symbol library")|Regex patterns to exclude symbol files from output symbol library|
|[symbolFolderFilters](#symbolfolderfilters "patterns to exclude symbol files by folder from output symbol library")|Patterns to exclude symbol files by folder from output symbol library|
|[mergeExistingUnits](#mergeexistingunits "merge symbol unit files already on disk that this run did not itself scan")|Merge symbol unit files already on disk that this run did not itself scan|

### :material-menu-right-outline:**`outputSymbolLibraryFile`**

Location of output symbol library file.

|Type|Default|
|---|---|
|File||

Specifies an output symbol library file merging the symbol unit files produced for [inputPaths](https://doc.log10x.com/compile/scan/#inputpaths "input folders to scan").
The symbol library file provides a single artifact to set as the [symbolPaths](https://doc.log10x.com/run/symbol/#symbolpaths "input symbol files and folders") at run time.


### :material-menu-right-outline:**`maxSymbolUnitFileSize`**

Max file size for 'outputSymbolLibraryFile' before it is split into chunks.

|Type|Default|
|---|---|
|String|40MB|

Sets the maximum file size (e.g., 40MB) for [outputSymbolLibraryFile](https://doc.log10x.com/compile/link/#outputsymbollibraryfile "location of output symbol library file") before splitting
into chunks, each weighing no more than this value. This option enables large
artifacts to remain [GitHub committable](https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github){target="\_blank"}.


### :material-menu-right-outline:**`symbolTypes`**

Token types read from input source/binary files written to output.

|Type|Default|
|---|---|
|List|\[package, class, enum, log, text, exec\]|

Filter symbol values to write to [outputSymbolLibraryFile](https://doc.log10x.com/compile/link/#outputsymbollibraryfile "location of output symbol library file") based on their [context](https://doc.log10x.com/run/transform/symbol/#contexts).
This option reduces the size of the output symbol library file by omitting symbol types not required at run time.
For possible values, see: [contexts](https://doc.log10x.com/run/transform/symbol/#contexts).


### :material-menu-right-outline:**`symbolFileNameFilters`**

Regex patterns to exclude symbol files from output symbol library.

|Type|Default|
|---|---|
|List|\[\]|

Filters symbol files to exclude from [outputSymbolLibraryFile](https://doc.log10x.com/compile/link/#outputsymbollibraryfile "location of output symbol library file") using regex patterns.
This option is typically used to exclude test files from the symbol library, reducing output size and focusing on production code symbols.

Common patterns for excluding test files across languages:

- Java: `^.*(Test|Tests|TestCase)\.java$` (JUnit/TestNG test files)
- JavaScript/TypeScript: `^.*\.(test|spec)\.(js|jsx|ts|tsx|mjs|cjs)$` (Jest/Mocha/Vitest test files)
- Python: `^test_.+\.py$` or `^.+_test\.py$` (pytest/unittest test files)
- Scala: `^.*(Spec|Test)\.scala$` (ScalaTest/Specs2 test files)
- C#: `^.*(Test|Tests)\.cs$` (xUnit/NUnit/MSTest test files)
- Go: `^.*_test\.go$` (built-in testing framework test files)
- C++: `^.*(_test|Test)s?\.(cpp|cc|cxx|hpp|h|hxx)$` (GoogleTest/Catch2/Boost.Test test files).


### :material-menu-right-outline:**`symbolFolderFilters`**

Patterns to exclude symbol files by folder from output symbol library.

|Type|Default|
|---|---|
|List|\[\]|

Filters symbol files to exclude from [outputSymbolLibraryFile](https://doc.log10x.com/compile/link/#outputsymbollibraryfile "location of output symbol library file") based on folder location.
This option complements [symbolFileNameFilters](https://doc.log10x.com/compile/link/#symbolfilenamefilters "regex patterns to exclude symbol files from output symbol library") by excluding files based on their containing folder.

**Plain folder name** (e.g., `test`) - matches when the file's direct parent folder has this name.
Only alphanumeric characters, underscores, and hyphens are treated as plain names.

**Regex pattern** (anything else) - matched against the full file path (case-insensitive).
Use `[/\\]` for cross-platform path separators (Unix `/` and Windows `\`).

**Examples:**

- `test` - Files directly inside a `test` folder
- `__tests__` - Files directly inside `__tests__` (Jest convention)
- `[/\\]vendor[/\\]` - Files anywhere under a `vendor` folder (Go vendored deps)
- `[/\\]node_modules[/\\]` - Files anywhere under `node_modules`.


### :material-menu-right-outline:**`mergeExistingUnits`**

Merge symbol unit files already on disk that this run did not itself scan.

|Type|Default|
|---|---|
|Boolean|false|

Merges symbol unit files already present under [outputSymbolFolder](https://doc.log10x.com/compile/scan/#outputsymbolfolder "location of output symbol folder")
that the current run did not itself scan, so a folder of pre-compiled units can be linked into a
[symbol library](https://doc.log10x.com/compile/link/#outputsymbollibraryfile "location of output symbol library file") with no source scan.
Default false: only units this run scanned are merged.


<br/>:material-github: This unit is defined in [link/unit.yaml](https://github.com/log-10x/modules/tree/main/pipelines/compile/units/link/unit.yaml "link/unit.yaml"){target="\_blank"}.

