Native bindings for Rollup specifically compiled for x86_64 Linux systems with glibc
npx @tessl/cli install tessl/npm-rollup--rollup-linux-x64-gnu@4.50.0@rollup/rollup-linux-x64-gnu is a platform-specific native binary addon package for Rollup, providing high-performance native implementations of core bundling operations specifically compiled for x86_64 Linux systems with glibc. This package enhances Rollup's performance by providing native implementations of performance-critical parsing and hashing functionality implemented in Rust.
This package cannot be imported directly. It is automatically loaded by the main rollup package when available on compatible systems.
The native functionality is accessed through rollup's native loader:
// Automatic loading - no direct import needed
const rollup = require('rollup');
// or
import * as rollup from 'rollup';For direct access to native functions (advanced usage):
const native = require('@rollup/rollup-linux-x64-gnu');
// Note: This will only work if the package is manually installed
// and the native binary is availableThis package is designed to work transparently with rollup. When rollup is installed on a compatible Linux x86_64 system, this package is automatically selected and used for enhanced performance:
import { rollup } from 'rollup';
// The native parsing functions are used automatically
const bundle = await rollup({
input: 'src/main.js',
plugins: []
});
const { output } = await bundle.generate({
format: 'esm'
});This package integrates with Rollup's native loading architecture:
process.platform, process.arch, and glibc detectionrollup.linux-x64-gnu.node)High-performance parsing of JavaScript/TypeScript source code into Abstract Syntax Tree (AST) format.
/**
* Synchronously parses JavaScript/TypeScript code into AST format
* @param code - Source code string to parse
* @param allowReturnOutsideFunction - Allow return statements outside functions
* @param jsx - Enable JSX parsing support
* @returns Buffer containing parsed AST data
*/
function parse(code: string, allowReturnOutsideFunction: boolean, jsx: boolean): Buffer;
/**
* Asynchronously parses JavaScript/TypeScript code into AST format
* @param code - Source code string to parse
* @param allowReturnOutsideFunction - Allow return statements outside functions
* @param jsx - Enable JSX parsing support
* @param signal - Optional AbortSignal for cancellation
* @returns Promise resolving to Buffer containing parsed AST data
*/
function parseAsync(
code: string,
allowReturnOutsideFunction: boolean,
jsx: boolean,
signal?: AbortSignal | undefined | null
): Promise<Buffer>;Usage Example:
// Direct usage (advanced - not typical)
const { parse } = require('@rollup/rollup-linux-x64-gnu');
const sourceCode = `
import { foo } from './foo.js';
export default foo();
`;
const astBuffer = parse(sourceCode, false, false);
// astBuffer contains the parsed AST dataHigh-performance hashing functions using xxHash algorithm with different encoding formats.
/**
* Computes xxHash of input data and returns base16 encoded result
* @param input - Input data as Uint8Array
* @returns Base16 (hexadecimal) encoded hash string
*/
function xxhashBase16(input: Uint8Array): string;
/**
* Computes xxHash of input data and returns base36 encoded result
* @param input - Input data as Uint8Array
* @returns Base36 encoded hash string
*/
function xxhashBase36(input: Uint8Array): string;
/**
* Computes xxHash of input data and returns base64url encoded result
* @param input - Input data as Uint8Array
* @returns Base64url encoded hash string
*/
function xxhashBase64Url(input: Uint8Array): string;Usage Examples:
// Direct usage (advanced - not typical)
const { xxhashBase16, xxhashBase36, xxhashBase64Url } = require('@rollup/rollup-linux-x64-gnu');
const data = new TextEncoder().encode('Hello, world!');
const hex = xxhashBase16(data); // "a8b4b9174b5076cb"
const base36 = xxhashBase36(data); // "9x4x7g3tbsl5mb"
const base64 = xxhashBase64Url(data); // "qLS5F0tQdss"{
"os": ["linux"],
"cpu": ["x64"],
"libc": ["glibc"]
}This package is installed automatically as an optional dependency when installing rollup on compatible systems. If the system is incompatible or the package fails to install, rollup will automatically fall back to JavaScript/WASM implementations without affecting functionality.
When the native module cannot be loaded, rollup's native loader provides detailed error messages:
@rollup/wasm-node as alternativepackage-lock.json and node_modules to resolve npm dependency bugsnative.js loader