microsoft / microsoft/mxc

Run live Node SDK execution in process

Open
#1,199 0 comments 0 reactions 0 assignees View on GitHub
Issue-Feature Needs-Triage
Dominant language
Rust
Stars
1.3k
Forks
79
Avg merge
2d 7h
Merged PRs (30d)
117

Description

### Description of the new feature / enhancement

Move the existing live Node SDK execution APIs in process while preserving their current stream-based interface.

`spawnSandbox` and `spawnSandboxFromConfig` should use `mxc_ffi` rather than launching an executor binary. Callers must retain live stdin, stdout, stderr, cancellation, timeout, and terminal metadata behavior without exposing native handles publicly.

**Success criteria**

- Existing live spawn APIs execute through the shared native library.
- Node streams own and release native stream handles safely.
- Blocking native I/O does not block the Node event loop.
- Cancellation and timeout interrupt pending output reads.
- Native request and handle details remain private.

Part of #1168.

### Proposed technical implementation details

- Bind the existing `mxc_ffi` streaming functions through Koffi.
- Adapt native handles behind the existing `MxcSandboxProcess` API.
- Use Koffi's asynchronous call surface for native stream I/O.
- Keep handle acquisition, interruption, waiting, and disposal in separate internal layers.

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing spawnSandbox and spawnSandboxFromConfig entry points and the MxcSandboxProcess API. Read the mxc_ffi streaming functions and Koffi's asynchronous call surface, then trace handle acquisition, interruption, waiting, and disposal. Done means live execution uses the shared native library while preserving streams, cancellation, timeout, terminal metadata, and event-loop responsiveness without exposing native handles.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, rust
Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.