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
208 downloads per month
Used in 22 crates
(2 directly)
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 withOnceLocklazy init. Each entry carries multiple signature variants and a documentation string (BuiltinSignature). Used for signature help and hover.builtin_signatures_phf-- Re-export of theperl-builtins-phfmicrocrate, which provides compile-timephf::Maptables (BUILTIN_SIGS,BUILTIN_FULL_SIGS) for O(1) lookups with zero runtime allocation. Exposesget_param_names,is_builtin, andbuiltin_counthelpers. 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