perl-dap-platform 0.12.2

Cross-platform runtime utilities for perl-dap
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented0 out of 3 items with examples
  • Size
  • Source code size: 9.63 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.15 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 41s Average build duration of successful builds.
  • all releases: 29s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • EffortlessMetrics/perl-lsp
    9 5 596
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • EffortlessSteven

perl-dap-platform

Cross-platform helpers for finding Perl and shaping the debugger launch environment.

This crate sits below the debugger runtime and above shell quoting. It handles the OS-specific parts of launch setup: finding the Perl executable, normalizing filesystem paths, and building PERL5LIB-style environment maps.

Boundaries

  • Use perl-dap-shell when you need shell-safe argument formatting.
  • Use perl-dap-platform when you need to resolve the executable or normalize OS paths.
  • Use perl-dap when you want the server to actually launch and manage a debug session.

Key API

  • resolve_perl_path
  • normalize_path
  • setup_environment

Example

use perl_dap_platform::{normalize_path, setup_environment};
use std::path::PathBuf;

let normalized = normalize_path(&PathBuf::from("/mnt/c/work/script.pl"));
let env = setup_environment(&[PathBuf::from("/workspace/lib")]);

assert!(normalized.to_string_lossy().len() > 0);
assert_eq!(env.get("PERL5LIB").map(String::as_str), Some("/workspace/lib"));