feat(natives): added native addon distribution and platform validation to CLI update mechanism
- Added native addon distribution and installation support to the CLI update mechanism, enabling platform-specific native modules to be downloaded and installed alongside the main binary. - Added platform validation in native addon loader to verify supported platforms (linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64) with helpful error messages for unsupported configurations. - Enhanced native addon loading error messages to provide platform-specific troubleshooting guidance for both npm/bun installations and local development environments. - Updated installation scripts (install.sh, install.ps1) to download and install native addon files alongside the main binary during CLI installation.
This commit is contained in:
@@ -1,18 +1,23 @@
|
||||
# Test --source install from local repo
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y curl ca-certificates unzip && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install -y curl ca-certificates unzip build-essential && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install bun
|
||||
RUN curl -fsSL https://bun.sh/install | bash
|
||||
ENV PATH="/root/.bun/bin:$PATH"
|
||||
|
||||
# Install Rust (needed to build native addon)
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
|
||||
ENV PATH="/root/.cargo/bin:$PATH"
|
||||
|
||||
# Copy local repo
|
||||
WORKDIR /repo
|
||||
COPY . .
|
||||
|
||||
# Install dependencies and link globally
|
||||
# Install dependencies, build native addon, and link globally
|
||||
RUN bun install --frozen-lockfile
|
||||
RUN bun --cwd=packages/natives run build:native
|
||||
RUN cd packages/coding-agent && bun link
|
||||
|
||||
# Verify
|
||||
|
||||
Reference in New Issue
Block a user