TagLib-Wasm
Guide
API Reference
Examples
NPM
GitHub
Guide
API Reference
Examples
NPM
GitHub
  • Getting Started

    • Introduction
    • Installation
    • Quick Start
    • Platform-Specific Examples
  • Features

    • Working with Cover Art
    • Examples
    • Cloudflare Workers Setup
  • Core Concepts

    • Runtime Compatibility
    • Memory Management
    • Performance Guide
    • Error Handling Guide
  • API Reference

    • taglib-wasm API Reference
    • TagLib Tag Name Constants and Cross-Format Mapping
    • Extended Metadata with PropertyMap API
  • Advanced

    • Implementation Guide
    • Troubleshooting Guide
    • Cloudflare Workers
  • Development

    • Testing Guide
    • Future Improvements
    • Publishing Guide

Installation

Package Managers

::: code-tabs @tab Deno

import { TagLib } from "npm:taglib-wasm";

@tab Node.js

npm install taglib-wasm

Requirements: Node.js v22.6.0 or higher

TypeScript Usage

// Option 1: Node's experimental TypeScript support (v22.6.0+)
node --experimental-strip-types your-script.ts

// Option 2: TypeScript loader (recommended)
npm install --save-dev tsx
npx tsx your-script.ts

JavaScript Usage

// The NPM package includes pre-compiled JavaScript
import { TagLib } from "taglib-wasm";
import { readTags, applyTags } from "taglib-wasm/simple";

// Works the same as TypeScript
const taglib = await TagLib.initialize();
const tags = await readTags("song.mp3");

@tab Bun

bun add taglib-wasm

@tab Browsers

<!-- Use a bundler like Vite, Webpack, or Parcel -->
<script type="module">
  import { TagLib } from "taglib-wasm";
</script>

:::

Runtime Requirements

Memory Requirements

TagLib-Wasm requires WebAssembly support with sufficient memory:

  • Default: 16MB initial, 256MB maximum
  • Cloudflare Workers: 8MB recommended initial size
  • Large files: May need increased maximum memory

Browser Compatibility

Requires modern browser with:

  • WebAssembly support
  • ES2020 features
  • async/await support

Tested on:

  • Chrome 90+
  • Firefox 89+
  • Safari 14.1+
  • Edge 90+

TypeScript Configuration

For TypeScript projects, TagLib-Wasm includes complete type definitions:

{
  "compilerOptions": {
    "target": "ES2020",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "lib": ["ES2020", "DOM"]
  }
}

Verification

Verify your installation:

import { TagLib } from "taglib-wasm";

const taglib = await TagLib.initialize();
console.log("TagLib-Wasm initialized successfully!");

Next Steps

  • Continue to Quick Start to write your first code
  • See Runtime Compatibility for platform-specific details
Edit this page on GitHub
Last Updated:: 6/17/25, 3:34 PM
Contributors: Charles Wiltgen
Prev
Introduction
Next
Quick Start