Standard Library

Last updated: August 02, 2026
Standard Library Edit page

WurstScript Standard Library

The WurstScript standard library is the set of ready-to-use packages that ships with Wurst. It wraps common Warcraft III operations, provides reusable data structures, and removes a lot of low-level boilerplate from map code.

If you are new to the library, start with the task that matches what you are building. When you already know the package name, jump straight to the full API reference.

What to expect

The library is designed to be used from normal Wurst code. Most packages are already available through the standard imports; add an explicit import only when the package is not imported by default. The packages are tested as part of the standard library and are intended for use in real maps, but Warcraft III’s native limits and lifecycle rules still apply.

The pages in this section are hand-written guides with context and complete examples. The API reference is generated from the package hotdoc and is the better place to look up an exact function, type, or member.

Find the right package

  Define Warcraft III objects in code

Use the object-editing packages when you want abilities, units, items, buffs, or upgrades to be created and configured at compile time. This keeps object data in version control and lets you reuse the same definitions across maps.

  Browse all Object Editing packages

  Choose a collection

Use this quick rule of thumb, then open the package page for the exact API and ownership details.

Package Start here when
LinkedList You need a general-purpose list, stack, or queue.
HashList You need fast membership checks or indexed access on a large list.
HashMap You need to map keys to values, including attaching data to handles.
HashSet Each value should occur at most once.
BitSet You need a compact set of boolean flags.
ArrayList You want array-backed storage and predictable iteration.

  Browse all Data Structure packages

  React to events and schedule work

Closures let you keep the action next to the event or timer without writing a separate trigger callback.

  Browse all Closure packages

  Build on Warcraft III’s engine

These packages collect the recurring glue code behind common map systems.

  Browse Event, Dummy, and Utility packages

  Work with math and geometry

  • Vectors provides vec2 and vec3 types and operations. Guide
  • Angle keeps angle values and conversions explicit. Guide

  Browse all Math packages

  Explore the rest of the library

The remaining packages cover file and network helpers, sound, terrain, printing, colors, and wrappers for native handles such as unit, item, and player.

  Browse the complete API Reference

How to read the reference

  1. Start with the overview above if you are choosing a capability rather than a specific package.
  2. Use the API reference’s category list or search to open a package page.
  3. Read the package summary and any linked detailed guide before copying an example.
  4. Use the Classes, Functions, and Extension Functions sections to find the exact declaration, then open the source when you need implementation details.

The standard library follows the Wurst coding conventions. Its source is often the best reference for idiomatic patterns and for understanding which resources a package creates or destroys.

Source and contributions

The standard library source lives on GitHub. If a package is missing an example or its description is unclear, improving the hotdoc or adding a hand-written guide improves the generated reference for everyone.