sourceURLPrefixes WebAssembly custom section
This custom section is created to provide mapping of the local (or remote) file paths to network resources. Currently we can have DWARF sections inside the binary WebAssembly file, however debugger, in most of the cases, cannot retrive local files -- this file paths needs to be mapped to some networks server location.
The custom section has the following format:
|Custom Section ID||varuint32||0|
|Custom Section Size||varuint32||size of the section (including name)|
|Section Name Len||varuint32||
|JSON||bytes||utf-8 encoded JSON|
The JSON is an array of pairs (array). The first item of the pair is the prefix to be replaced, and the second is the prefix that will be used as the replacement, e.g.
[ ["/Users/yury/example_com/", "http://example.com/"], ["/usr/lib/libx/", "http://example.org/libx/"], ]
If the consumer find the file path that starts with "/Users/yury/example_com/", this path needs to the changed to start with "http://example.com/".