shellsim 0.1.25__tar.gz → 0.1.27__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 (362) hide show
  1. {shellsim-0.1.25 → shellsim-0.1.27}/Cargo.lock +47 -5
  2. {shellsim-0.1.25 → shellsim-0.1.27}/Cargo.toml +2 -1
  3. {shellsim-0.1.25 → shellsim-0.1.27}/PKG-INFO +2 -2
  4. {shellsim-0.1.25 → shellsim-0.1.27}/pyproject.toml +1 -1
  5. {shellsim-0.1.25 → shellsim-0.1.27}/python/native/Cargo.lock +48 -6
  6. {shellsim-0.1.25 → shellsim-0.1.27}/python/native/Cargo.toml +1 -1
  7. {shellsim-0.1.25 → shellsim-0.1.27}/src/bin/shellsim-python.rs +2 -0
  8. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/awk/eval.rs +146 -19
  9. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/awk/parser.rs +84 -22
  10. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/builtins.rs +47 -24
  11. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/expr.rs +19 -0
  12. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/find.rs +55 -10
  13. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/mod.rs +13 -8
  14. shellsim-0.1.27/src/commands/printf.rs +227 -0
  15. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/text.rs +4 -0
  16. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/wasm.rs +185 -91
  17. {shellsim-0.1.25 → shellsim-0.1.27}/src/exec.rs +41 -11
  18. {shellsim-0.1.25 → shellsim-0.1.27}/src/expand.rs +84 -11
  19. {shellsim-0.1.25 → shellsim-0.1.27}/src/interp.rs +150 -71
  20. {shellsim-0.1.25 → shellsim-0.1.27}/src/lib.rs +6 -0
  21. {shellsim-0.1.25 → shellsim-0.1.27}/src/main.rs +3 -1
  22. shellsim-0.1.27/src/python/attributes.rs +465 -0
  23. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/bytecode.rs +4 -0
  24. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/compiler.rs +111 -16
  25. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/complex.rs +111 -95
  26. shellsim-0.1.27/src/python/definitions.rs +84 -0
  27. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/exception_types.rs +22 -0
  28. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/filesystem.rs +93 -36
  29. shellsim-0.1.27/src/python/heap/gc.rs +482 -0
  30. shellsim-0.1.27/src/python/heap/mapping.rs +427 -0
  31. shellsim-0.1.27/src/python/heap/mod.rs +1353 -0
  32. shellsim-0.1.27/src/python/heap/snapshot.rs +304 -0
  33. shellsim-0.1.27/src/python/heap/stack.rs +99 -0
  34. shellsim-0.1.27/src/python/heap/tests.rs +305 -0
  35. shellsim-0.1.27/src/python/heap/value.rs +512 -0
  36. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/http.rs +2 -2
  37. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/lexer.rs +11 -7
  38. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/mod.rs +102 -319
  39. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/native.rs +648 -438
  40. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/number.rs +452 -327
  41. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/object_model.rs +190 -58
  42. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/parser.rs +129 -7
  43. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/process.rs +33 -31
  44. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/protocol.rs +422 -266
  45. shellsim-0.1.27/src/python/scopes.rs +259 -0
  46. shellsim-0.1.27/src/python/sort.rs +83 -0
  47. shellsim-0.1.27/src/python/source.rs +48 -0
  48. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/argparse.rs +119 -62
  49. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/asyncio.rs +27 -16
  50. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/base64.rs +12 -12
  51. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/collections.rs +1 -1
  52. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/core.rs +2041 -1035
  53. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/dataclasses.rs +2 -2
  54. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/enum.rs +1 -1
  55. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/frozen.rs +17 -1
  56. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/functools.rs +19 -9
  57. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/hashlib.rs +1 -1
  58. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/heapq.rs +11 -8
  59. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/http.rs +1 -1
  60. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/importlib.rs +3 -3
  61. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/introspect.rs +25 -7
  62. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/itertools.rs +85 -50
  63. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/json.rs +37 -26
  64. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/mapping_views.rs +200 -152
  65. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/math.rs +697 -76
  66. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/mod.rs +10 -8
  67. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/args.rs +45 -36
  68. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/array.rs +95 -83
  69. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/construct.rs +136 -64
  70. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/convert.rs +115 -88
  71. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/dtype.rs +6 -6
  72. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/dtype_object.rs +50 -41
  73. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/errstate.rs +13 -9
  74. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/index.rs +71 -63
  75. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/io.rs +12 -4
  76. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/layout.rs +25 -21
  77. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/linalg/dense.rs +21 -13
  78. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/linalg.rs +65 -45
  79. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/math.rs +27 -17
  80. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/mod.rs +10 -7
  81. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/ndarray.rs +212 -145
  82. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/products.rs +62 -49
  83. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/random.rs +70 -36
  84. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/reduce.rs +183 -111
  85. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/scalar.rs +105 -60
  86. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/select.rs +41 -32
  87. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/shape/broadcast.rs +8 -5
  88. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/shape/diagonal.rs +13 -10
  89. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/shape/join.rs +21 -12
  90. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/shape/repeat.rs +16 -13
  91. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/shape.rs +101 -43
  92. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/sort/bincount.rs +15 -8
  93. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/sort/search.rs +25 -22
  94. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/sort.rs +122 -99
  95. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/ufunc/masked.rs +8 -8
  96. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/ufunc.rs +227 -191
  97. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/operator.rs +1 -1
  98. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/os.rs +12 -8
  99. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/pytest.rs +6 -6
  100. shellsim-0.1.27/src/python/stdlib/re.rs +1400 -0
  101. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/scipy/special/meter.rs +3 -3
  102. shellsim-0.1.27/src/python/stdlib/source/_exceptions.py +90 -0
  103. shellsim-0.1.27/src/python/stdlib/source/_io.py +1331 -0
  104. shellsim-0.1.27/src/python/stdlib/source/_iteration.py +45 -0
  105. shellsim-0.1.27/src/python/stdlib/source/abc.py +211 -0
  106. shellsim-0.1.27/src/python/stdlib/source/bisect.py +47 -0
  107. shellsim-0.1.27/src/python/stdlib/source/cmath.py +183 -0
  108. shellsim-0.1.27/src/python/stdlib/source/codecs.py +716 -0
  109. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/collections.py +3 -0
  110. shellsim-0.1.27/src/python/stdlib/source/collections_abc.py +761 -0
  111. shellsim-0.1.27/src/python/stdlib/source/contextlib.py +502 -0
  112. shellsim-0.1.27/src/python/stdlib/source/copy.py +213 -0
  113. shellsim-0.1.27/src/python/stdlib/source/datetime.py +1858 -0
  114. shellsim-0.1.27/src/python/stdlib/source/errno.py +98 -0
  115. shellsim-0.1.27/src/python/stdlib/source/fnmatch.py +80 -0
  116. shellsim-0.1.27/src/python/stdlib/source/functools.py +577 -0
  117. shellsim-0.1.27/src/python/stdlib/source/hashlib.py +79 -0
  118. shellsim-0.1.27/src/python/stdlib/source/heapq.py +163 -0
  119. shellsim-0.1.27/src/python/stdlib/source/inspect.py +960 -0
  120. shellsim-0.1.27/src/python/stdlib/source/io.py +16 -0
  121. shellsim-0.1.27/src/python/stdlib/source/itertools.py +250 -0
  122. shellsim-0.1.27/src/python/stdlib/source/json.py +492 -0
  123. shellsim-0.1.27/src/python/stdlib/source/os.py +1013 -0
  124. shellsim-0.1.27/src/python/stdlib/source/pathlib.py +631 -0
  125. shellsim-0.1.27/src/python/stdlib/source/posixpath.py +312 -0
  126. shellsim-0.1.27/src/python/stdlib/source/random.py +422 -0
  127. shellsim-0.1.27/src/python/stdlib/source/re.py +148 -0
  128. shellsim-0.1.27/src/python/stdlib/source/shutil.py +549 -0
  129. shellsim-0.1.27/src/python/stdlib/source/stat.py +169 -0
  130. shellsim-0.1.27/src/python/stdlib/source/string.py +272 -0
  131. shellsim-0.1.27/src/python/stdlib/source/struct.py +86 -0
  132. shellsim-0.1.27/src/python/stdlib/source/sys.py +448 -0
  133. shellsim-0.1.27/src/python/stdlib/source/textwrap.py +238 -0
  134. shellsim-0.1.27/src/python/stdlib/source/time.py +425 -0
  135. shellsim-0.1.27/src/python/stdlib/source/types.py +210 -0
  136. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/urllib.py +1 -0
  137. shellsim-0.1.27/src/python/stdlib/source/urllib_parse.py +460 -0
  138. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/zipfile.py +9 -1
  139. shellsim-0.1.27/src/python/stdlib/source/zlib.py +177 -0
  140. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/string.rs +1 -1
  141. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/struct.rs +28 -25
  142. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/subprocess.rs +41 -25
  143. shellsim-0.1.27/src/python/stdlib/sys.rs +521 -0
  144. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/time.rs +9 -9
  145. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/typing.rs +7 -7
  146. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/unittest.rs +42 -14
  147. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/vfs.rs +120 -22
  148. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/warnings.rs +1 -1
  149. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/zlib.rs +3 -3
  150. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/string.rs +10 -9
  151. shellsim-0.1.27/src/python/symbols.rs +75 -0
  152. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/calls.rs +670 -486
  153. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/dispatch.rs +241 -172
  154. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/equality.rs +107 -54
  155. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/format.rs +7 -0
  156. shellsim-0.1.27/src/python/vm/handles.rs +387 -0
  157. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/hashing.rs +58 -61
  158. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/host.rs +16 -16
  159. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/iteration.rs +410 -329
  160. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/mappings.rs +24 -11
  161. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/namespace.rs +390 -330
  162. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/native_runtime.rs +1252 -901
  163. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/objects.rs +1298 -898
  164. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/operations.rs +250 -156
  165. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm/summation.rs +15 -18
  166. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/vm.rs +853 -313
  167. {shellsim-0.1.25 → shellsim-0.1.27}/src/resources.rs +17 -3
  168. {shellsim-0.1.25 → shellsim-0.1.27}/src/sandbox.rs +3 -0
  169. {shellsim-0.1.25 → shellsim-0.1.27}/src/shell.rs +63 -13
  170. shellsim-0.1.27/src/stack.rs +132 -0
  171. {shellsim-0.1.25 → shellsim-0.1.27}/src/telemetry.rs +72 -16
  172. shellsim-0.1.27/src/variables.rs +351 -0
  173. {shellsim-0.1.25 → shellsim-0.1.27}/src/vfs.rs +193 -65
  174. shellsim-0.1.25/src/commands/printf.rs +0 -152
  175. shellsim-0.1.25/src/python/heap.rs +0 -2145
  176. shellsim-0.1.25/src/python/mapping.rs +0 -206
  177. shellsim-0.1.25/src/python/source.rs +0 -29
  178. shellsim-0.1.25/src/python/stdlib/bisect.rs +0 -272
  179. shellsim-0.1.25/src/python/stdlib/re.rs +0 -602
  180. shellsim-0.1.25/src/python/stdlib/source/abc.py +0 -12
  181. shellsim-0.1.25/src/python/stdlib/source/cmath.py +0 -65
  182. shellsim-0.1.25/src/python/stdlib/source/codecs.py +0 -27
  183. shellsim-0.1.25/src/python/stdlib/source/contextlib.py +0 -173
  184. shellsim-0.1.25/src/python/stdlib/source/copy.py +0 -29
  185. shellsim-0.1.25/src/python/stdlib/source/datetime.py +0 -236
  186. shellsim-0.1.25/src/python/stdlib/source/functools.py +0 -16
  187. shellsim-0.1.25/src/python/stdlib/source/hashlib.py +0 -34
  188. shellsim-0.1.25/src/python/stdlib/source/inspect.py +0 -190
  189. shellsim-0.1.25/src/python/stdlib/source/io.py +0 -299
  190. shellsim-0.1.25/src/python/stdlib/source/json.py +0 -25
  191. shellsim-0.1.25/src/python/stdlib/source/os.py +0 -181
  192. shellsim-0.1.25/src/python/stdlib/source/pathlib.py +0 -205
  193. shellsim-0.1.25/src/python/stdlib/source/random.py +0 -183
  194. shellsim-0.1.25/src/python/stdlib/source/shutil.py +0 -57
  195. shellsim-0.1.25/src/python/stdlib/source/struct.py +0 -6
  196. shellsim-0.1.25/src/python/stdlib/source/textwrap.py +0 -73
  197. shellsim-0.1.25/src/python/stdlib/source/zlib.py +0 -3
  198. shellsim-0.1.25/src/python/stdlib/sys.rs +0 -273
  199. {shellsim-0.1.25 → shellsim-0.1.27}/LICENSE +0 -0
  200. {shellsim-0.1.25 → shellsim-0.1.27}/README.md +0 -0
  201. {shellsim-0.1.25 → shellsim-0.1.27}/python/native/src/lib.rs +0 -0
  202. {shellsim-0.1.25 → shellsim-0.1.27}/python/shellsim/__init__.py +0 -0
  203. {shellsim-0.1.25 → shellsim-0.1.27}/python/shellsim/__main__.py +0 -0
  204. {shellsim-0.1.25 → shellsim-0.1.27}/python/shellsim/_api.py +0 -0
  205. {shellsim-0.1.25 → shellsim-0.1.27}/python/shellsim/_cli.py +0 -0
  206. {shellsim-0.1.25 → shellsim-0.1.27}/python/shellsim/display_host.py +0 -0
  207. {shellsim-0.1.25 → shellsim-0.1.27}/python/shellsim/package.py +0 -0
  208. {shellsim-0.1.25 → shellsim-0.1.27}/python/shellsim/py.typed +0 -0
  209. {shellsim-0.1.25 → shellsim-0.1.27}/python/shellsim/python.py +0 -0
  210. {shellsim-0.1.25 → shellsim-0.1.27}/rust-toolchain.toml +0 -0
  211. {shellsim-0.1.25 → shellsim-0.1.27}/src/arith.rs +0 -0
  212. {shellsim-0.1.25 → shellsim-0.1.27}/src/clock.rs +0 -0
  213. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/archives.rs +0 -0
  214. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/arcmd.rs +0 -0
  215. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/awk/ast.rs +0 -0
  216. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/awk/lexer.rs +0 -0
  217. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/awk.rs +0 -0
  218. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/bc.rs +0 -0
  219. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/dd.rs +0 -0
  220. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/diff.rs +0 -0
  221. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/echo.rs +0 -0
  222. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/format.rs +0 -0
  223. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/fs.rs +0 -0
  224. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/apply.rs +0 -0
  225. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/commit.rs +0 -0
  226. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/compare.rs +0 -0
  227. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/config.rs +0 -0
  228. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/conflict.rs +0 -0
  229. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/diff.rs +0 -0
  230. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/ignore.rs +0 -0
  231. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/import.rs +0 -0
  232. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/log.rs +0 -0
  233. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/merge.rs +0 -0
  234. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/mod.rs +0 -0
  235. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/plumbing.rs +0 -0
  236. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/rebase.rs +0 -0
  237. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/refs.rs +0 -0
  238. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/repo.rs +0 -0
  239. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/stash.rs +0 -0
  240. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/switch.rs +0 -0
  241. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/git/worktree.rs +0 -0
  242. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/grep.rs +0 -0
  243. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/hashing.rs +0 -0
  244. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/makecmd.rs +0 -0
  245. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/net.rs +0 -0
  246. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/options.rs +0 -0
  247. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/patch.rs +0 -0
  248. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/pkg.rs +0 -0
  249. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/proc.rs +0 -0
  250. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/regex_compat.rs +0 -0
  251. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/rgcmd.rs +0 -0
  252. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/sed.rs +0 -0
  253. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/sort.rs +0 -0
  254. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/streams.rs +0 -0
  255. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/system.rs +0 -0
  256. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/tarcmd.rs +0 -0
  257. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/unavailable.rs +0 -0
  258. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/util.rs +0 -0
  259. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/xargs.rs +0 -0
  260. {shellsim-0.1.25 → shellsim-0.1.27}/src/commands/zipcmd.rs +0 -0
  261. {shellsim-0.1.25 → shellsim-0.1.27}/src/corpus.rs +0 -0
  262. {shellsim-0.1.25 → shellsim-0.1.27}/src/descriptors.rs +0 -0
  263. {shellsim-0.1.25 → shellsim-0.1.27}/src/display.rs +0 -0
  264. {shellsim-0.1.25 → shellsim-0.1.27}/src/harness.rs +0 -0
  265. {shellsim-0.1.25 → shellsim-0.1.27}/src/harness_manager.rs +0 -0
  266. {shellsim-0.1.25 → shellsim-0.1.27}/src/hashes.rs +0 -0
  267. {shellsim-0.1.25 → shellsim-0.1.27}/src/host_ingest.rs +0 -0
  268. {shellsim-0.1.25 → shellsim-0.1.27}/src/jqcmd.rs +0 -0
  269. {shellsim-0.1.25 → shellsim-0.1.27}/src/mcp.rs +0 -0
  270. {shellsim-0.1.25 → shellsim-0.1.27}/src/net.rs +0 -0
  271. {shellsim-0.1.25 → shellsim-0.1.27}/src/netcmd.rs +0 -0
  272. {shellsim-0.1.25 → shellsim-0.1.27}/src/process.rs +0 -0
  273. {shellsim-0.1.25 → shellsim-0.1.27}/src/profile.rs +0 -0
  274. {shellsim-0.1.25 → shellsim-0.1.27}/src/program/cat.rs +0 -0
  275. {shellsim-0.1.25 → shellsim-0.1.27}/src/program/env.rs +0 -0
  276. {shellsim-0.1.25 → shellsim-0.1.27}/src/program/find.rs +0 -0
  277. {shellsim-0.1.25 → shellsim-0.1.27}/src/program/head.rs +0 -0
  278. {shellsim-0.1.25 → shellsim-0.1.27}/src/program/make.rs +0 -0
  279. {shellsim-0.1.25 → shellsim-0.1.27}/src/program/nice.rs +0 -0
  280. {shellsim-0.1.25 → shellsim-0.1.27}/src/program/nohup.rs +0 -0
  281. {shellsim-0.1.25 → shellsim-0.1.27}/src/program/sleep.rs +0 -0
  282. {shellsim-0.1.25 → shellsim-0.1.27}/src/program/tee.rs +0 -0
  283. {shellsim-0.1.25 → shellsim-0.1.27}/src/program/timeout.rs +0 -0
  284. {shellsim-0.1.25 → shellsim-0.1.27}/src/program/xargs.rs +0 -0
  285. {shellsim-0.1.25 → shellsim-0.1.27}/src/program.rs +0 -0
  286. {shellsim-0.1.25 → shellsim-0.1.27}/src/pseudo_fs.rs +0 -0
  287. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/ast.rs +0 -0
  288. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/cpython_names.rs +0 -0
  289. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/float_text.rs +0 -0
  290. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/hash.rs +0 -0
  291. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/slice.rs +0 -0
  292. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/element.rs +0 -0
  293. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/format.rs +0 -0
  294. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/ops.rs +0 -0
  295. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/random/bitgen.rs +0 -0
  296. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/random/discrete.rs +0 -0
  297. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/random/gamma.rs +0 -0
  298. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/random/integers.rs +0 -0
  299. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/random/normal.rs +0 -0
  300. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/random/sequence.rs +0 -0
  301. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/numpy/underflow.rs +0 -0
  302. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/scipy/mod.rs +0 -0
  303. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/scipy/special/erf.rs +0 -0
  304. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/scipy/special/gamma.rs +0 -0
  305. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/scipy/special/ibeta.rs +0 -0
  306. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/scipy/special/igam.rs +0 -0
  307. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/scipy/special/mod.rs +0 -0
  308. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/scipy/special/zeta.rs +0 -0
  309. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/asyncio.py +0 -0
  310. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/base64.py +0 -0
  311. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/csv.py +0 -0
  312. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/fractions.py +0 -0
  313. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/glob.py +0 -0
  314. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/http.py +0 -0
  315. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/http_client.py +0 -0
  316. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/importlib.py +0 -0
  317. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/keyword.py +0 -0
  318. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/logging.py +0 -0
  319. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/__init__.py +0 -0
  320. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/_creation.py +0 -0
  321. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/_errors.py +0 -0
  322. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/_io.py +0 -0
  323. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/_math.py +0 -0
  324. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/_printing.py +0 -0
  325. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/_products.py +0 -0
  326. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/_sets.py +0 -0
  327. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/_shapes.py +0 -0
  328. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/_stats.py +0 -0
  329. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/exceptions.py +0 -0
  330. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/fft.py +0 -0
  331. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/linalg.py +0 -0
  332. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/random.py +0 -0
  333. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/numpy/testing.py +0 -0
  334. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/operator.py +0 -0
  335. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/pytest.py +0 -0
  336. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/scipy/__init__.py +0 -0
  337. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/scipy/integrate.py +0 -0
  338. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/scipy/interpolate.py +0 -0
  339. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/scipy/linalg.py +0 -0
  340. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/scipy/optimize.py +0 -0
  341. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/scipy/spatial/__init__.py +0 -0
  342. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/scipy/spatial/distance.py +0 -0
  343. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/scipy/special.py +0 -0
  344. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/scipy/stats/__init__.py +0 -0
  345. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/scipy/stats/_describe.py +0 -0
  346. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/scipy/stats/_distributions.py +0 -0
  347. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/scipy/stats/_tests.py +0 -0
  348. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/signal.py +0 -0
  349. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/statistics.py +0 -0
  350. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/subprocess.py +0 -0
  351. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/tempfile.py +0 -0
  352. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/urllib_error.py +0 -0
  353. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/urllib_request.py +0 -0
  354. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/uuid.py +0 -0
  355. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/stdlib/source/warnings.py +0 -0
  356. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/token.rs +0 -0
  357. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/unicode/tables.rs +0 -0
  358. {shellsim-0.1.25 → shellsim-0.1.27}/src/python/unicode.rs +0 -0
  359. {shellsim-0.1.25 → shellsim-0.1.27}/src/realtime.rs +0 -0
  360. {shellsim-0.1.25 → shellsim-0.1.27}/src/scenario.rs +0 -0
  361. {shellsim-0.1.25 → shellsim-0.1.27}/src/scheduler.rs +0 -0
  362. {shellsim-0.1.25 → shellsim-0.1.27}/src/syscalls.rs +0 -0
@@ -38,6 +38,15 @@ version = "1.0.104"
38
38
  source = "registry+https://github.com/rust-lang/crates.io-index"
39
39
  checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
40
40
 
41
+ [[package]]
42
+ name = "ar_archive_writer"
43
+ version = "0.5.3"
44
+ source = "registry+https://github.com/rust-lang/crates.io-index"
45
+ checksum = "73cd58deff2140a0a8eae87e417bd01db68a33e148aa93d1e8cd837e55e312b6"
46
+ dependencies = [
47
+ "object 0.39.1",
48
+ ]
49
+
41
50
  [[package]]
42
51
  name = "arbitrary"
43
52
  version = "1.4.2"
@@ -619,6 +628,15 @@ dependencies = [
619
628
  "autocfg",
620
629
  ]
621
630
 
631
+ [[package]]
632
+ name = "object"
633
+ version = "0.39.1"
634
+ source = "registry+https://github.com/rust-lang/crates.io-index"
635
+ checksum = "2e5a6c098c7a3b6547378093f5cc30bc54fd361ce711e05293a5cc589562739b"
636
+ dependencies = [
637
+ "memchr",
638
+ ]
639
+
622
640
  [[package]]
623
641
  name = "object"
624
642
  version = "0.40.0"
@@ -664,6 +682,16 @@ dependencies = [
664
682
  "unicode-ident",
665
683
  ]
666
684
 
685
+ [[package]]
686
+ name = "psm"
687
+ version = "0.1.32"
688
+ source = "registry+https://github.com/rust-lang/crates.io-index"
689
+ checksum = "4dcd034599e63b970727f70d79e02d62390a4a84f7c6b827c27c46d5ac3fa622"
690
+ dependencies = [
691
+ "ar_archive_writer",
692
+ "cc",
693
+ ]
694
+
667
695
  [[package]]
668
696
  name = "pulley-interpreter"
669
697
  version = "49.0.0"
@@ -861,7 +889,7 @@ dependencies = [
861
889
 
862
890
  [[package]]
863
891
  name = "shellsim"
864
- version = "0.1.25"
892
+ version = "0.1.27"
865
893
  dependencies = [
866
894
  "base64",
867
895
  "crc32fast",
@@ -879,6 +907,7 @@ dependencies = [
879
907
  "serde_json",
880
908
  "sha1",
881
909
  "sha2",
910
+ "stacker",
882
911
  "toml",
883
912
  "wasmtime",
884
913
  "wat",
@@ -917,6 +946,19 @@ version = "1.2.1"
917
946
  source = "registry+https://github.com/rust-lang/crates.io-index"
918
947
  checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
919
948
 
949
+ [[package]]
950
+ name = "stacker"
951
+ version = "0.1.25"
952
+ source = "registry+https://github.com/rust-lang/crates.io-index"
953
+ checksum = "707f49d46706bacf8a2b00d51dace3f9de527c13eec3778f570c411f89e69967"
954
+ dependencies = [
955
+ "cc",
956
+ "cfg-if",
957
+ "libc",
958
+ "psm",
959
+ "windows-sys",
960
+ ]
961
+
920
962
  [[package]]
921
963
  name = "syn"
922
964
  version = "2.0.118"
@@ -1122,7 +1164,7 @@ dependencies = [
1122
1164
  "log",
1123
1165
  "mach2",
1124
1166
  "memfd",
1125
- "object",
1167
+ "object 0.40.0",
1126
1168
  "once_cell",
1127
1169
  "postcard",
1128
1170
  "pulley-interpreter",
@@ -1159,7 +1201,7 @@ dependencies = [
1159
1201
  "hashbrown 0.17.1",
1160
1202
  "indexmap",
1161
1203
  "log",
1162
- "object",
1204
+ "object 0.40.0",
1163
1205
  "postcard",
1164
1206
  "rustc-demangle",
1165
1207
  "semver",
@@ -1221,7 +1263,7 @@ dependencies = [
1221
1263
  "gimli",
1222
1264
  "itertools",
1223
1265
  "log",
1224
- "object",
1266
+ "object 0.40.0",
1225
1267
  "pulley-interpreter",
1226
1268
  "smallvec",
1227
1269
  "target-lexicon",
@@ -1276,7 +1318,7 @@ checksum = "5978e43aa5e9a3a03ebea8a4d4a015c92144268167abb27d99ab1b53224b28ae"
1276
1318
  dependencies = [
1277
1319
  "cranelift-codegen",
1278
1320
  "log",
1279
- "object",
1321
+ "object 0.40.0",
1280
1322
  "wasmtime-environ",
1281
1323
  ]
1282
1324
 
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "shellsim"
3
- version = "0.1.25"
3
+ version = "0.1.27"
4
4
  edition = "2021"
5
5
  description = "In-process BusyBox-like environment for RL rollouts and agent tests"
6
6
  license = "Apache-2.0"
@@ -44,6 +44,7 @@ wasmtime = { version = "49.0.0", default-features = false, features = ["runtime"
44
44
  num-bigint = "0.4"
45
45
  num-traits = "0.2"
46
46
  libm = "0.2"
47
+ stacker = "0.1"
47
48
 
48
49
  # Process-level syscall sandbox (Linux only): a startup seccomp filter that denies
49
50
  # network/exec/fork so no Python-level trick can reach the real OS for those. shellsim
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shellsim
3
- Version: 0.1.25
3
+ Version: 0.1.27
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Operating System :: MacOS :: MacOS X
6
6
  Classifier: Operating System :: Microsoft :: Windows
@@ -10,7 +10,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
10
10
  Classifier: Programming Language :: Rust
11
11
  Classifier: Topic :: Software Development :: Testing
12
12
  Classifier: Typing :: Typed
13
- Requires-Dist: shellsim-c-toolchain==0.1.25 ; extra == 'c'
13
+ Requires-Dist: shellsim-c-toolchain==0.1.27 ; extra == 'c'
14
14
  Provides-Extra: c
15
15
  License-File: LICENSE
16
16
  Summary: In-process BusyBox-like environment for RL rollouts and agent tests
@@ -25,7 +25,7 @@ classifiers = [
25
25
  keywords = ["agents", "containers", "reinforcement-learning", "sandbox", "simulation", "testing"]
26
26
 
27
27
  [project.optional-dependencies]
28
- c = ["shellsim-c-toolchain==0.1.25"]
28
+ c = ["shellsim-c-toolchain==0.1.27"]
29
29
 
30
30
  [project.urls]
31
31
  Homepage = "https://github.com/rjpower/shellsim"
@@ -38,6 +38,15 @@ version = "1.0.104"
38
38
  source = "registry+https://github.com/rust-lang/crates.io-index"
39
39
  checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
40
40
 
41
+ [[package]]
42
+ name = "ar_archive_writer"
43
+ version = "0.5.3"
44
+ source = "registry+https://github.com/rust-lang/crates.io-index"
45
+ checksum = "73cd58deff2140a0a8eae87e417bd01db68a33e148aa93d1e8cd837e55e312b6"
46
+ dependencies = [
47
+ "object 0.39.1",
48
+ ]
49
+
41
50
  [[package]]
42
51
  name = "arbitrary"
43
52
  version = "1.4.2"
@@ -619,6 +628,15 @@ dependencies = [
619
628
  "autocfg",
620
629
  ]
621
630
 
631
+ [[package]]
632
+ name = "object"
633
+ version = "0.39.1"
634
+ source = "registry+https://github.com/rust-lang/crates.io-index"
635
+ checksum = "2e5a6c098c7a3b6547378093f5cc30bc54fd361ce711e05293a5cc589562739b"
636
+ dependencies = [
637
+ "memchr",
638
+ ]
639
+
622
640
  [[package]]
623
641
  name = "object"
624
642
  version = "0.40.0"
@@ -670,6 +688,16 @@ dependencies = [
670
688
  "unicode-ident",
671
689
  ]
672
690
 
691
+ [[package]]
692
+ name = "psm"
693
+ version = "0.1.32"
694
+ source = "registry+https://github.com/rust-lang/crates.io-index"
695
+ checksum = "4dcd034599e63b970727f70d79e02d62390a4a84f7c6b827c27c46d5ac3fa622"
696
+ dependencies = [
697
+ "ar_archive_writer",
698
+ "cc",
699
+ ]
700
+
673
701
  [[package]]
674
702
  name = "pulley-interpreter"
675
703
  version = "49.0.0"
@@ -925,7 +953,7 @@ dependencies = [
925
953
 
926
954
  [[package]]
927
955
  name = "shellsim"
928
- version = "0.1.25"
956
+ version = "0.1.27"
929
957
  dependencies = [
930
958
  "base64",
931
959
  "crc32fast",
@@ -943,13 +971,14 @@ dependencies = [
943
971
  "serde_json",
944
972
  "sha1",
945
973
  "sha2",
974
+ "stacker",
946
975
  "toml",
947
976
  "wasmtime",
948
977
  ]
949
978
 
950
979
  [[package]]
951
980
  name = "shellsim-python-bindings"
952
- version = "0.1.25"
981
+ version = "0.1.27"
953
982
  dependencies = [
954
983
  "base64",
955
984
  "pyo3",
@@ -991,6 +1020,19 @@ version = "1.2.1"
991
1020
  source = "registry+https://github.com/rust-lang/crates.io-index"
992
1021
  checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
993
1022
 
1023
+ [[package]]
1024
+ name = "stacker"
1025
+ version = "0.1.25"
1026
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1027
+ checksum = "707f49d46706bacf8a2b00d51dace3f9de527c13eec3778f570c411f89e69967"
1028
+ dependencies = [
1029
+ "cc",
1030
+ "cfg-if",
1031
+ "libc",
1032
+ "psm",
1033
+ "windows-sys",
1034
+ ]
1035
+
994
1036
  [[package]]
995
1037
  name = "syn"
996
1038
  version = "2.0.119"
@@ -1169,7 +1211,7 @@ dependencies = [
1169
1211
  "log",
1170
1212
  "mach2",
1171
1213
  "memfd",
1172
- "object",
1214
+ "object 0.40.0",
1173
1215
  "once_cell",
1174
1216
  "postcard",
1175
1217
  "pulley-interpreter",
@@ -1206,7 +1248,7 @@ dependencies = [
1206
1248
  "hashbrown 0.17.1",
1207
1249
  "indexmap",
1208
1250
  "log",
1209
- "object",
1251
+ "object 0.40.0",
1210
1252
  "postcard",
1211
1253
  "rustc-demangle",
1212
1254
  "semver",
@@ -1268,7 +1310,7 @@ dependencies = [
1268
1310
  "gimli",
1269
1311
  "itertools",
1270
1312
  "log",
1271
- "object",
1313
+ "object 0.40.0",
1272
1314
  "pulley-interpreter",
1273
1315
  "smallvec",
1274
1316
  "target-lexicon",
@@ -1323,7 +1365,7 @@ checksum = "5978e43aa5e9a3a03ebea8a4d4a015c92144268167abb27d99ab1b53224b28ae"
1323
1365
  dependencies = [
1324
1366
  "cranelift-codegen",
1325
1367
  "log",
1326
- "object",
1368
+ "object 0.40.0",
1327
1369
  "wasmtime-environ",
1328
1370
  ]
1329
1371
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  [package]
4
4
  name = "shellsim-python-bindings"
5
- version = "0.1.25"
5
+ version = "0.1.27"
6
6
  edition = "2021"
7
7
  description = "Python bindings for shellsim"
8
8
  license = "Apache-2.0"
@@ -3,6 +3,8 @@
3
3
  //! Host filesystem access ends at project ingestion. The selected tree is copied into a fresh
4
4
  //! VFS before Python starts, and simulated code receives no path back to the host.
5
5
 
6
+ #![forbid(unsafe_code)]
7
+
6
8
  use std::fs;
7
9
  use std::io::{IsTerminal, Read, Write};
8
10
  use std::path::{Path, PathBuf};
@@ -95,6 +95,11 @@ pub(super) fn validate(program: &Program) -> Result<(), String> {
95
95
  }
96
96
 
97
97
  fn validate_stmt(statement: &Stmt) -> Result<(), String> {
98
+ // The parser bounds tree depth; growth keeps that depth safe on small host stacks.
99
+ crate::stack::grow(|| validate_stmt_inner(statement))
100
+ }
101
+
102
+ fn validate_stmt_inner(statement: &Stmt) -> Result<(), String> {
98
103
  match statement {
99
104
  Stmt::Block(statements) => {
100
105
  for statement in statements {
@@ -167,6 +172,11 @@ fn validate_lvalue(target: &LValue) -> Result<(), String> {
167
172
  }
168
173
 
169
174
  fn validate_expr(expression: &Expr) -> Result<(), String> {
175
+ // The parser bounds tree depth; growth keeps that depth safe on small host stacks.
176
+ crate::stack::grow(|| validate_expr_inner(expression))
177
+ }
178
+
179
+ fn validate_expr_inner(expression: &Expr) -> Result<(), String> {
170
180
  match expression {
171
181
  Expr::Regex(pattern) => regex::Regex::new(pattern)
172
182
  .map(|_| ())
@@ -230,6 +240,8 @@ pub(super) fn execute(
230
240
  io,
231
241
  state,
232
242
  literal_regexes: HashMap::new(),
243
+ state_reserved: 0,
244
+ fields_reserved: 0,
233
245
  };
234
246
 
235
247
  let mut requested_exit = match runtime.phase(program, Phase::Begin) {
@@ -273,9 +285,62 @@ struct Runtime<'a, 'io> {
273
285
  io: &'a mut Io<'io>,
274
286
  state: State,
275
287
  literal_regexes: HashMap<String, regex::Regex>,
288
+ /// Machine memory reserved for variables and array elements assigned by the program.
289
+ state_reserved: u64,
290
+ /// The part of `state_reserved` held by the current record's fields.
291
+ fields_reserved: u64,
292
+ }
293
+
294
+ impl Drop for Runtime<'_, '_> {
295
+ fn drop(&mut self) {
296
+ self.system.release_memory(self.state_reserved);
297
+ }
298
+ }
299
+
300
+ /// Modeled bookkeeping cost of one stored variable or array element beyond its text.
301
+ const SLOT_OVERHEAD: u64 = 64;
302
+ /// Modeled bytes of one split field beyond its text.
303
+ const FIELD_OVERHEAD: u64 = 32;
304
+
305
+ /// Modeled bytes of one variable or array element stored under `key`.
306
+ fn slot_bytes(key: &str, value: &Scalar) -> u64 {
307
+ (key.len() as u64)
308
+ .saturating_add(value.text.len() as u64)
309
+ .saturating_add(SLOT_OVERHEAD)
276
310
  }
277
311
 
278
312
  impl Runtime<'_, '_> {
313
+ /// Reserve growth, or release shrinkage, of program state before the change is stored.
314
+ fn resize_state(&mut self, old: u64, new: u64) -> Result<(), Flow> {
315
+ if new > old {
316
+ if !self.system.reserve_memory(new - old) {
317
+ return Err(Flow::Exhausted);
318
+ }
319
+ self.state_reserved = self.state_reserved.saturating_add(new - old);
320
+ } else {
321
+ self.system.release_memory(old - new);
322
+ self.state_reserved = self.state_reserved.saturating_sub(old - new);
323
+ }
324
+ Ok(())
325
+ }
326
+
327
+ /// Store one array element, charging its size first.
328
+ fn store_element(&mut self, name: &str, key: String, value: Scalar) -> Result<(), Flow> {
329
+ let old = self
330
+ .state
331
+ .arrays
332
+ .get(name)
333
+ .and_then(|array| array.get(&key))
334
+ .map_or(0, |old| slot_bytes(&key, old));
335
+ self.resize_state(old, slot_bytes(&key, &value))?;
336
+ self.state
337
+ .arrays
338
+ .entry(name.to_string())
339
+ .or_default()
340
+ .insert(key, value);
341
+ Ok(())
342
+ }
343
+
279
344
  fn phase(&mut self, program: &Program, phase: Phase) -> Flow {
280
345
  for rule in &program.rules {
281
346
  let selected = match (&rule.pattern, phase) {
@@ -309,6 +374,10 @@ impl Runtime<'_, '_> {
309
374
  }
310
375
 
311
376
  fn statement(&mut self, statement: &Stmt) -> Flow {
377
+ crate::stack::grow(|| self.statement_inner(statement))
378
+ }
379
+
380
+ fn statement_inner(&mut self, statement: &Stmt) -> Flow {
312
381
  if !self.system.charge_cpu(1) {
313
382
  return Flow::Exhausted;
314
383
  }
@@ -392,8 +461,13 @@ impl Runtime<'_, '_> {
392
461
  Stmt::Continue => Flow::Continue,
393
462
  Stmt::Delete(target) => match self.array_target(target) {
394
463
  Ok((name, key)) => {
395
- if let Some(array) = self.state.arrays.get_mut(&name) {
396
- array.remove(&key);
464
+ let removed = self
465
+ .state
466
+ .arrays
467
+ .get_mut(&name)
468
+ .and_then(|array| array.remove(&key));
469
+ if let Some(removed) = removed {
470
+ let _ = self.resize_state(slot_bytes(&key, &removed), 0);
397
471
  }
398
472
  Flow::Normal
399
473
  }
@@ -457,6 +531,10 @@ impl Runtime<'_, '_> {
457
531
  }
458
532
 
459
533
  fn expr(&mut self, expression: &Expr) -> Result<Scalar, Flow> {
534
+ crate::stack::grow(|| self.expr_inner(expression))
535
+ }
536
+
537
+ fn expr_inner(&mut self, expression: &Expr) -> Result<Scalar, Flow> {
460
538
  if !self.system.charge_cpu(1) {
461
539
  return Err(Flow::Exhausted);
462
540
  }
@@ -740,13 +818,27 @@ impl Runtime<'_, '_> {
740
818
  } else {
741
819
  self.state.fs.clone()
742
820
  };
743
- let values = split_fields(&input, &separator)?;
744
- let array = self.state.arrays.entry(array_name.clone()).or_default();
745
- array.clear();
746
- for (index, value) in values.iter().enumerate() {
747
- array.insert((index + 1).to_string(), Scalar::string(value.clone()));
748
- }
749
- Ok(Scalar::number(values.len() as f64))
821
+ let released = self
822
+ .state
823
+ .arrays
824
+ .remove(array_name.as_str())
825
+ .map_or(0, |array| {
826
+ array.iter().fold(0_u64, |total, (key, value)| {
827
+ total.saturating_add(slot_bytes(key, value))
828
+ })
829
+ });
830
+ self.resize_state(released, 0)?;
831
+ self.state.arrays.insert(array_name.clone(), HashMap::new());
832
+ let mut count = 0_usize;
833
+ for_each_field(&input, &separator, |field| {
834
+ count += 1;
835
+ self.store_element(
836
+ array_name,
837
+ count.to_string(),
838
+ Scalar::string(field.to_string()),
839
+ )
840
+ })?;
841
+ Ok(Scalar::number(count as f64))
750
842
  }
751
843
 
752
844
  fn substitute(&mut self, args: &[Expr], global: bool) -> Result<Scalar, Flow> {
@@ -851,6 +943,12 @@ impl Runtime<'_, '_> {
851
943
  )))
852
944
  }
853
945
  _ => {
946
+ let old = self
947
+ .state
948
+ .vars
949
+ .get(name)
950
+ .map_or(0, |old| slot_bytes(name, old));
951
+ self.resize_state(old, slot_bytes(name, &value))?;
854
952
  self.state.vars.insert(name.to_string(), value);
855
953
  }
856
954
  }
@@ -870,8 +968,21 @@ impl Runtime<'_, '_> {
870
968
  }
871
969
  }
872
970
 
971
+ /// Replace `$0` and its fields, charging each field before it is stored.
873
972
  fn set_record(&mut self, record: String) -> Result<(), Flow> {
874
- self.state.fields = split_fields(&record, &self.state.fs)?;
973
+ self.state.fields.clear();
974
+ self.resize_state(self.fields_reserved, 0)?;
975
+ self.fields_reserved = 0;
976
+ let separator = self.state.fs.clone();
977
+ let mut fields = Vec::new();
978
+ for_each_field(&record, &separator, |field| {
979
+ let bytes = FIELD_OVERHEAD.saturating_add(field.len() as u64);
980
+ self.resize_state(0, bytes)?;
981
+ self.fields_reserved = self.fields_reserved.saturating_add(bytes);
982
+ fields.push(field.to_string());
983
+ Ok(())
984
+ })?;
985
+ self.state.fields = fields;
875
986
  self.state.record = record;
876
987
  Ok(())
877
988
  }
@@ -936,11 +1047,7 @@ impl Runtime<'_, '_> {
936
1047
  }
937
1048
  LValue::Array { name, indices } => {
938
1049
  let key = self.array_key(indices)?;
939
- self.state
940
- .arrays
941
- .entry(name.clone())
942
- .or_default()
943
- .insert(key, value);
1050
+ self.store_element(name, key, value)?;
944
1051
  }
945
1052
  }
946
1053
  Ok(())
@@ -991,12 +1098,27 @@ pub(super) fn assignment_is_unsupported(name: &str) -> bool {
991
1098
  }
992
1099
 
993
1100
  fn split_fields(record: &str, separator: &str) -> Result<Vec<String>, Flow> {
1101
+ let mut fields = Vec::new();
1102
+ for_each_field(record, separator, |field| {
1103
+ fields.push(field.to_string());
1104
+ Ok(())
1105
+ })?;
1106
+ Ok(fields)
1107
+ }
1108
+
1109
+ /// Visit the fields of `record` in order, so callers can charge each one before storing it.
1110
+ fn for_each_field(
1111
+ record: &str,
1112
+ separator: &str,
1113
+ mut visit: impl FnMut(&str) -> Result<(), Flow>,
1114
+ ) -> Result<(), Flow> {
994
1115
  if separator == " " || separator.is_empty() {
995
- return Ok(record.split_whitespace().map(str::to_string).collect());
1116
+ return record.split_whitespace().try_for_each(visit);
996
1117
  }
997
- regex::Regex::new(separator)
998
- .map(|regex| regex.split(record).map(str::to_string).collect())
999
- .map_err(|error| Flow::Error(format!("invalid field separator: {error}")))
1118
+ let regex = regex::Regex::new(separator)
1119
+ .map_err(|error| Flow::Error(format!("invalid field separator: {error}")))?;
1120
+ let result = regex.split(record).try_for_each(&mut visit);
1121
+ result
1000
1122
  }
1001
1123
 
1002
1124
  /// Check an initial field separator before input is read or output is produced.
@@ -1168,6 +1290,11 @@ fn take_digits(chars: &mut std::iter::Peekable<std::str::Chars<'_>>) -> Option<S
1168
1290
  }
1169
1291
 
1170
1292
  fn number_text(value: f64) -> String {
1293
+ // Integer formatting is much cheaper than exact float formatting, and `-0` keeps its sign
1294
+ // through the float path.
1295
+ if value.fract() == 0.0 && value.abs() < 1e18 && !(value == 0.0 && value.is_sign_negative()) {
1296
+ return (value as i64).to_string();
1297
+ }
1171
1298
  if value.fract() == 0.0 && value.is_finite() {
1172
1299
  format!("{value:.0}")
1173
1300
  } else {