4 releases

Uses new Rust 2024

0.12.2 Apr 4, 2026
0.12.1 Mar 31, 2026
0.12.0 Mar 30, 2026
0.11.0 Mar 12, 2026

#2025 in Development tools

Download history 7/week @ 2026-04-01 63/week @ 2026-04-08 50/week @ 2026-04-15 58/week @ 2026-04-22 49/week @ 2026-04-29 37/week @ 2026-05-06

208 downloads per month
Used in 22 crates (2 directly)

MIT/Apache

76KB
2K SLoC

perl-builtins

Builtin function signatures and metadata for Perl parser and LSP tooling.

Part of the tree-sitter-perl-rs workspace.

Overview

Provides two complementary lookup mechanisms for 200+ Perl built-in functions (including file test operators):

  • builtin_signatures -- HashMap-based store with OnceLock lazy init. Each entry carries multiple signature variants and a documentation string (BuiltinSignature). Used for signature help and hover.
  • builtin_signatures_phf -- Re-export of the perl-builtins-phf microcrate, which provides compile-time phf::Map tables (BUILTIN_SIGS, BUILTIN_FULL_SIGS) for O(1) lookups with zero runtime allocation. Exposes get_param_names, is_builtin, and builtin_count helpers. Used for inlay hints and completion.

Categories covered

I/O, strings, arrays, hashes, file/directory ops, file test operators (-e, -f, ...), processes, math, sockets/network, IPC, user/group, time, modules, control flow, tied variables, and more.

Usage

use perl_builtins::builtin_signatures_phf::{is_builtin, get_param_names};

assert!(is_builtin("print"));
assert_eq!(get_param_names("open"), &["FILEHANDLE", "MODE", "FILENAME"]);

License

MIT OR Apache-2.0

Dependencies

~235–600KB
~14K SLoC