or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

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

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

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@swc/html-win32-arm64-msvc@1.13.x

To install, run

npx @tessl/cli install tessl/npm-swc--html-win32-arm64-msvc@1.13.0

0

# @swc/html-win32-arm64-msvc

1

2

@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.

3

4

## Package Information

5

6

- **Package Name**: @swc/html-win32-arm64-msvc

7

- **Package Type**: npm

8

- **Language**: Rust (native binary)

9

- **Installation**: Automatically installed as optional dependency of `@swc/html`

10

- **Platform**: Windows ARM64 MSVC only (`os: ["win32"]`, `cpu: ["arm64"]`)

11

- **Node.js**: Requires >= 10

12

13

## Overview

14

15

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.

16

17

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

18

19

## Core Imports

20

21

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

22

23

```typescript

24

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

25

```

26

27

For CommonJS:

28

29

```javascript

30

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

31

```

32

33

## Basic Usage

34

35

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

36

37

```typescript

38

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

39

40

// On Windows ARM64 MSVC, this automatically uses the native binary from this package

41

const result = await minify("<html><body> <h1>Hello World</h1> </body></html>", {

42

collapseWhitespaces: "smart",

43

removeComments: true

44

});

45

console.log(result.code); // "<html><body><h1>Hello World</h1></body></html>"

46

```

47

48

## Architecture

49

50

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

51

52

- **Native Binary**: Contains a single `.node` file (`swc-html.win32-arm64-msvc.node`) compiled from Rust

53

- **Platform Detection**: Automatically selected by `@swc/html` based on `process.platform === "win32"` and `process.arch === "arm64"`

54

- **Performance**: Provides significantly faster HTML minification than JavaScript implementations

55

- **Fallback System**: If this binary is unavailable, the system falls back to other platform binaries or WASM

56

- **No Direct API**: Exposes no public API - all functionality is accessed through the main `@swc/html` package

57

58

## Capabilities

59

60

### Native Binary Addon

61

62

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

63

64

```typescript { .api }

65

// This package contains only a native binary file:

66

// swc-html.win32-arm64-msvc.node

67

68

// Platform constraints (from package.json):

69

interface PlatformSupport {

70

os: ["win32"];

71

cpu: ["arm64"];

72

}

73

```

74

75

### Platform Detection Integration

76

77

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

78

79

```typescript { .api }

80

// Platform detection logic (handled by @swc/html):

81

// - process.platform === "win32"

82

// - process.arch === "arm64"

83

// - MSVC runtime availability

84

85

// When conditions are met, @swc/html loads:

86

// require("@swc/html-win32-arm64-msvc/swc-html.win32-arm64-msvc.node")

87

```

88

89

## Package Contents

90

91

This package contains only the native binary file:

92

93

- `swc-html.win32-arm64-msvc.node` - Native Node.js addon compiled from Rust

94

- `package.json` - Package metadata with platform constraints

95

96

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

97

98

- HTML document minification

99

- HTML fragment minification

100

- Comprehensive optimization options

101

- Error reporting and diagnostics

102

103

## Platform Integration

104

105

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

106

107

```typescript

108

// @swc/html automatically detects platform and loads appropriate binary

109

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

110

111

// On Windows ARM64 MSVC systems, this uses @swc/html-win32-arm64-msvc internally

112

const result = await minify(htmlContent, {

113

collapseWhitespaces: "smart",

114

removeComments: true,

115

removeEmptyAttributes: true

116

});

117

```

118

119

## Error Handling

120

121

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

122

123

1. Attempt to load other compatible platform binaries

124

2. Fall back to WASM implementation if available

125

3. Throw an error if no compatible implementation is found

126

127

## Performance Characteristics

128

129

- **Native Speed**: Rust-compiled binary provides optimal performance for HTML minification

130

- **Memory Efficiency**: Lower memory overhead compared to JavaScript implementations

131

- **Platform Optimized**: Compiled specifically for Windows ARM64 MSVC runtime

132

- **Zero JavaScript**: No additional JavaScript processing overhead