CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-swc--html-win32-arm64-msvc

Platform-specific native binary addon for Windows ARM64 MSVC providing super-fast HTML minification capabilities

Pending
Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

@swc/html-win32-arm64-msvc

@swc/html-win32-arm64-msvc is a platform-specific native binary addon that provides HTML minification capabilities for Windows ARM64 systems compiled with MSVC. This package contains only a native Node.js addon (.node file) and is automatically selected by the main @swc/html package when running on compatible platforms.

Package Information

  • Package Name: @swc/html-win32-arm64-msvc
  • Package Type: npm
  • Language: Rust (native binary)
  • Installation: Automatically installed as optional dependency of @swc/html
  • Platform: Windows ARM64 MSVC only (os: ["win32"], cpu: ["arm64"])
  • Node.js: Requires >= 10

Overview

This package is part of the SWC (Speedy Web Compiler) ecosystem and provides platform-specific native binaries for HTML minification. It contains a single native binary file (swc-html.win32-arm64-msvc.node) that implements fast HTML minification through Rust-compiled code.

Important: This package is not imported directly by users. The main @swc/html package automatically detects the platform and loads the appropriate native binary.

Core Imports

This package is not imported directly. Instead, use the main @swc/html package:

import { minify, minifySync, minifyFragment, minifyFragmentSync } from "@swc/html";

For CommonJS:

const { minify, minifySync, minifyFragment, minifyFragmentSync } = require("@swc/html");

Basic Usage

Usage is through the main @swc/html package, which automatically loads this binary on Windows ARM64 MSVC systems:

import { minify, minifySync } from "@swc/html";

// On Windows ARM64 MSVC, this automatically uses the native binary from this package
const result = await minify("<html><body>  <h1>Hello World</h1>  </body></html>", {
  collapseWhitespaces: "smart",
  removeComments: true
});
console.log(result.code); // "<html><body><h1>Hello World</h1></body></html>"

Architecture

This package is a native binary addon within the SWC HTML minification ecosystem:

  • Native Binary: Contains a single .node file (swc-html.win32-arm64-msvc.node) compiled from Rust
  • Platform Detection: Automatically selected by @swc/html based on process.platform === "win32" and process.arch === "arm64"
  • Performance: Provides significantly faster HTML minification than JavaScript implementations
  • Fallback System: If this binary is unavailable, the system falls back to other platform binaries or WASM
  • No Direct API: Exposes no public API - all functionality is accessed through the main @swc/html package

Capabilities

Native Binary Addon

This package provides the underlying native implementation for HTML minification on Windows ARM64 MSVC systems.

// This package contains only a native binary file:
// swc-html.win32-arm64-msvc.node

// Platform constraints (from package.json):
interface PlatformSupport {
  os: ["win32"];
  cpu: ["arm64"];
}

Platform Detection Integration

Automatic platform detection and loading by the main @swc/html package.

// Platform detection logic (handled by @swc/html):
// - process.platform === "win32"
// - process.arch === "arm64"  
// - MSVC runtime availability

// When conditions are met, @swc/html loads:
// require("@swc/html-win32-arm64-msvc/swc-html.win32-arm64-msvc.node")

Package Contents

This package contains only the native binary file:

  • swc-html.win32-arm64-msvc.node - Native Node.js addon compiled from Rust
  • package.json - Package metadata with platform constraints

The native binary implements the same interface as other SWC HTML platform binaries and provides the underlying functionality for:

  • HTML document minification
  • HTML fragment minification
  • Comprehensive optimization options
  • Error reporting and diagnostics

Platform Integration

The main @swc/html package handles platform detection and loading:

// @swc/html automatically detects platform and loads appropriate binary
import { minify } from "@swc/html";

// On Windows ARM64 MSVC systems, this uses @swc/html-win32-arm64-msvc internally
const result = await minify(htmlContent, {
  collapseWhitespaces: "smart",
  removeComments: true,
  removeEmptyAttributes: true
});

Error Handling

If this platform-specific binary is unavailable or fails to load, the main @swc/html package will:

  1. Attempt to load other compatible platform binaries
  2. Fall back to WASM implementation if available
  3. Throw an error if no compatible implementation is found

Performance Characteristics

  • Native Speed: Rust-compiled binary provides optimal performance for HTML minification
  • Memory Efficiency: Lower memory overhead compared to JavaScript implementations
  • Platform Optimized: Compiled specifically for Windows ARM64 MSVC runtime
  • Zero JavaScript: No additional JavaScript processing overhead
Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@swc/html-win32-arm64-msvc@1.13.x
Publish Source
CLI
Badge
tessl/npm-swc--html-win32-arm64-msvc badge