clockworklabs / clockworklabs/SpacetimeDB

Update NativeAOT-LLVM infrastructure to current ABI

Open
#4,818 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

This issue tracks reimplementing the work from stale PR #4515, which has been closed because it is too far out of date to merge directly.

Original pull request

What the original PR was trying to do

Summary - Update the experimental NativeAOT-LLVM build path (EXPERIMENTAL_WASM_AOT=1) to include all host function imports from ABI versions 10.0 through 10.4 - Fix the compiler package reference to work on both Windows x64 and Linux x64 (was hardcoded to Windows only) - Add a CI smoketest to verify AOT builds work on Linux x64 Context See 4514 for the full writeup on the CAOT situation. The wasi-experimental workload that all Cmodule builds depend on is deprecated and removed from .NET 9+. NativeAOT-LLVM is the recommended path forward for ahead-of-time compilation of Cto WebAssembly. The existing NativeAOT-LLVM support (added by RReverser in 713) was stale: missing imports added since then and a Windows-only package reference. Changes SpacetimeDB.Runtime.targets: - Add 10 missing WasmImport declarations across spacetime_10.0 through 10.4 - Replace runtime.win-x64.Microsoft.DotNe...

Closure context

  • This is being picked up by @rekhoff @JasonAtClockwork and @lisandroct

Reimplementation notes

  • Reimplement this work on top of current master in a new PR.
  • Keep the original PR linked as historical context and as a source of useful implementation ideas where still relevant.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the current NativeAOT-LLVM implementation on master and the historical PR #4515, especially SpacetimeDB.Runtime.targets. Reconcile the ABI imports for versions 10.0 through 10.4, check the compiler package behavior on Windows x64 and Linux x64, and add the Linux x64 AOT CI smoketest described in the issue. Done means the experimental AOT path builds against the current ABI on both platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
build-system, ci-cd, compilers
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.