28 releases (14 breaking)
0.15.0 | May 21, 2024 |
---|---|
0.14.10 | Feb 10, 2024 |
0.14.9 | Jan 19, 2024 |
0.14.7 | Nov 24, 2023 |
0.2.0 | Jul 26, 2021 |
#369 in Web programming
219 downloads per month
Used in 6 crates
(4 directly)
49KB
1K
SLoC
Source map
Utilities for building source maps (v3), handling source location representations and source files.
Includes
SpanWithSource
, a structure which represents a section of a specific sourceSpanWithoutSource
, a structure which represents a general section without a specific sourceSourceId
, a identifier for a source fileStringWithOptionalSourceMap
, along with theToString
trait makes generating string representations with and adding source markings trivial- A
lsp-types-morphisms
feature which allows conversion of position type to lsp-types - The
MapFileStore
struct and theFileSystem
trait for storing source files and other information - Utilities for turning byte indices into line and column information
Source map generation example
See generated example on GitHub actions.
git clone https://github.com/kaleidawave/source-map
cd source-map
cargo run -F inline-source-map --example source_map_creation -- LICENSE LICENSE.map
View pairings generated by uploading LICENSE.map
to evan w's source map visualizer
Dependencies
~0–7MB
~50K SLoC