Platform-specific native binary for SWC TypeScript/JavaScript compiler on macOS ARM64 architecture
npx @tessl/cli install tessl/npm-swc--core-darwin-arm64@1.13.0@swc/core-darwin-arm64 is a platform-specific native binary package that provides the macOS ARM64 (Apple Silicon) native Node.js addon for SWC (Speedy Web Compiler). This package contains only the compiled native binary (swc.darwin-arm64.node) and does not provide any direct JavaScript API. It is automatically loaded by the main @swc/core package when running on compatible systems.
@swc/coreswc.darwin-arm64.nodeThis package does not provide any direct JavaScript imports or API. The native binary is automatically loaded by the main @swc/core package:
// @swc/core automatically loads the platform-specific binary
const swc = require("@swc/core");For TypeScript:
import * as swc from "@swc/core";Since this is a platform-specific binary package with no API surface, you interact with SWC functionality through the main @swc/core package:
import { transform } from "@swc/core";
// The darwin-arm64 binary is automatically used for the transformation
const result = await transform("const x: number = 1;", {
jsc: {
parser: {
syntax: "typescript",
},
target: "es2018",
},
module: {
type: "commonjs",
},
});
console.log(result.code); // Transformed JavaScript@swc/core-darwin-arm64 is part of SWC's multi-platform distribution strategy:
swc.darwin-arm64.node, a compiled Rust binary providing optimal performanceThe sole capability of this package is to provide the underlying native implementation that powers all SWC transformation operations on macOS ARM64 systems.
// This package provides no JavaScript API
// Binary file: swc.darwin-arm64.node
// Automatically loaded by @swc/core when availableThe package contains only the native binary file and does not export any JavaScript functions or interfaces. All SWC functionality is accessed through the main @swc/core package, which dynamically loads this binary when running on compatible systems.
This package is automatically installed as an optional dependency by @swc/core and should not be installed manually:
# Correct installation - this automatically installs the platform-specific binary
npm install @swc/coreManual installation is unnecessary and not recommended:
# Not recommended - the binary is automatically managed
npm install @swc/core-darwin-arm64If the native binary fails to load, @swc/core automatically falls back to the WebAssembly version (@swc/wasm) with reduced performance. Common issues include:
You can verify which binary is being used:
import { getBinaryMetadata } from "@swc/core";
console.log(getBinaryMetadata());
// Expected output on ARM64 macOS: { target: "aarch64-apple-darwin" }The native binary provides significant performance advantages over JavaScript alternatives when successfully loaded: