getsentry / rust-sourcemap

A library for rust that implements basic sourcemap handling
Other
224 stars 27 forks source link

[Feat Request]Make `SourceMap` struct is `Sync`. #79

Closed underfin closed 7 months ago

underfin commented 7 months ago

The sourcemap crate is amazing, it maybe used extensive at rust js tools, but here has a problem. The rust js tools always run at parallel(oxc and swc codegen), but the SourceMap struct is not Sync because SourceView using Refcell. Here has a workaround encode it to String map, but after it need to decode to SourceMap, it has an unnecessary overhead. Hope get your advice, thank you.