Skip to main content

SHEET 06 OF 41

/DOC/:SLUG

PART:
03 DOCUMENTATION
CIRCULATION:
PUBLIC
SOURCE:
pages/Doc/[...Slug].astro
AS OF:
2026-12-02

SideCar manages the vendored Node.js runtime binaries that Land ships per platform, selecting the correct binary at compile time for each of four target triples so Cocoon always starts with the right runtime.

/Elements

SideCar

SideCar manages the vendored Node.js runtime binaries that Land ships per platform, selecting the correct binary at compile time for each of four target triples so Cocoon always starts with the right runtime.

PUBLISHED ELEMENTS Source/Content/doc/sidecar.md UNAVAILABLE UNAVAILABLE ARCHITECTURE 10

STATUS UNAVAILABLE NEXT OPEN THE ELEMENT'S MANUAL - IT DESCRIBES THE THING THE CAPTURE WOULD HAVE SHOWN.

# PLATE_01 / SIDECAR

FIGURE: The capture this record's evidence would show: rail track in low light.

This element has no evidence manifest in the build, so there is no capture to describe. The record above still prints its working - form, boundary, dependencies, manual and trace - and none of those fields is a picture.

SUBJECT:
RAIL TRACK IN LOW LIGHT
MANIFEST:
UNAVAILABLE
STATE:
UNAVAILABLE
PLATE:
UNAVAILABLE

SOURCE: SOURCE/CONTENT/ELEMENT/WORKING.TS

SideCar is a Rust library and two binaries that manage pre-compiled native dependency binaries for Land. It handles download, caching and placement of Node.js runtime binaries across multiple target platforms, integrating with Mountain at build time and with the spawned runtime at launch.

The element’s own module documentation is explicit about one limit: checksum verification of downloads is not performed today. Everything below describes what the code does, not what a vendoring pipeline usually does.

Architecture

Mermaid diagram
Attribute Value
Language Rust (edition 2024)
Crate type Library + two binaries (SideCar, Download)
Dependencies tokio, reqwest, serde, zip, tar, flate2, Mist, Common
Consumed by Mountain (build-time binary selection)
Storage SideCar/Cache.json + per-platform cached binaries

Module Map

Path Purpose
Source/Download.rs Version resolution, parallel download, archive extraction, Cache.json upkeep
Source/Library.rs Library root - re-exports the Download module
Source/main.rs SideCar entry point: initialises telemetry, then runs Download::Fn()

Source/Download.rs also declares a second binary, Download, for standalone vendoring runs. The library is deliberately thin: there is one module, and both binaries drive it.

Binary Resolution

The resolution process maps a major Node version to the latest published patch for a target triple:

flowchart TD
    A["Build.sh reads NodeVersion and NodePlatform from .env.Land"] --> B["Download::Fn()"]
    B --> C{"Cache.json has triple/NODE/major?"}
    C -->|"CACHED"| D["Reuse the recorded full version"]
    C -->|"NOT CACHED"| E["FetchNodeVersions() - nodejs.org version index"]
    E --> F["ResolveLatestPatchVersion(major, versions)"]
    F --> G["Construct download URL<br/>https://nodejs.org/dist/v{version}/node-v{version}-{platform}.tar.gz"]
    G --> H["Download and extract (no checksum verification)"]
    H --> I["Place binary under the element's per-platform tree"]
    I --> J["Record triple/NODE/major -> v{full version} in Cache.json"]
    J --> K["Return resolved binary path to Mountain"]

Version Resolution Priority

  1. The major component of NodeVersion - the build asks for 24, not 24.18.0
  2. FetchNodeVersions() reads the published index from nodejs.org once per run
  3. ResolveLatestPatchVersion() picks the highest v{major}.* it finds
  4. Cache.json records the resolved full version, keyed by triple and major

Because the cache key is the major version and the value is the full version, a cached entry is a record of what was last resolved - it does not pin the version for future runs unless the cache is consulted first.

Download System

The Download module handles archive retrieval and extraction:

Operation Description
URL construction Builds the platform-specific URL from version and platform string
HTTP download Streaming download with timeout and retry
Archive extraction .tar.gz decompression with platform prefix stripping
Binary placement Single binary extracted into the element’s per-platform tree
Cache update Writes the resolved full version into Cache.json

There is no integrity step. SideCar/Cargo.toml has no hashing crate, and Source/Download.rs says so twice: the pipeline cleans up temporary files on completion “(no checksum verification …)” and notes that “checksum verification is not performed today, so checksum mismatches cannot arise”.

Download Flow

1. FetchNodeVersions() -> GET the nodejs.org version index
2. ResolveLatestPatchVersion(major, versions) -> the full version to fetch
3. HTTP GET https://nodejs.org/dist/v{version}/node-v{version}-{platform}.tar.gz
4. Stream to a temporary download file with progress tracking
5. Extract the node binary from the archive
6. Place it in the element's per-platform tree
7. Update Cache.json

Supported Platforms

Target Triple Platform String Archive Pattern
aarch64-apple-darwin darwin-arm64 node-v{version}-darwin-arm64.tar.gz
x86_64-apple-darwin darwin-x64 node-v{version}-darwin-x64.tar.gz
aarch64-unknown-linux-gnu linux-arm64 node-v{version}-linux-arm64.tar.gz
x86_64-unknown-linux-gnu linux-x64 node-v{version}-linux-x64.tar.gz

Caching Strategy

SideCar maintains a JSON manifest at SideCar/Cache.json. The schema is a flat map, not a record per download:

{
	"Entries": {
		"aarch64-apple-darwin/NODE/24": "v24.18.0",
		"aarch64-unknown-linux-gnu/NODE/24": "v24.18.0",
		"x86_64-apple-darwin/NODE/22": "v22.23.1"
	}
}
Cache field Type Description
Key String {target-triple}/{sidecar-name}/{major-version}
Value String The full version string last downloaded successfully, e.g. v24.18.0

There is no sha256, path, downloaded_at or size field, because nothing computes or needs them today. An entry is invalidated when the major version asked for changes, when the recorded full version is superseded on nodejs.org, or when the file is cleared by hand.


Project Maintainers: Source Open (Source/[email protected]) | GitHub Repository | Report an Issue

The record this page documents, as the site files it: the six facts the claim is checked against, and the three files the manual names to check it.

WORKING, 06

FORM:
PREBUILT BINARY
WRITTEN IN:
NODE.JS
BOUNDARY:
PROCESS SPAWN
DEPENDS ON:
COCOON
EVIDENCE:
UNAVAILABLE NO MANIFEST IN THE BUILD

# TRACE / SIDECAR 03 STEPS

  1. 01 Source/Download.rs THE DOWNLOAD
  2. 02 SideCar/Cache.json THE CHECKSUM CACHE
  3. 03 GetTauriTargetTriple.rs THE TARGET TRIPLE

SOURCE: /DOC/DEEP-DIVE-SIDECAR

Elements, 17 PAGES, page 13 of 17

THE LAYER'S INDEX

NEXT: /BLOG 04 BLOG

NOTES FROM THE BUILD, NEWEST FIRST

〈06〉 /DOC/:SLUG 41 SHEETS AS OF: 2026-12-02