Skip to content

aot: consume producer-owned runtime link metadata#968

Merged
dank-openai merged 4 commits into
mainfrom
dank-spr/xlsynth-aot-runtime-link-metadata
May 20, 2026
Merged

aot: consume producer-owned runtime link metadata#968
dank-openai merged 4 commits into
mainfrom
dank-spr/xlsynth-aot-runtime-link-metadata

Conversation

@dank-openai

@dank-openai dank-openai commented May 11, 2026

Copy link
Copy Markdown
Contributor

Read the XLS-owned runtime link manifest alongside libxls_aot_runtime.a and turn it into the Cargo link directives for the current target. That removes the Rust-side duplicate of the platform support-library list, so the producer artifact itself stays authoritative about what must be linked.

For example, the XLS-owned input can look like:

format_version = 1

[targets.macos]
system_libraries = ["c++"]
frameworks = ["CoreFoundation"]

[targets.linux]
system_libraries = ["c++", "c++abi", "unwind", "pthread", "dl"]
frameworks = []

With that input, macOS builds emit the c++ and CoreFoundation link directives, while Linux builds emit the Linux support libraries from the manifest. This PR wires that contract through both supported entry paths: XLSYNTH_ARTIFACT_CONFIG now resolves the runtime archive plus aot_runtime_link_config_path, and direct Cargo users provide the paired XLS_AOT_RUNTIME_PATH / XLS_AOT_RUNTIME_LINK_CONFIG_PATH variables.

The build script validates the manifest version and target entry, fails clearly when the archive/config pair is incomplete or malformed, and uses the selected target table instead of hard-coded Rust lists. The AOT docs describe the paired-input contract for direct Cargo consumers.

Stack:

⚠️ Part of a stack created by spr-multicommit. Do not merge manually using the UI - doing so may have unexpected results.

@dank-openai dank-openai force-pushed the dank/wip/xlsynth-xls-owned-runtime-aot branch from 234d733 to f73fc29 Compare May 13, 2026 23:52
@dank-openai dank-openai force-pushed the dank-spr/xlsynth-aot-runtime-link-metadata branch from 2bf72c1 to b666fc1 Compare May 13, 2026 23:52
@dank-openai dank-openai force-pushed the dank-spr/xlsynth-aot-runtime-link-metadata branch from b666fc1 to a7f0d53 Compare May 19, 2026 00:20
@dank-openai dank-openai force-pushed the dank/wip/xlsynth-xls-owned-runtime-aot branch from f73fc29 to 0c54684 Compare May 19, 2026 00:20
@dank-openai dank-openai force-pushed the dank-spr/xlsynth-aot-runtime-link-metadata branch from a7f0d53 to 7e33847 Compare May 19, 2026 00:59
@dank-openai dank-openai force-pushed the dank/wip/xlsynth-xls-owned-runtime-aot branch 2 times, most recently from 8ab26a8 to 6a491ad Compare May 19, 2026 01:17
@dank-openai dank-openai force-pushed the dank-spr/xlsynth-aot-runtime-link-metadata branch 3 times, most recently from b3d3cbd to 7e5112e Compare May 19, 2026 02:50
dank-openai added a commit that referenced this pull request May 19, 2026
# Problem Solved
The earlier standalone-runtime prototype proved the deployment boundary,
but it kept runtime ABI ownership in Rust by mirroring live XLS callback
objects. Runtime ABI ownership should come from XLS itself; Rust
consumers should only provide generated wrapper glue and link the
released runtime artifact.

# What Changed
- Make standalone runtime-AOT wrappers the intended generated form.
- Replace the Rust-owned shadow runtime with thin integration over the
XLS-owned standalone runtime ABI.
- Keep runtime assertions supported and reject trace-bearing artifacts
until the later trace extension lands.
- Preserve typed wrapper ergonomics while linking generated consumers
against the released static runtime archive.

# Validation
- Focused generated-wrapper and standalone-runtime tests passed on macOS
and Ubuntu 24.04.
- Final branch self-review found one constructor leak path in
`StandaloneRunner::new`; the amended head fixes it, and the follow-up
review was clean.
- Broader workspace validation reached the changed AOT suites; unrelated
local environment gaps remain recorded in the workstream (`pre-commit`
shim without a real binary on this Mac, and missing
`/opt/eda-tools/xlsynth/latest/block_to_verilog_main` for existing ECO
tests).

# Landing Order
This wave-1 consumer now follows the landed public producer handoff:
- `xlsynth/xlsynth#8` at `9f60a292e369287f2b8b7be2218dc18dddf23568`
- `xlsynth/rules_xlsynth#58` at
`d560634e4c292ecac0bc499d17173f8984d75ef5`

Final product consumers still wait for the later wave-2 producer chain
before repinning.


<!-- spr-stack:start -->
**Stack**:
-   #980
-   #971
-   #968
- ➡ #964

⚠️ *Part of a stack created by
[spr-multicommit](https://github.com/mattskl-openai/spr-multicommit). Do
not merge manually using the UI - doing so may have unexpected results.*
<!-- spr-stack:end -->
@dank-openai dank-openai requested a review from meheff May 19, 2026 03:30
@dank-openai dank-openai marked this pull request as draft May 19, 2026 18:29
@dank-openai dank-openai force-pushed the dank-spr/xlsynth-aot-runtime-link-metadata branch from 7e5112e to 1c20fa8 Compare May 19, 2026 18:29
@dank-openai dank-openai changed the base branch from dank/wip/xlsynth-xls-owned-runtime-aot to main May 19, 2026 18:29
@dank-openai dank-openai marked this pull request as ready for review May 19, 2026 18:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c20fa8d24

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread xlsynth-aot-runtime/build.rs
@dank-openai dank-openai force-pushed the dank-spr/xlsynth-aot-runtime-link-metadata branch from 1c20fa8 to 801d57b Compare May 19, 2026 18:42
@dank-openai dank-openai force-pushed the dank-spr/xlsynth-aot-runtime-link-metadata branch from 801d57b to fcc7d93 Compare May 19, 2026 22:14
Read the XLS-owned link manifest in xlsynth-aot-runtime instead of hard-coding platform support libraries in Rust.

branch:dank-spr/xlsynth-aot-runtime-link-metadata
Advance the shared required XLS release tag to v0.47.0 now that the
public release carries the standalone AOT runtime archive and link TOML.
@dank-openai dank-openai force-pushed the dank-spr/xlsynth-aot-runtime-link-metadata branch from fcc7d93 to 350c8ef Compare May 19, 2026 22:42
@dank-openai dank-openai merged commit afe7fab into main May 20, 2026
19 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants