awslabs / awslabs/llrt

SourceMap Support

Open
#43 2 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
8.8k
Forks
393
Avg merge
1d 11h
Merged PRs (30d)
45

Description

Sourcemaps are currently not supported meaning that stack traces will be from transpiled JS sources. This is not ideal for debugging purposes.

The parcel bundler has implemented support for source maps in a rust package. Its not available on crates.io but the logic of deserializing a sourcemap is not very complicated.

https://github.com/parcel-bundler/source-map/tree/master/parcel_sourcemap

Here is explanation of sourcemaps:
https://www.bugsnag.com/blog/source-maps/

If this could be implemented without pulling in serde json dependency it would be ideal since the QuickJS engine already has a build in json parser

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked parcel_sourcemap implementation and the QuickJS JSON parser mentioned in the issue. Trace how LLRT currently produces stack traces, then determine where source-map deserialization and lookup belong. Done means stack traces refer to original sources rather than transpiled JavaScript, ideally without adding serde_json.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, rust
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.