or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

index.md
tile.json

tessl/npm-swc--core-linux-arm64-musl

Platform-specific native binary package for @swc/core on Linux ARM64 musl systems

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@swc/core-linux-arm64-musl@1.13.x

To install, run

npx @tessl/cli install tessl/npm-swc--core-linux-arm64-musl@1.13.0

index.mddocs/

@swc/core-linux-arm64-musl

@swc/core-linux-arm64-musl is a platform-specific native binary package that provides optimized native performance for the SWC compiler on Linux ARM64 systems using musl libc. This package contains no JavaScript API - it serves solely as a distribution mechanism for the compiled native binary.

Package Information

  • Package Name: @swc/core-linux-arm64-musl
  • Package Type: npm
  • Language: Native Binary (Rust-compiled)
  • Installation: Automatically installed as optional dependency with @swc/core
  • Target Platform: Linux ARM64 with musl libc (aarch64-unknown-linux-musl)

Overview

This package is part of SWC's multi-platform distribution strategy. SWC (Speedy Web Compiler) is a super-fast TypeScript and JavaScript compiler written in Rust that serves as a high-performance alternative to Babel. Rather than providing a single large binary, SWC distributes platform-specific native binaries as separate optional dependencies to optimize installation size and performance.

Core Imports

Important: This package provides no JavaScript API and should never be imported directly. It contains only native binary files.

// INCORRECT - This package cannot be imported
import anything from "@swc/core-linux-arm64-musl"; // ❌ Will fail - no exports

// CORRECT - Use @swc/core instead
import { transform, minify, parse } from "@swc/core"; // ✅ Correct approach

Basic Usage

This package is used automatically by @swc/core and requires no direct interaction:

# Install @swc/core (this package gets installed automatically if needed)
npm install @swc/core

# Use SWC through @swc/core - the native binary from this package runs behind the scenes
npx swc ./src --out-dir ./dist

Installation

Important: This package should never be installed directly. It is automatically installed as an optional dependency when you install @swc/core on a compatible Linux ARM64 musl system.

# Correct way - install @swc/core
npm install @swc/core
# @swc/core-linux-arm64-musl gets installed automatically on compatible systems

# Incorrect - do not install directly  
npm install @swc/core-linux-arm64-musl  # Don't do this

Architecture

This package is part of SWC's multi-platform binary distribution strategy. When @swc/core is installed:

  1. Platform Detection: npm automatically determines if the current system matches the platform constraints (Linux + ARM64 + musl)
  2. Optional Installation: If compatible, this package is installed as an optional dependency
  3. Runtime Loading: @swc/core loads the appropriate binary at runtime through its binding mechanism
  4. Fallback Strategy: If the native binary fails to load, @swc/core falls back to the WebAssembly version

Capabilities

Native Binary Distribution

Provides platform-specific native binaries optimized for Linux ARM64 musl systems.

{
  "main": "swc.linux-arm64-musl.node",
  "files": [
    "swc.linux-arm64-musl.node",
    "swc"
  ]
}

Platform Constraints

Defines the specific platform requirements for automatic installation.

{
  "os": ["linux"],
  "cpu": ["arm64"],
  "libc": ["musl"],
  "engines": {
    "node": ">=10"
  }
}

Integration with @swc/core

This package has no direct JavaScript API. All SWC functionality is accessed through the @swc/core package, which automatically loads this binary when running on compatible systems.

// This package provides the native binary that powers these @swc/core functions
import { transform, minify, parse } from "@swc/core";

// When running on Linux ARM64 musl, @swc/core automatically uses
// the swc.linux-arm64-musl.node binary from this package
const result = await transform(code, options);

Performance Benefits

Using this native binary instead of WebAssembly provides:

  • Faster compilation: Direct native execution without WebAssembly overhead
  • Lower memory usage: More efficient memory management in native code
  • Better performance: Optimized for the specific target architecture

Troubleshooting

Binary Loading Issues

If the native binary fails to load:

  1. Automatic Fallback: @swc/core will automatically attempt to install and use @swc/wasm as a fallback
  2. Manual Override: Set SWC_BINARY_PATH environment variable to specify a custom binary location
  3. Compatibility Check: Verify your system matches the platform constraints (Linux ARM64 musl)

Common Issues

  • Architecture Mismatch: This package only works on ARM64 systems, not x86_64
  • libc Compatibility: Requires musl libc, not glibc (use @swc/core-linux-arm64-gnu for glibc systems)
  • Missing Binary: If the package installed but binary is missing, try reinstalling @swc/core

Related Packages

This package is part of SWC's platform-specific binary ecosystem:

  • @swc/core: Main package that provides the JavaScript API
  • @swc/core-linux-x64-gnu: x86_64 Linux with glibc
  • @swc/core-linux-x64-musl: x86_64 Linux with musl
  • @swc/core-linux-arm64-gnu: ARM64 Linux with glibc (this package's glibc counterpart)
  • @swc/core-darwin-arm64: macOS ARM64
  • @swc/core-darwin-x64: macOS x86_64
  • @swc/core-win32: Windows binaries
  • @swc/wasm: WebAssembly fallback

Summary

@swc/core-linux-arm64-musl is a pure distribution package containing native binaries with no JavaScript API. It exists to provide optimal native performance for SWC on Linux ARM64 musl systems. Users interact with SWC functionality exclusively through the @swc/core package, which automatically handles loading the appropriate platform-specific binary from packages like this one.