f8-engine 0.5.0__tar.gz → 0.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. {f8_engine-0.5.0 → f8_engine-0.6.0}/Cargo.lock +218 -8
  2. {f8_engine-0.5.0 → f8_engine-0.6.0}/Cargo.toml +6 -4
  3. {f8_engine-0.5.0 → f8_engine-0.6.0}/PKG-INFO +70 -15
  4. {f8_engine-0.5.0 → f8_engine-0.6.0}/README.md +69 -14
  5. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/compiled/mod.rs +289 -227
  6. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/compiled/model.rs +16 -15
  7. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/emission/error.rs +23 -3
  8. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/emission/workbook.rs +170 -87
  9. f8_engine-0.6.0/crates/f8-core/src/compiler/error.rs +345 -0
  10. f8_engine-0.6.0/crates/f8-core/src/compiler/eval/context.rs +102 -0
  11. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/eval/error.rs +71 -20
  12. f8_engine-0.6.0/crates/f8-core/src/compiler/eval/expr.rs +288 -0
  13. f8_engine-0.6.0/crates/f8-core/src/compiler/eval/mod.rs +116 -0
  14. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/eval/model.rs +0 -6
  15. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/graph/dependency.rs +14 -6
  16. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/graph/error.rs +64 -3
  17. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/graph/mod.rs +1 -1
  18. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/graph/resolve.rs +266 -82
  19. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/ir/error.rs +0 -17
  20. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/ir/expand.rs +30 -1
  21. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/ir/id.rs +8 -2
  22. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/ir/mod.rs +1 -1
  23. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/ir/symbol.rs +129 -9
  24. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/layout/a1.rs +1 -9
  25. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/layout/mod.rs +12 -79
  26. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/lowering/address.rs +8 -1
  27. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/lowering/mod.rs +49 -26
  28. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/mod.rs +25 -28
  29. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/expr/ast.rs +167 -39
  30. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/expr/error.rs +11 -0
  31. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/expr/mod.rs +2 -2
  32. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/expr/parser.rs +541 -80
  33. f8_engine-0.6.0/crates/f8-core/src/functions/binder.rs +150 -0
  34. f8_engine-0.6.0/crates/f8-core/src/functions/common.rs +249 -0
  35. f8_engine-0.6.0/crates/f8-core/src/functions/date/constructors.rs +215 -0
  36. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/functions/date/mod.rs +4 -9
  37. f8_engine-0.6.0/crates/f8-core/src/functions/date/parts.rs +132 -0
  38. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/functions/date/yearfrac.rs +41 -75
  39. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/functions/error.rs +106 -9
  40. f8_engine-0.6.0/crates/f8-core/src/functions/financial/annuity.rs +179 -0
  41. f8_engine-0.6.0/crates/f8-core/src/functions/financial/discounting.rs +251 -0
  42. f8_engine-0.6.0/crates/f8-core/src/functions/financial/irr.rs +1356 -0
  43. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/functions/financial/mod.rs +3 -4
  44. f8_engine-0.6.0/crates/f8-core/src/functions/information/mod.rs +97 -0
  45. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/functions/logical/boolean.rs +38 -48
  46. f8_engine-0.6.0/crates/f8-core/src/functions/logical/branching.rs +161 -0
  47. f8_engine-0.6.0/crates/f8-core/src/functions/logical/error_handling.rs +68 -0
  48. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/functions/logical/mod.rs +4 -6
  49. f8_engine-0.6.0/crates/f8-core/src/functions/lookup/index.rs +149 -0
  50. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/functions/lookup/mod.rs +2 -1
  51. f8_engine-0.6.0/crates/f8-core/src/functions/lookup/search.rs +668 -0
  52. f8_engine-0.6.0/crates/f8-core/src/functions/lookup/xlookup.rs +154 -0
  53. f8_engine-0.6.0/crates/f8-core/src/functions/lookup/xmatch.rs +113 -0
  54. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/functions/math/aggregation.rs +99 -75
  55. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/functions/math/basic.rs +12 -23
  56. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/functions/math/mod.rs +4 -16
  57. f8_engine-0.6.0/crates/f8-core/src/functions/math/product.rs +141 -0
  58. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/functions/math/rounding.rs +25 -42
  59. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/functions/mod.rs +7 -2
  60. f8_engine-0.6.0/crates/f8-core/src/functions/registry.rs +92 -0
  61. f8_engine-0.6.0/crates/f8-core/src/functions/traits.rs +516 -0
  62. f8_engine-0.6.0/crates/f8-core/src/functions/typecheck.rs +885 -0
  63. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/model/error.rs +41 -14
  64. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/model/format.rs +2 -1
  65. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/model/id.rs +2 -1
  66. f8_engine-0.6.0/crates/f8-core/src/model/manifest.rs +143 -0
  67. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/model/mod.rs +2 -2
  68. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/model/table.rs +65 -2
  69. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/model/theme.rs +8 -20
  70. f8_engine-0.5.0/crates/f8-core/src/functions/date/serial.rs → f8_engine-0.6.0/crates/f8-core/src/value/date.rs +137 -123
  71. f8_engine-0.6.0/crates/f8-core/src/value/error.rs +169 -0
  72. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/value/format.rs +111 -46
  73. f8_engine-0.6.0/crates/f8-core/src/value/mod.rs +685 -0
  74. f8_engine-0.6.0/crates/f8-python/src/error.rs +195 -0
  75. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-python/src/model.rs +17 -23
  76. {f8_engine-0.5.0 → f8_engine-0.6.0}/python/f8/__init__.py +4 -0
  77. {f8_engine-0.5.0 → f8_engine-0.6.0}/python/f8/_core.pyi +1 -1
  78. {f8_engine-0.5.0 → f8_engine-0.6.0}/python/f8/audit.py +22 -23
  79. {f8_engine-0.5.0 → f8_engine-0.6.0}/python/f8/cli.py +1 -1
  80. f8_engine-0.6.0/python/f8/skills/f8-modeling/SKILL.md +55 -0
  81. {f8_engine-0.5.0 → f8_engine-0.6.0}/python/f8/skills/f8-modeling/references/auditing-and-repair.md +13 -12
  82. f8_engine-0.6.0/python/f8/skills/f8-modeling/references/functions.md +133 -0
  83. {f8_engine-0.5.0 → f8_engine-0.6.0}/python/f8/skills/f8-modeling/references/syntax-and-grid.md +23 -22
  84. {f8_engine-0.5.0 → f8_engine-0.6.0}/python/f8/types.py +2 -0
  85. f8_engine-0.5.0/crates/f8-core/src/compiler/error.rs +0 -49
  86. f8_engine-0.5.0/crates/f8-core/src/compiler/eval/context.rs +0 -102
  87. f8_engine-0.5.0/crates/f8-core/src/compiler/eval/expr.rs +0 -216
  88. f8_engine-0.5.0/crates/f8-core/src/compiler/eval/mod.rs +0 -62
  89. f8_engine-0.5.0/crates/f8-core/src/functions/common.rs +0 -459
  90. f8_engine-0.5.0/crates/f8-core/src/functions/date/constructors.rs +0 -283
  91. f8_engine-0.5.0/crates/f8-core/src/functions/date/parts.rs +0 -235
  92. f8_engine-0.5.0/crates/f8-core/src/functions/financial/annuity.rs +0 -396
  93. f8_engine-0.5.0/crates/f8-core/src/functions/financial/discounting.rs +0 -251
  94. f8_engine-0.5.0/crates/f8-core/src/functions/financial/irr.rs +0 -309
  95. f8_engine-0.5.0/crates/f8-core/src/functions/logical/branching.rs +0 -327
  96. f8_engine-0.5.0/crates/f8-core/src/functions/logical/error_handling.rs +0 -140
  97. f8_engine-0.5.0/crates/f8-core/src/functions/lookup/index.rs +0 -137
  98. f8_engine-0.5.0/crates/f8-core/src/functions/lookup/search.rs +0 -799
  99. f8_engine-0.5.0/crates/f8-core/src/functions/lookup/xlookup.rs +0 -143
  100. f8_engine-0.5.0/crates/f8-core/src/functions/lookup/xmatch.rs +0 -117
  101. f8_engine-0.5.0/crates/f8-core/src/functions/math/conditional.rs +0 -541
  102. f8_engine-0.5.0/crates/f8-core/src/functions/math/criteria.rs +0 -441
  103. f8_engine-0.5.0/crates/f8-core/src/functions/math/product.rs +0 -120
  104. f8_engine-0.5.0/crates/f8-core/src/functions/registry.rs +0 -217
  105. f8_engine-0.5.0/crates/f8-core/src/functions/traits.rs +0 -242
  106. f8_engine-0.5.0/crates/f8-core/src/model/manifest.rs +0 -77
  107. f8_engine-0.5.0/crates/f8-core/src/value/error.rs +0 -92
  108. f8_engine-0.5.0/crates/f8-core/src/value/mod.rs +0 -404
  109. f8_engine-0.5.0/crates/f8-python/src/error.rs +0 -349
  110. f8_engine-0.5.0/python/f8/skills/f8-modeling/SKILL.md +0 -45
  111. f8_engine-0.5.0/python/f8/skills/f8-modeling/references/functions.md +0 -128
  112. {f8_engine-0.5.0 → f8_engine-0.6.0}/LICENSE +0 -0
  113. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/Cargo.toml +0 -0
  114. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/compiled/error.rs +0 -0
  115. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/emission/format.rs +0 -0
  116. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/emission/mod.rs +0 -0
  117. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/graph/cycle.rs +0 -0
  118. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/ir/cell.rs +0 -0
  119. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/layout/error.rs +0 -0
  120. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/compiler/lowering/error.rs +0 -0
  121. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-core/src/lib.rs +0 -0
  122. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-python/Cargo.toml +0 -0
  123. {f8_engine-0.5.0 → f8_engine-0.6.0}/crates/f8-python/src/lib.rs +0 -0
  124. {f8_engine-0.5.0 → f8_engine-0.6.0}/pyproject.toml +0 -0
  125. {f8_engine-0.5.0 → f8_engine-0.6.0}/python/f8/__main__.py +0 -0
  126. {f8_engine-0.5.0 → f8_engine-0.6.0}/python/f8/builder.py +0 -0
  127. {f8_engine-0.5.0 → f8_engine-0.6.0}/python/f8/py.typed +0 -0
@@ -8,6 +8,12 @@ version = "1.5.1"
8
8
  source = "registry+https://github.com/rust-lang/crates.io-index"
9
9
  checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
10
10
 
11
+ [[package]]
12
+ name = "bitflags"
13
+ version = "2.13.2"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
16
+
11
17
  [[package]]
12
18
  name = "bumpalo"
13
19
  version = "3.20.3"
@@ -20,6 +26,21 @@ version = "1.0.5"
20
26
  source = "registry+https://github.com/rust-lang/crates.io-index"
21
27
  checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
22
28
 
29
+ [[package]]
30
+ name = "cfg_aliases"
31
+ version = "0.2.2"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
34
+
35
+ [[package]]
36
+ name = "constant_time_eq"
37
+ version = "0.6.1"
38
+ source = "registry+https://github.com/rust-lang/crates.io-index"
39
+ checksum = "9eb6feb175df65d0a3ccd3e73484e940d0ac664e8034f0519fd49a93db3071d9"
40
+ dependencies = [
41
+ "rustversion",
42
+ ]
43
+
23
44
  [[package]]
24
45
  name = "crc32fast"
25
46
  version = "1.5.2"
@@ -37,7 +58,7 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
37
58
 
38
59
  [[package]]
39
60
  name = "f8-core"
40
- version = "0.5.0"
61
+ version = "0.6.0"
41
62
  dependencies = [
42
63
  "indexmap",
43
64
  "petgraph",
@@ -50,13 +71,25 @@ dependencies = [
50
71
 
51
72
  [[package]]
52
73
  name = "f8-python"
53
- version = "0.5.0"
74
+ version = "0.6.0"
54
75
  dependencies = [
55
76
  "f8-core",
56
77
  "pyo3",
57
78
  "pythonize",
58
79
  ]
59
80
 
81
+ [[package]]
82
+ name = "f8-wasm"
83
+ version = "0.6.0"
84
+ dependencies = [
85
+ "f8-core",
86
+ "rust_xlsxwriter",
87
+ "serde",
88
+ "serde-wasm-bindgen",
89
+ "serde_json",
90
+ "wasm-bindgen",
91
+ ]
92
+
60
93
  [[package]]
61
94
  name = "fixedbitset"
62
95
  version = "0.5.7"
@@ -78,6 +111,43 @@ version = "0.1.5"
78
111
  source = "registry+https://github.com/rust-lang/crates.io-index"
79
112
  checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
80
113
 
114
+ [[package]]
115
+ name = "futures-core"
116
+ version = "0.3.34"
117
+ source = "registry+https://github.com/rust-lang/crates.io-index"
118
+ checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
119
+
120
+ [[package]]
121
+ name = "futures-task"
122
+ version = "0.3.34"
123
+ source = "registry+https://github.com/rust-lang/crates.io-index"
124
+ checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
125
+
126
+ [[package]]
127
+ name = "futures-util"
128
+ version = "0.3.34"
129
+ source = "registry+https://github.com/rust-lang/crates.io-index"
130
+ checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
131
+ dependencies = [
132
+ "futures-core",
133
+ "futures-task",
134
+ "pin-project-lite",
135
+ "slab",
136
+ ]
137
+
138
+ [[package]]
139
+ name = "getrandom"
140
+ version = "0.4.3"
141
+ source = "registry+https://github.com/rust-lang/crates.io-index"
142
+ checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
143
+ dependencies = [
144
+ "cfg-if",
145
+ "js-sys",
146
+ "libc",
147
+ "r-efi",
148
+ "wasm-bindgen",
149
+ ]
150
+
81
151
  [[package]]
82
152
  name = "hashbrown"
83
153
  version = "0.15.5"
@@ -126,6 +196,17 @@ version = "1.0.18"
126
196
  source = "registry+https://github.com/rust-lang/crates.io-index"
127
197
  checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
128
198
 
199
+ [[package]]
200
+ name = "js-sys"
201
+ version = "0.3.107"
202
+ source = "registry+https://github.com/rust-lang/crates.io-index"
203
+ checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a"
204
+ dependencies = [
205
+ "cfg-if",
206
+ "futures-util",
207
+ "wasm-bindgen",
208
+ ]
209
+
129
210
  [[package]]
130
211
  name = "libc"
131
212
  version = "0.2.189"
@@ -153,6 +234,18 @@ dependencies = [
153
234
  "autocfg",
154
235
  ]
155
236
 
237
+ [[package]]
238
+ name = "nix"
239
+ version = "0.32.0"
240
+ source = "registry+https://github.com/rust-lang/crates.io-index"
241
+ checksum = "77730ed34f01f4990cb2ea67fec715ecebc6fab9a6396cf83c5529b13f581bdc"
242
+ dependencies = [
243
+ "bitflags",
244
+ "cfg-if",
245
+ "cfg_aliases",
246
+ "libc",
247
+ ]
248
+
156
249
  [[package]]
157
250
  name = "once_cell"
158
251
  version = "1.21.4"
@@ -171,6 +264,12 @@ dependencies = [
171
264
  "serde",
172
265
  ]
173
266
 
267
+ [[package]]
268
+ name = "pin-project-lite"
269
+ version = "0.2.17"
270
+ source = "registry+https://github.com/rust-lang/crates.io-index"
271
+ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
272
+
174
273
  [[package]]
175
274
  name = "portable-atomic"
176
275
  version = "1.15.0"
@@ -268,12 +367,20 @@ dependencies = [
268
367
  "proc-macro2",
269
368
  ]
270
369
 
370
+ [[package]]
371
+ name = "r-efi"
372
+ version = "6.0.0"
373
+ source = "registry+https://github.com/rust-lang/crates.io-index"
374
+ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
375
+
271
376
  [[package]]
272
377
  name = "rust_xlsxwriter"
273
- version = "0.99.1"
378
+ version = "0.102.0"
274
379
  source = "registry+https://github.com/rust-lang/crates.io-index"
275
- checksum = "34f2d2cda7223168a14fb86bc7411dbc3379bd7d49749ecc53b91ed98585b6b0"
380
+ checksum = "6ca3d0e879a578c1313c2800ab0c6c029d38eed18098675e50341a30d32372ed"
276
381
  dependencies = [
382
+ "js-sys",
383
+ "wasm-bindgen",
277
384
  "zip",
278
385
  ]
279
386
 
@@ -293,6 +400,17 @@ dependencies = [
293
400
  "serde_derive",
294
401
  ]
295
402
 
403
+ [[package]]
404
+ name = "serde-wasm-bindgen"
405
+ version = "0.6.5"
406
+ source = "registry+https://github.com/rust-lang/crates.io-index"
407
+ checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b"
408
+ dependencies = [
409
+ "js-sys",
410
+ "serde",
411
+ "wasm-bindgen",
412
+ ]
413
+
296
414
  [[package]]
297
415
  name = "serde_core"
298
416
  version = "1.0.229"
@@ -319,6 +437,7 @@ version = "1.0.151"
319
437
  source = "registry+https://github.com/rust-lang/crates.io-index"
320
438
  checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
321
439
  dependencies = [
440
+ "indexmap",
322
441
  "itoa",
323
442
  "memchr",
324
443
  "serde",
@@ -332,6 +451,12 @@ version = "0.3.10"
332
451
  source = "registry+https://github.com/rust-lang/crates.io-index"
333
452
  checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
334
453
 
454
+ [[package]]
455
+ name = "slab"
456
+ version = "0.4.12"
457
+ source = "registry+https://github.com/rust-lang/crates.io-index"
458
+ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
459
+
335
460
  [[package]]
336
461
  name = "syn"
337
462
  version = "2.0.119"
@@ -382,9 +507,9 @@ dependencies = [
382
507
 
383
508
  [[package]]
384
509
  name = "typed-path"
385
- version = "0.12.3"
510
+ version = "0.13.0"
386
511
  source = "registry+https://github.com/rust-lang/crates.io-index"
387
- checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e"
512
+ checksum = "9ce898823d8cd0f028662d2f349694b1af0a5cc9be83f1d213a00d3147445e1e"
388
513
 
389
514
  [[package]]
390
515
  name = "unicode-ident"
@@ -398,17 +523,102 @@ version = "0.2.4"
398
523
  source = "registry+https://github.com/rust-lang/crates.io-index"
399
524
  checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
400
525
 
526
+ [[package]]
527
+ name = "wasm-bindgen"
528
+ version = "0.2.130"
529
+ source = "registry+https://github.com/rust-lang/crates.io-index"
530
+ checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c"
531
+ dependencies = [
532
+ "cfg-if",
533
+ "rustversion",
534
+ "wasm-bindgen-macro",
535
+ "wasm-bindgen-shared",
536
+ ]
537
+
538
+ [[package]]
539
+ name = "wasm-bindgen-macro"
540
+ version = "0.2.130"
541
+ source = "registry+https://github.com/rust-lang/crates.io-index"
542
+ checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9"
543
+ dependencies = [
544
+ "quote",
545
+ "wasm-bindgen-macro-support",
546
+ ]
547
+
548
+ [[package]]
549
+ name = "wasm-bindgen-macro-support"
550
+ version = "0.2.130"
551
+ source = "registry+https://github.com/rust-lang/crates.io-index"
552
+ checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a"
553
+ dependencies = [
554
+ "bumpalo",
555
+ "proc-macro2",
556
+ "quote",
557
+ "syn 3.0.5",
558
+ "wasm-bindgen-shared",
559
+ ]
560
+
561
+ [[package]]
562
+ name = "wasm-bindgen-shared"
563
+ version = "0.2.130"
564
+ source = "registry+https://github.com/rust-lang/crates.io-index"
565
+ checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e"
566
+ dependencies = [
567
+ "unicode-ident",
568
+ ]
569
+
570
+ [[package]]
571
+ name = "windows-link"
572
+ version = "0.2.1"
573
+ source = "registry+https://github.com/rust-lang/crates.io-index"
574
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
575
+
576
+ [[package]]
577
+ name = "windows-sys"
578
+ version = "0.61.2"
579
+ source = "registry+https://github.com/rust-lang/crates.io-index"
580
+ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
581
+ dependencies = [
582
+ "windows-link",
583
+ ]
584
+
585
+ [[package]]
586
+ name = "zeroize"
587
+ version = "1.9.1"
588
+ source = "registry+https://github.com/rust-lang/crates.io-index"
589
+ checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
590
+ dependencies = [
591
+ "zeroize_derive",
592
+ ]
593
+
594
+ [[package]]
595
+ name = "zeroize_derive"
596
+ version = "1.5.0"
597
+ source = "registry+https://github.com/rust-lang/crates.io-index"
598
+ checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328"
599
+ dependencies = [
600
+ "proc-macro2",
601
+ "quote",
602
+ "syn 2.0.119",
603
+ ]
604
+
401
605
  [[package]]
402
606
  name = "zip"
403
- version = "8.6.0"
607
+ version = "9.6.0"
404
608
  source = "registry+https://github.com/rust-lang/crates.io-index"
405
- checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b"
609
+ checksum = "80cc68510ea7553c30a69c732de5278e94183f68765af6c642dbccefd6ec777e"
406
610
  dependencies = [
611
+ "constant_time_eq",
407
612
  "crc32fast",
408
613
  "flate2",
614
+ "getrandom",
409
615
  "indexmap",
616
+ "libc",
410
617
  "memchr",
618
+ "nix",
411
619
  "typed-path",
620
+ "windows-sys",
621
+ "zeroize",
412
622
  "zopfli",
413
623
  ]
414
624
 
@@ -3,7 +3,7 @@ resolver = "3"
3
3
  members = ["crates/f8-core", "crates/f8-python"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.5.0"
6
+ version = "0.6.0"
7
7
  edition = "2024"
8
8
  description = "Financial modeling engine with compiler verification and live Excel formulas"
9
9
  authors = ["Michael (Chencheng) Hu, CFA"]
@@ -15,12 +15,14 @@ f8-core = { path = "crates/f8-core" }
15
15
  indexmap = { version = "2.7", features = ["serde"] }
16
16
  petgraph = "0.8.3"
17
17
  serde = { version = "1.0", features = ["derive"] }
18
- serde_json = "1.0"
19
- rust_xlsxwriter = "0.99"
18
+ serde_json = { version = "1.0", features = ["preserve_order"] }
19
+ rust_xlsxwriter = "0.102"
20
20
  thiserror = "2.0"
21
- zip = { version = "8.6", default-features = false }
21
+ zip = { version = "9.6", default-features = false }
22
22
  pyo3 = { version = "0.24", default-features = false, features = ["macros"] }
23
23
  pythonize = "0.24"
24
+ wasm-bindgen = "0.2"
25
+ serde-wasm-bindgen = "0.6"
24
26
 
25
27
  [workspace.lints.clippy]
26
28
  unwrap_used = "deny"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: f8-engine
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Intended Audience :: Financial and Insurance Industry
@@ -31,7 +31,7 @@ Author, verify, and automate financial models with code and AI agents, compiled
31
31
  ## Who is f8 for
32
32
 
33
33
  1. **People who want AI to reliably build complex Excel models (financial and beyond)**: Give AI agents a semantic 2D DSL and compile-time verification to produce clean and error-free `.xlsx` workbooks with live formulas.
34
- 2. **People doing financial analysis in pure code (no Excel required)**: Run row-by-row financial statements, corkscrew schedules, and cross-table dependency graphs in Python (where columnar DataFrames fall short), with `compiled.save("model.xlsx")` ready whenever a stakeholder asks for the spreadsheet.
34
+ 2. **People doing financial analysis in pure code (no Excel required)**: Run row-by-row financial statements, corkscrew schedules, and cross-table dependency graphs in Python or TypeScript (where columnar DataFrames fall short), with `compiled.save("model.xlsx")` ready whenever a stakeholder asks for the spreadsheet.
35
35
 
36
36
  ## Why f8
37
37
 
@@ -46,11 +46,13 @@ AI agents struggle to manipulate raw spreadsheets (`openpyxl`, Office.js, or GUI
46
46
 
47
47
  - Semantic 2D modeling: Author models with readable table, row, and column identifiers; `f8` handles spatial layout and lowers logic into native Excel formulas.
48
48
  - Compiler-enforced rigor: A 6-pass Rust compiler verifies grid completeness (zero unassigned cells or formula overlaps) and enforces a strict DAG via Tarjan cycle detection.
49
- - Closed-loop verification: Evaluates formulas in memory so AI agents and `pytest` suites can audit tables, trace dependencies, and verify accounting checks in milliseconds, without opening Excel.
50
- - Verified Excel parity: Matches Excel on all 44 supported functions, including error propagation, type coercion, and the 1900 leap day bug. The [parity workbook](https://github.com/mhcfa/f8/releases/latest/download/excel_parity_verification.xlsx) ships without cached values, so Excel itself recalculates and grades 101 cases on open: exact match for integers, text, dates, and lookups; 1e-9 relative tolerance for floating-point and iterative functions (`IRR`, `XIRR`); exact error type for 23 error cases.
49
+ - Closed-loop verification: Evaluates formulas in memory so AI agents and test suites (`pytest`, `vitest`) can audit tables, trace dependencies, and verify accounting checks in milliseconds, without opening Excel.
50
+ - Verified Excel parity: Matches Excel across all 34 supported functions, combining compile-time type and shape verification with exact Excel domain error propagation and the 1900 leap day bug. The [parity workbook](https://github.com/mhcfa/f8/releases/latest/download/excel_parity_verification.xlsx) ships without cached values, so Excel itself recalculates and grades every case on open (`ParityVerification` sheet: exact match for integers, text, dates, and lookups; 1e-9 relative tolerance for floating-point and iterative functions; runtime error check via `ISERROR`; plus a dedicated `ExcelDivergences` sheet documenting intentional runtime domain and solver divergences from legacy Excel quirks).
51
51
 
52
52
  ## Getting started
53
53
 
54
+ ### Python
55
+
54
56
  Install from PyPI (package name is `f8-engine`, imported as `f8`):
55
57
 
56
58
  ```bash
@@ -59,6 +61,16 @@ pip install f8-engine
59
61
  uv add f8-engine
60
62
  ```
61
63
 
64
+ ### TypeScript / JavaScript
65
+
66
+ Install from npm (package name is `f8-engine`):
67
+
68
+ ```bash
69
+ npm install f8-engine
70
+ # or
71
+ pnpm add f8-engine
72
+ ```
73
+
62
74
  If you are working with an AI coding agent, `f8` ships with a bundled modeling skill and CLI reference you can drop straight into your workspace:
63
75
 
64
76
  ```bash
@@ -69,6 +81,8 @@ f8 guide --all # streams the full DSL, function, and auditing guide to stdout
69
81
 
70
82
  ## Quick look
71
83
 
84
+ ### Python
85
+
72
86
  ```python
73
87
  from f8 import Model
74
88
 
@@ -107,6 +121,45 @@ print(compiled.table("PPE").to_markdown())
107
121
  compiled.save("forecast.xlsx")
108
122
  ```
109
123
 
124
+ ### TypeScript
125
+
126
+ ```typescript
127
+ import { Model } from "f8-engine";
128
+
129
+ const years = ["2025A", "2026E", "2027E"] as const;
130
+ const capex = { "2025A": 25.0, "2026E": 30.0, "2027E": 35.0 };
131
+ const depr = { "2025A": -15.0, "2026E": -18.0, "2027E": -22.0 };
132
+
133
+ const model = new Model({ name: "Operating Forecast" });
134
+ const sheet = model.addSheet("Summary");
135
+
136
+ const ppe = sheet.addTable("PPE", "PP&E Corkscrew Schedule", { subtitle: "($ in millions)" });
137
+ ppe.addColumn("item", { role: "descriptor", header: "Line Item" });
138
+ for (const year of years) {
139
+ ppe.addColumn(year, { header: year, format: "currency", decimals: 1 });
140
+ }
141
+
142
+ ppe.addRow("beg_balance", {
143
+ cells: { item: "Beginning Balance", "2025A": 100.0 },
144
+ expr: 'PPE["end_balance", col.prev]',
145
+ });
146
+ ppe.addRow("capex", { cells: { item: "Capital Expenditures", ...capex } });
147
+ ppe.addRow("depreciation", { cells: { item: "Depreciation", ...depr } });
148
+ ppe.addRow("end_balance", {
149
+ cells: { item: "Ending Balance" },
150
+ expr: 'SUM(PPE["beg_balance".."depreciation", @col])',
151
+ style: "total",
152
+ });
153
+
154
+ const compiled = model.compile();
155
+
156
+ // Audit evaluated values in memory (or pass { view: "formulas" } to inspect lowered Excel formulas)
157
+ console.log(compiled.table("PPE").toMarkdown());
158
+
159
+ // Emit a live .xlsx workbook with native Excel formulas and styling (you don't have to)
160
+ compiled.save("forecast.xlsx");
161
+ ```
162
+
110
163
  Output:
111
164
 
112
165
  ```markdown
@@ -122,13 +175,13 @@ Output:
122
175
 
123
176
  Inspect compiled deliverables generated from real-world models:
124
177
 
125
- - [costco_financial_model.xlsx](https://github.com/mhcfa/f8/releases/latest/download/costco_financial_model.xlsx): Compiled financial model with live Excel formulas.
126
- - [costco_valuation_report.pdf](https://github.com/mhcfa/f8/releases/latest/download/costco_valuation_report.pdf): Valuation report rendered directly from the compiled `f8` model using Quarto, Typst, and Matplotlib.
178
+ - [costco-valuation.xlsx](https://github.com/mhcfa/f8/releases/latest/download/costco-valuation.xlsx): Compiled 3-statement, DCF, and trading comparables financial model with live Excel formulas.
179
+ - [costco-equity-valuation.pdf](https://github.com/mhcfa/f8/releases/latest/download/costco-equity-valuation.pdf): Equity valuation report and presentation rendered from the compiled `f8` model.
127
180
  - [lbo_model.xlsx](https://github.com/mhcfa/f8/releases/latest/download/lbo_model.xlsx): Multi-sheet leveraged buyout (LBO) model with transaction structuring, debt waterfall, and returns analysis.
128
181
 
129
182
  ### LBO model demo
130
183
 
131
- Complete model repo: https://github.com/mhcfa/f8-demo
184
+ Complete model repo: https://github.com/mhcfa/f8-demo (this one is written in Python)
132
185
 
133
186
  ![LBO Executive Dashboard](https://github.com/mhcfa/f8/releases/latest/download/lbo-dashboard.png)
134
187
 
@@ -148,25 +201,27 @@ Complete model repo: https://github.com/mhcfa/f8-demo
148
201
  | Superior AI modeling | Being an Excel Ninja |
149
202
  | Readable semantic code and logic | The joy of hunting down a hidden `#REF!` at 2 AM |
150
203
 
151
- Jokes aside, writing models in code gives you 40 years of software infrastructure out of the box, line-by-line `git diff` reviews, automated `pytest` checks, reusable modules, and parametric loops. The only real downsides I can think of are:
204
+ Jokes aside, writing models in code gives you 40 years of software infrastructure out of the box, line-by-line `git diff` reviews, automated `pytest` and `vitest` checks, reusable modules, and parametric loops. The only real downsides I can think of are:
152
205
 
153
206
  1. You can't do whatever you want when it comes to layout in the emitted workbook; everything has to be structured. But you wouldn't want your spreadsheet to be a mess anyway, right?
154
- 2. You have to learn some Python. But that is largely solved by AI now.
155
- 3. Constantly re-compiling just to peek at the Excel workbook can be a bit annoying, so we provide in-memory inspection methods in Python. Once you get used to `print()`, you don't need to open the `.xlsx` all the time (or just ask AI to do it).
207
+ 2. You have to learn some Python or TypeScript. But that is largely solved by AI now.
208
+ 3. Constantly re-compiling just to peek at the Excel workbook can be a bit annoying, so we provide in-memory inspection methods in both SDKs. Once you get used to printing tables in the terminal, you don't need to open the `.xlsx` all the time (or just ask AI to do it).
156
209
  4. There are no circular references or iterative solvers (as per FAST Standard Section 2.01). There is a closed-form formula that solves the revolver circularity problem without circular references anyway (and don't worry, AI knows it).
157
- 5. There is no native Excel chart emission yet (on roadmap), and no Pivot Tables. But since you are already in Python, `pandas` or `polars` handles data aggregation much better.
210
+ 5. There is no native Excel chart emission yet (on roadmap), and no Pivot Tables. But since you are already in code, your language ecosystem handles data aggregation much better.
211
+ 6. It is a one-way flow (`code -> Excel`). Editing the emitted `.xlsx` workbook won't sync back to your code, and re-compiling will overwrite manual changes. This is by design, `.xlsx` is a compiled deliverable, not a source file.
158
212
 
159
213
  ## Architecture
160
214
 
161
- Under the hood, `f8` is a Python SDK (`python/f8/`) backed by a 6-pass Rust compiler (`crates/f8-core/`):
215
+ Under the hood, `f8` provides Python (`python/f8/`) and TypeScript/WebAssembly (`ts/`, `crates/f8-wasm/`) SDKs backed by a 6-pass Rust compiler (`crates/f8-core/`):
162
216
 
163
217
  `Spec -> IR Expansion -> DAG & Cycle Check -> Topological Evaluation -> Spatial Layout -> Formula Lowering -> .xlsx Emission`
164
218
 
165
219
  - Architecture overview: `docs/architecture.md`
166
220
  - Python modeling skill: `python/f8/skills/f8-modeling/SKILL.md`
167
- - Syntax, grid, and formatting reference: `python/f8/skills/f8-modeling/references/syntax-and-grid.md`
168
- - Function reference: `python/f8/skills/f8-modeling/references/functions.md`
169
- - Auditing and repair reference: `python/f8/skills/f8-modeling/references/auditing-and-repair.md`
221
+ - TypeScript modeling skill: `ts/skills/f8-modeling/SKILL.md`
222
+ - Syntax, grid, and formatting reference: `python/f8/skills/f8-modeling/references/syntax-and-grid.md` / `ts/skills/f8-modeling/references/syntax-and-grid.md`
223
+ - Function reference: `python/f8/skills/f8-modeling/references/functions.md` / `ts/skills/f8-modeling/references/functions.md`
224
+ - Auditing and repair reference: `python/f8/skills/f8-modeling/references/auditing-and-repair.md` / `ts/skills/f8-modeling/references/auditing-and-repair.md`
170
225
 
171
226
  ## License
172
227