ton-community / tact

TACT Compiler main repository
https://docs.tact-lang.org
32 stars 6 forks source link

Provide an API/example on how to compile using JS #14

Open shaharyakir opened 1 year ago

shaharyakir commented 1 year ago

Is it possible to invoke the compiler from a JS API instead of a separate process? (Similar to ton-compiler)

ex3ndr commented 1 year ago

Most of the time, compiler call compileProjects - https://github.com/ton-community/tact/blob/0e0d8088809d82e2bffce553cb6b2c92887ad5bc/src/main.ts#L105

shaharyakir commented 1 year ago

Related to #15 - if this the API, it should allow passing in the config directly and not rely on a file system. This way we could run tact compilation in a browser (the config would need to allow returning artifacts in a json)