|
1 | 1 | # WASM wrapper for TON Tolk Language |
2 | 2 |
|
3 | | -**Tolk** is a new language for writing smart contracts in TON. Think of Tolk as the "next‑generation FunC". |
4 | | -Tolk compiler is literally a fork of FunC compiler, introducing familiar syntax similar to TypeScript, |
5 | | -but leaving all low-level optimizations untouched. |
| 3 | +**Tolk** is a next-generation language for smart contracts in TON. |
| 4 | +It replaces FunC with modern syntax, strong types, and built-in serialization — while generating even more efficient assembler code. |
6 | 5 |
|
7 | 6 | **tolk-js** is a WASM wrapper for Tolk compiler. |
8 | 7 | [Blueprint](https://github.com/ton-org/blueprint) uses tolk-js to compile `.tolk` files, |
@@ -81,13 +80,14 @@ The function `runTolkCompiler()` accepts the following properties (look up `Tolk |
81 | 80 | * `entrypointFileName` — obvious |
82 | 81 | * `fsReadCallback` — explained above |
83 | 82 | * `optimizationLevel` (default 2) — controls Tolk compiler stack optimizer |
84 | | -* `withStackComments` (default false) — Fift output will contain comments, if you wish to debug its output |
| 83 | +* `withStackComments` (default false) — Fift output will contain stack comments, if you wish to debug its output |
| 84 | +* `withSrcLineComments` (default false) — Fift output will contain line comments from original .tolk files |
85 | 85 | * `experimentalOptions` (default '') — you can pass experimental compiler options here |
86 | 86 |
|
87 | 87 |
|
88 | 88 | ## Embedded stdlib functions |
89 | 89 |
|
90 | | -Tolk standard functions (`beginCell`, `assertEndOfSlice`, and lots of others) are available out of the box *(if you worked with FunC earlier, you had to download stdlib.fc and store in your project; in Tolk, you don't need any additional files)*. |
| 90 | +Tolk standard functions (`beginCell`, `assertEnd`, and lots of others) are available out of the box *(if you worked with FunC earlier, you had to download stdlib.fc and store in your project; in Tolk, you don't need any additional files)*. |
91 | 91 |
|
92 | 92 | It works, because all stdlib files are embedded into JS, placed near wasm. If you `import "@stdlib/tvm-dicts"` for example, tolk-js will handle it, `fsReadCallback` won't be called. |
93 | 93 |
|
|
0 commit comments