CityOfZion / neo-debugger-tools

A set of tools to develop NEO smart contracts
MIT License
24 stars 20 forks source link

Create Source Mapping NEP initial draft #162

Open lock9 opened 5 years ago

lock9 commented 5 years ago

In order to have greater compatibility with all programming languages supported by NEO, it's necessary that we create a source mapping standard. This NEP should explain the file format used to map the source code from high-level programming languages (C#, Typescript, Python, Go, Java) into NEO VM Opcodes. I spoke with individuals interested in this subject, and their desire is to use an existing model, instead of creating a new one. We already have this kind of mapping done using neo-debugger-tools, however, it has to be adapted. The main difference from this model to our model is the compression used in map files to make it much smaller. In smart contracts I have worked with, the map files are 10 times larger than the Smart Contract code.

"Universal mapping" reference: https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/preview# https://github.com/ryanseddon/source-map/wiki/Source-maps%3A-languages,-tools-and-other-info https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/

Credits: @Relfos for the initiative, @afragapane and @dicarlo2 for the mapping references and collaboration.

I would like to suggest that @Relfos produces the initial draft, and we add our input on top of it. In my dreams we can have this NEP done in one month 🙏.

Required for #147 and #5

Relfos commented 5 years ago

I've talked with @lock9, I will delegate the creation of the initial draft to him and help review it.

dicarlo2 commented 5 years ago

https://github.com/simplitech/proposals/blob/nep-sc-source-mapping/nep-13.mediawiki 👍 from @afragapane and me