Package mxc_ffi with Node artifacts - #1155
Closed
Branden Bonaby (bbonaby) wants to merge 3 commits into
Closed
Branden Bonaby (bbonaby) wants to merge 3 commits into
Branden Bonaby (bbonaby) wants to merge 3 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bbe1ffbf-7cf8-48a0-8e3b-956f1d634e6c
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bbe1ffbf-7cf8-48a0-8e3b-956f1d634e6c
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bbe1ffbf-7cf8-48a0-8e3b-956f1d634e6c
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
Author
|
Closing at the author's request; the branch is being kept for review and no code was merged. |
Copilot started reviewing on behalf of
Branden Bonaby (bbonaby)
September 14, 2026 20:00
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Several artifact workflows can succeed while silently omitting the required FFI library.
Get a fresh assessment by requesting another Copilot review.
Review tier: Balanced
Findings: 3
Open findings (5)
What changed in this PR
Packages mxc_ffi alongside Node SDK executor artifacts across supported platforms.
Changes:
- Builds and stages platform-specific FFI libraries.
- Adds libraries to GitHub Actions and Azure artifacts.
- Updates repository build documentation.
| File | Description |
|---|---|
build.sh |
Builds and stages Linux FFI library. |
build.bat |
Stages Windows FFI library. |
build-mac.sh |
Builds and stages macOS FFI library. |
.github/workflows/Build.Windows.Job.yml |
Uploads Windows FFI artifact. |
.github/workflows/Build.Linux.Job.yml |
Uploads Linux FFI artifact. |
.github/workflows/Build.MacOS.Job.yml |
Builds, verifies, and uploads macOS FFI. |
.azure-pipelines/templates/Rust.Build.Job.yml |
Packages Windows/Linux FFI artifacts. |
.azure-pipelines/templates/Mac.Build.Job.yml |
Signs and packages macOS FFI. |
.github/copilot-instructions.md |
Documents FFI artifact staging. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| wxc-wslc-daemon.exe | ||
| wxc-test-proxy.exe | ||
| mxc-diagnostic-console.exe | ||
| mxc_ffi.dll |
| path: | | ||
| src/target/${{ matrix.target }}/release/lxc-exec | ||
| src/target/${{ matrix.target }}/release/unix-test-proxy | ||
| src/target/${{ matrix.target }}/release/libmxc_ffi.so |
| src/target/${{ matrix.target }}/release/wxc-wslc-daemon.exe | ||
| src/target/${{ matrix.target }}/release/wxc-test-proxy.exe | ||
| src/target/${{ matrix.target }}/release/mxc-diagnostic-console.exe | ||
| src/target/${{ matrix.target }}/release/mxc_ffi.dll |
| # ESRP's Mac signing requires a .zip (or .dmg) input — raw Mach-O | ||
| # binaries are rejected. We zip before signing and unzip afterward. Both | ||
| # the executor and the testing-only unix-test-proxy are signed together. | ||
| # All three native runtime files are signed together. |
| - **SDK** (`sdk/node/`, `@microsoft/mxc-sdk`) — the public API. The one-shot surface (`spawnSandbox` / `spawnSandboxFromConfig` / `spawnSandboxAsync`) builds a `ContainerConfig` from a `SandboxPolicy`, serialises to base64, and spawns the correct native binary (`wxc-exec.exe`, `lxc-exec`, or `mxc-exec-mac`) via `node-pty`. The state-aware surface (`provisionSandbox` / `startSandbox` / `execInSandbox` / `execInSandboxAsync` / `stopSandbox` / `deprovisionSandbox`, in `sdk/node/src/state-aware.ts`) drives a sandbox through a multi-call lifecycle against `StateAwareContainmentBackend` backends; per-(backend, phase) typed `*Config` interfaces and a branded `SandboxId<C>` live in `sdk/node/src/state-aware-types.ts`. Typed wire-format errors live in `sdk/node/src/errors.ts` (closed `ErrorCode` union plus a single `MxcError` class carrying `code: ErrorCode`, mirroring the Rust `MxcError` shape). Platform detection is in `platform.ts`. | ||
|
|
||
| The SDK auto-discovers native binaries by checking `sdk/node/bin/<target-triple>/` (npm-packaged) and `src/target/<target-triple>/{release,debug}/` (local dev). The `build.bat`/`build.sh`/`build-mac.sh` scripts copy binaries into the SDK bin directory. | ||
| The SDK auto-discovers native binaries by checking `sdk/node/bin/<target-triple>/` (npm-packaged) and `src/target/<target-triple>/{release,debug}/` (local dev). The `build.bat`/`build.sh`/`build-mac.sh` scripts copy the executor and `mxc_ffi` shared library into the SDK bin directory; the platform CI workflows publish both in their per-target artifacts. |
Branden Bonaby (bbonaby)
deleted the
user/bbonaby/node-mxc-ffi-artifact
branch
September 15, 2026 05:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


📖 Description
Builds and stages the
mxc_ffishared library with the Node SDK's platform artifacts. Local build scripts, GitHub Actions, and Azure Pipelines now package the native library beside the existing executor binaries.🔗 References
🔍 Validation
cargo test -p mxc_ffi✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see docs/pull-requests.md)📋 Issue Type
Microsoft Reviewers: Open in CodeFlow