Agoric / documentation

User documentation
https://agoric.com/documentation/
Apache License 2.0
15 stars 39 forks source link

cite XS conformance, Intl handling #581

Open dckc opened 2 years ago

dckc commented 2 years ago

We should document the details of the JavaScript engine used for smart contract execution, especially XS Conformance .

The section on what globals are available should note that and the fact that Intl isn't available in a hardened JS context.

splitting this out of #579

Tyrosine22 commented 1 year ago

@dckc : I have no idea what this bug is about. Would you mind elaborating?

dckc commented 1 year ago

We should document the details of the JavaScript engine used for smart contract execution.

https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/xs/XS%20Conformance.md is the particular conformance documentation.

There's also the way XS uses utf-8 vs UCS-2 for strings (which we have made nearly invisible, but not quite, iirc)

This sort of material might also be useful:

XS does not aim to run all JavaScript that is supported in a web browser; it does aim to run JavaScript as defined by the language standard. XS takes advantage of some relatively obscure options in the JavaScript language specification. For example, it does not provide the source code for JavaScript functions via Function.prototype.toString. It also does not implement all of Annex B as this is only required in web browsers. -- https://www.moddable.com/hardening-xs