@greenpandastudios/aug-cli 0.20.1 → 0.21.0

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 (295) hide show
  1. package/README.md +1 -1
  2. package/docs/assets/benchmarks/execution.svg +774 -637
  3. package/docs/assets/benchmarks/http.svg +278 -249
  4. package/docs/assets/benchmarks/improvements.svg +66 -66
  5. package/docs/assets/benchmarks/kernels-mobile.svg +1 -0
  6. package/docs/assets/benchmarks/kernels.svg +1 -0
  7. package/docs/assets/benchmarks/memory.svg +153 -153
  8. package/docs/benchmark-results.json +227089 -90363
  9. package/docs/compatibility.md +6 -6
  10. package/docs/contributing-benchmarks.md +36 -6
  11. package/docs/dev-containers.md +8 -15
  12. package/docs/dgx-consumers.json +122 -0
  13. package/docs/dgx-gyms.json +784 -0
  14. package/docs/dgx-kernels.json +1170 -0
  15. package/docs/dgx-performance.json +227849 -0
  16. package/docs/dgx-spark.md +64 -0
  17. package/docs/diagnostics.md +1 -1
  18. package/docs/docker.md +16 -17
  19. package/docs/example-projects.json +32 -0
  20. package/docs/examples/approved-design/dependencies/august/{0.20.1 → 0.21.0}/io/contracts.md +3 -3
  21. package/docs/examples/approved-design/domain/app.md +4 -4
  22. package/docs/examples/approved-design/main.md +2 -2
  23. package/docs/examples/calls-benchmark/index.md +36 -0
  24. package/docs/examples/calls-benchmark/main.md +78 -0
  25. package/docs/examples/calls-benchmark/operations.md +60 -0
  26. package/docs/examples/developer-workflow/calculator.md +5 -5
  27. package/docs/examples/developer-workflow/dependencies/august/{0.20.1 → 0.21.0}/io/contracts.md +3 -3
  28. package/docs/examples/developer-workflow/logging/console.md +2 -2
  29. package/docs/examples/developer-workflow/logging/logger.md +2 -2
  30. package/docs/examples/developer-workflow/main.md +2 -2
  31. package/docs/examples/errors-benchmark/index.md +36 -0
  32. package/docs/examples/errors-benchmark/main.md +92 -0
  33. package/docs/examples/errors-benchmark/operations.md +65 -0
  34. package/docs/examples/float-benchmark/index.md +35 -0
  35. package/docs/examples/float-benchmark/main.md +75 -0
  36. package/docs/examples/generic-di/dependencies/august/{0.20.1 → 0.21.0}/io/contracts.md +3 -3
  37. package/docs/examples/generic-di/main.md +2 -2
  38. package/docs/examples/generic-di/types.md +3 -3
  39. package/docs/examples/hello/app/greeter.md +3 -3
  40. package/docs/examples/hello/dependencies/august/{0.20.1 → 0.21.0}/io/contracts.md +3 -3
  41. package/docs/examples/hello/logging/console.md +2 -2
  42. package/docs/examples/hello/logging/logger.md +2 -2
  43. package/docs/examples/hello/main.md +2 -2
  44. package/docs/examples/index.md +18 -1
  45. package/docs/examples/interceptors/app.md +5 -5
  46. package/docs/examples/interceptors/dependencies/august/{0.20.1 → 0.21.0}/io/contracts.md +3 -3
  47. package/docs/examples/interceptors/interceptors.md +2 -2
  48. package/docs/examples/interceptors/logging.md +3 -3
  49. package/docs/examples/interceptors/main.md +2 -2
  50. package/docs/examples/list-benchmark/index.md +35 -0
  51. package/docs/examples/list-benchmark/main.md +78 -0
  52. package/docs/examples/map-churn-benchmark/index.md +35 -0
  53. package/docs/examples/map-churn-benchmark/main.md +106 -0
  54. package/docs/examples/native-blake3/dependencies/packages/@greenpandastudios/aug-blake3/0.1.3/api.md +104 -0
  55. package/docs/examples/native-blake3/dependencies/packages/@greenpandastudios/aug-blake3/0.1.3/contracts.md +54 -0
  56. package/docs/examples/native-blake3/dependencies/packages/@greenpandastudios/aug-blake3/0.1.3/native.abi-json.md +48 -0
  57. package/docs/examples/native-blake3/hashing.md +93 -0
  58. package/docs/examples/native-blake3/index.md +38 -0
  59. package/docs/examples/native-blake3/main.md +73 -0
  60. package/docs/examples/native-pytorch/dependencies/packages/@greenpandastudios/aug-pytorch/0.1.4/api.md +406 -0
  61. package/docs/examples/native-pytorch/dependencies/packages/@greenpandastudios/aug-pytorch/0.1.4/bindings.md +51 -0
  62. package/docs/examples/native-pytorch/dependencies/packages/@greenpandastudios/aug-pytorch/0.1.4/contracts.md +63 -0
  63. package/docs/examples/native-pytorch/dependencies/packages/@greenpandastudios/aug-pytorch/0.1.4/native.abi-json.md +161 -0
  64. package/docs/examples/native-pytorch/index.md +38 -0
  65. package/docs/examples/native-pytorch/main.md +73 -0
  66. package/docs/examples/native-pytorch/tensors.md +123 -0
  67. package/docs/examples/native-sqlite/database.md +116 -0
  68. package/docs/examples/native-sqlite/dependencies/packages/@greenpandastudios/aug-sqlite/0.1.3/api.md +284 -0
  69. package/docs/examples/native-sqlite/dependencies/packages/@greenpandastudios/aug-sqlite/0.1.3/bindings.md +51 -0
  70. package/docs/examples/native-sqlite/dependencies/packages/@greenpandastudios/aug-sqlite/0.1.3/contracts.md +75 -0
  71. package/docs/examples/native-sqlite/dependencies/packages/@greenpandastudios/aug-sqlite/0.1.3/native.abi-json.md +119 -0
  72. package/docs/examples/native-sqlite/index.md +38 -0
  73. package/docs/examples/native-sqlite/main.md +73 -0
  74. package/docs/examples/native-zlib/compression.md +99 -0
  75. package/docs/examples/native-zlib/dependencies/packages/@greenpandastudios/aug-zlib/0.1.3/api.md +153 -0
  76. package/docs/examples/native-zlib/dependencies/packages/@greenpandastudios/aug-zlib/0.1.3/contracts.md +54 -0
  77. package/docs/examples/native-zlib/dependencies/packages/@greenpandastudios/aug-zlib/0.1.3/native.abi-json.md +76 -0
  78. package/docs/examples/native-zlib/index.md +38 -0
  79. package/docs/examples/native-zlib/main.md +78 -0
  80. package/docs/examples/new-syntax/console.md +2 -2
  81. package/docs/examples/new-syntax/dependencies/august/{0.20.1 → 0.21.0}/io/contracts.md +3 -3
  82. package/docs/examples/new-syntax/greeter.md +3 -3
  83. package/docs/examples/new-syntax/logger.md +2 -2
  84. package/docs/examples/new-syntax/main.md +2 -2
  85. package/docs/examples/ownership-transfer/dependencies/august/{0.20.1 → 0.21.0}/io/contracts.md +3 -3
  86. package/docs/examples/ownership-transfer/main.md +2 -2
  87. package/docs/examples/ownership-transfer/resource.md +2 -2
  88. package/docs/examples/packages-math/aug-package-json.md +1 -1
  89. package/docs/examples/records-benchmark/data.md +55 -0
  90. package/docs/examples/records-benchmark/index.md +36 -0
  91. package/docs/examples/records-benchmark/main.md +85 -0
  92. package/docs/examples/strings-benchmark/index.md +35 -0
  93. package/docs/examples/strings-benchmark/main.md +76 -0
  94. package/docs/examples/tasks-benchmark/index.md +36 -0
  95. package/docs/examples/tasks-benchmark/main.md +89 -0
  96. package/docs/examples/tasks-benchmark/operations.md +58 -0
  97. package/docs/getting-started.md +3 -3
  98. package/docs/grammar.md +2 -2
  99. package/docs/gym-results.json +784 -0
  100. package/docs/implementation-map.md +6 -0
  101. package/docs/index.md +1 -1
  102. package/docs/kernel-results.json +1170 -0
  103. package/docs/language-conformance.md +6 -0
  104. package/docs/language-constructs.md +9 -1
  105. package/docs/learn/index.md +1 -1
  106. package/docs/maintaining-docs.md +1 -1
  107. package/docs/native-implementation.md +276 -0
  108. package/docs/native-interop-llvm-plan.md +342 -0
  109. package/docs/native-package-examples.md +684 -0
  110. package/docs/native-packages.md +179 -0
  111. package/docs/packages.md +2 -2
  112. package/docs/performance.md +50 -29
  113. package/docs/production-readiness.md +11 -1
  114. package/docs/public/downloads/approved-design.zip +0 -0
  115. package/docs/public/downloads/calls-benchmark.zip +0 -0
  116. package/docs/public/downloads/developer-workflow.zip +0 -0
  117. package/docs/public/downloads/errors-benchmark.zip +0 -0
  118. package/docs/public/downloads/float-benchmark.zip +0 -0
  119. package/docs/public/downloads/generic-di.zip +0 -0
  120. package/docs/public/downloads/hello.zip +0 -0
  121. package/docs/public/downloads/interceptors.zip +0 -0
  122. package/docs/public/downloads/json-benchmark.zip +0 -0
  123. package/docs/public/downloads/list-benchmark.zip +0 -0
  124. package/docs/public/downloads/map-churn-benchmark.zip +0 -0
  125. package/docs/public/downloads/native-blake3.zip +0 -0
  126. package/docs/public/downloads/native-pytorch.zip +0 -0
  127. package/docs/public/downloads/native-sqlite.zip +0 -0
  128. package/docs/public/downloads/native-zlib.zip +0 -0
  129. package/docs/public/downloads/new-syntax.zip +0 -0
  130. package/docs/public/downloads/oidc-login.zip +0 -0
  131. package/docs/public/downloads/ownership-transfer.zip +0 -0
  132. package/docs/public/downloads/packages-app.zip +0 -0
  133. package/docs/public/downloads/packages-math.zip +0 -0
  134. package/docs/public/downloads/records-benchmark.zip +0 -0
  135. package/docs/public/downloads/strings-benchmark.zip +0 -0
  136. package/docs/public/downloads/tasks-benchmark.zip +0 -0
  137. package/docs/qualification-results.md +66 -0
  138. package/docs/reference.md +24 -0
  139. package/docs/releasing.md +81 -6
  140. package/docs/research/libtorch-native-qualification.md +115 -0
  141. package/docs/research/native-interop-llvm.md +197 -0
  142. package/docs/research/qualification-methods.md +15 -0
  143. package/docs/roadmap.md +1 -0
  144. package/docs/safety-gyms.md +41 -0
  145. package/docs/tooling.md +16 -15
  146. package/docs/web-library-gaps.md +1 -1
  147. package/docs/web.md +4 -0
  148. package/examples/approved-design/.aug-spec/manifest.json +3 -3
  149. package/examples/approved-design/domain/app.aug.md +4 -4
  150. package/examples/approved-design/main.aug.md +2 -2
  151. package/examples/developer-workflow/.aug-spec/manifest.json +3 -3
  152. package/examples/developer-workflow/calculator.aug.md +5 -5
  153. package/examples/developer-workflow/logging/console.aug.md +2 -2
  154. package/examples/developer-workflow/logging/logger.aug.md +2 -2
  155. package/examples/developer-workflow/main.aug.md +2 -2
  156. package/examples/generic-di/.aug-spec/manifest.json +3 -3
  157. package/examples/generic-di/main.aug.md +2 -2
  158. package/examples/generic-di/types.aug.md +3 -3
  159. package/examples/hello/.aug-spec/manifest.json +3 -3
  160. package/examples/hello/app/greeter.aug.md +3 -3
  161. package/examples/hello/logging/console.aug.md +2 -2
  162. package/examples/hello/logging/logger.aug.md +2 -2
  163. package/examples/hello/main.aug.md +2 -2
  164. package/examples/interceptors/.aug-spec/manifest.json +3 -3
  165. package/examples/interceptors/app.aug.md +5 -5
  166. package/examples/interceptors/interceptors.aug.md +2 -2
  167. package/examples/interceptors/logging.aug.md +3 -3
  168. package/examples/interceptors/main.aug.md +2 -2
  169. package/examples/native-blake3/.aug-spec/manifest.json +16 -0
  170. package/examples/native-blake3/.aug-spec/packages/@greenpandastudios/aug-blake3/0.1.1/native.abi.json +29 -0
  171. package/examples/native-blake3/.aug-spec/packages/@greenpandastudios/aug-blake3/0.1.3/api.aug +14 -0
  172. package/examples/native-blake3/.aug-spec/packages/@greenpandastudios/aug-blake3/0.1.3/api.aug.md +34 -0
  173. package/examples/native-blake3/.aug-spec/packages/@greenpandastudios/aug-blake3/0.1.3/contracts.aug +4 -0
  174. package/examples/native-blake3/.aug-spec/packages/@greenpandastudios/aug-blake3/0.1.3/contracts.aug.md +8 -0
  175. package/examples/native-blake3/.aug-spec/packages/@greenpandastudios/aug-blake3/0.1.3/native.abi.json +29 -0
  176. package/examples/native-blake3/AGENTS.md +5 -0
  177. package/examples/native-blake3/aug.lock.json +253 -0
  178. package/examples/native-blake3/hashing.aug +11 -0
  179. package/examples/native-blake3/hashing.aug.md +25 -0
  180. package/examples/native-blake3/main.aug +8 -0
  181. package/examples/native-blake3/main.aug.md +13 -0
  182. package/examples/native-pytorch/.aug-spec/manifest.json +18 -0
  183. package/examples/native-pytorch/.aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.1/native.abi.json +142 -0
  184. package/examples/native-pytorch/.aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.3/native.abi.json +142 -0
  185. package/examples/native-pytorch/.aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/api.aug +101 -0
  186. package/examples/native-pytorch/.aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/api.aug.md +160 -0
  187. package/examples/native-pytorch/.aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/bindings.aug +3 -0
  188. package/examples/native-pytorch/.aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/bindings.aug.md +8 -0
  189. package/examples/native-pytorch/.aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/contracts.aug +6 -0
  190. package/examples/native-pytorch/.aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/contracts.aug.md +13 -0
  191. package/examples/native-pytorch/.aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/native.abi.json +142 -0
  192. package/examples/native-pytorch/AGENTS.md +5 -0
  193. package/examples/native-pytorch/aug.lock.json +309 -0
  194. package/examples/native-pytorch/main.aug +8 -0
  195. package/examples/native-pytorch/main.aug.md +13 -0
  196. package/examples/native-pytorch/tensors.aug +23 -0
  197. package/examples/native-pytorch/tensors.aug.md +35 -0
  198. package/examples/native-sqlite/.aug-spec/manifest.json +18 -0
  199. package/examples/native-sqlite/.aug-spec/packages/@greenpandastudios/aug-sqlite/0.1.2/native.abi.json +100 -0
  200. package/examples/native-sqlite/.aug-spec/packages/@greenpandastudios/aug-sqlite/0.1.3/api.aug +48 -0
  201. package/examples/native-sqlite/.aug-spec/packages/@greenpandastudios/aug-sqlite/0.1.3/api.aug.md +91 -0
  202. package/examples/native-sqlite/.aug-spec/packages/@greenpandastudios/aug-sqlite/0.1.3/bindings.aug +3 -0
  203. package/examples/native-sqlite/.aug-spec/packages/@greenpandastudios/aug-sqlite/0.1.3/bindings.aug.md +8 -0
  204. package/examples/native-sqlite/.aug-spec/packages/@greenpandastudios/aug-sqlite/0.1.3/contracts.aug +8 -0
  205. package/examples/native-sqlite/.aug-spec/packages/@greenpandastudios/aug-sqlite/0.1.3/contracts.aug.md +22 -0
  206. package/examples/native-sqlite/.aug-spec/packages/@greenpandastudios/aug-sqlite/0.1.3/native.abi.json +100 -0
  207. package/examples/native-sqlite/AGENTS.md +5 -0
  208. package/examples/native-sqlite/aug.lock.json +236 -0
  209. package/examples/native-sqlite/database.aug +15 -0
  210. package/examples/native-sqlite/database.aug.md +27 -0
  211. package/examples/native-sqlite/main.aug +8 -0
  212. package/examples/native-sqlite/main.aug.md +13 -0
  213. package/examples/native-zlib/.aug-spec/manifest.json +16 -0
  214. package/examples/native-zlib/.aug-spec/packages/@greenpandastudios/aug-zlib/0.1.1/native.abi.json +57 -0
  215. package/examples/native-zlib/.aug-spec/packages/@greenpandastudios/aug-zlib/0.1.3/api.aug +29 -0
  216. package/examples/native-zlib/.aug-spec/packages/@greenpandastudios/aug-zlib/0.1.3/api.aug.md +54 -0
  217. package/examples/native-zlib/.aug-spec/packages/@greenpandastudios/aug-zlib/0.1.3/contracts.aug +4 -0
  218. package/examples/native-zlib/.aug-spec/packages/@greenpandastudios/aug-zlib/0.1.3/contracts.aug.md +8 -0
  219. package/examples/native-zlib/.aug-spec/packages/@greenpandastudios/aug-zlib/0.1.3/native.abi.json +57 -0
  220. package/examples/native-zlib/AGENTS.md +5 -0
  221. package/examples/native-zlib/aug.lock.json +236 -0
  222. package/examples/native-zlib/compression.aug +15 -0
  223. package/examples/native-zlib/compression.aug.md +27 -0
  224. package/examples/native-zlib/main.aug +10 -0
  225. package/examples/native-zlib/main.aug.md +13 -0
  226. package/examples/new-syntax/.aug-spec/manifest.json +3 -3
  227. package/examples/new-syntax/console.aug.md +2 -2
  228. package/examples/new-syntax/greeter.aug.md +3 -3
  229. package/examples/new-syntax/logger.aug.md +2 -2
  230. package/examples/new-syntax/main.aug.md +2 -2
  231. package/examples/oidc-login/aug.lock.json +6 -6
  232. package/examples/ownership-transfer/.aug-spec/manifest.json +3 -3
  233. package/examples/ownership-transfer/main.aug.md +2 -2
  234. package/examples/ownership-transfer/resource.aug.md +2 -2
  235. package/examples/packages/math/aug-package.json +1 -1
  236. package/native/compiler-packs.json +43 -0
  237. package/package.json +3 -2
  238. package/runtime/aug_http.c +48 -21
  239. package/runtime/aug_http_ir.c +30 -0
  240. package/runtime/aug_http_ir.h +18 -0
  241. package/runtime/aug_ir.c +209 -0
  242. package/runtime/aug_ir.h +89 -0
  243. package/runtime/aug_json.c +6 -1
  244. package/runtime/aug_runtime.c +82 -16
  245. package/runtime/aug_runtime.h +16 -2
  246. package/runtime/aug_tasks.c +38 -7
  247. package/runtime/aug_values.c +12 -6
  248. package/scripts/bootstrap-native.mjs +4 -1
  249. package/src/ast.js +1 -1
  250. package/src/checker.js +110 -28
  251. package/src/cli.js +92 -14
  252. package/src/codegen.js +31 -6
  253. package/src/compiler-packs.js +66 -0
  254. package/src/config.js +2 -2
  255. package/src/editor.js +15 -6
  256. package/src/formatter.js +4 -2
  257. package/src/git-http.js +137 -0
  258. package/src/git-packages.js +9 -1
  259. package/src/help.js +10 -2
  260. package/src/ir-types.js +5 -0
  261. package/src/ir-verify.js +277 -0
  262. package/src/ir.js +962 -0
  263. package/src/llvm-debug.js +101 -0
  264. package/src/llvm-native.js +152 -0
  265. package/src/llvm-platform.js +20 -0
  266. package/src/llvm.js +781 -0
  267. package/src/native-artifacts.js +207 -0
  268. package/src/native-bindings.js +189 -0
  269. package/src/native-contracts.js +295 -0
  270. package/src/native-declarations.js +68 -0
  271. package/src/native-facts.js +63 -0
  272. package/src/package-locking.js +43 -0
  273. package/src/package-manager.js +23 -8
  274. package/src/parser.js +20 -2
  275. package/src/project.js +2 -2
  276. package/src/runtime-abi.js +23 -0
  277. package/src/runtime-adapters.js +18 -0
  278. package/src/schemas.js +24 -17
  279. package/src/semantic.js +8 -3
  280. package/src/snippets.js +1 -0
  281. package/src/spec.js +49 -8
  282. /package/examples/approved-design/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug +0 -0
  283. /package/examples/approved-design/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug.md +0 -0
  284. /package/examples/developer-workflow/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug +0 -0
  285. /package/examples/developer-workflow/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug.md +0 -0
  286. /package/examples/generic-di/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug +0 -0
  287. /package/examples/generic-di/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug.md +0 -0
  288. /package/examples/hello/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug +0 -0
  289. /package/examples/hello/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug.md +0 -0
  290. /package/examples/interceptors/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug +0 -0
  291. /package/examples/interceptors/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug.md +0 -0
  292. /package/examples/new-syntax/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug +0 -0
  293. /package/examples/new-syntax/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug.md +0 -0
  294. /package/examples/ownership-transfer/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug +0 -0
  295. /package/examples/ownership-transfer/.aug-spec/august/{0.20.1 → 0.21.0}/io/contracts.aug.md +0 -0
@@ -0,0 +1,3 @@
1
+ // Generated by aug spec. This is a copy of the installed dependency source.
2
+ // aug-spec: "bindings.aug.md" explains this file. Read it before changes; refresh with aug spec.
3
+ extern C resource Database
@@ -0,0 +1,8 @@
1
+ <!-- Generated by aug spec. Edit the August source, then regenerate. -->
2
+
3
+ # `bindings.aug`
4
+
5
+ <a id="symbol-Database"></a>
6
+ ## `Database` · native resource · [source](bindings.aug#L3)
7
+
8
+ Native implementation: `@greenpandastudios/aug-sqlite@0.1.3`, `3.53.4`. Supported targets: linux arm64 glibc 2.36+, linux x64 glibc 2.36+, macos arm64 14.0+. Binding contract: [`native.abi.json`](native.abi.json) (SHA-256 `3c75c2925c85f1b83db06ee00fa04f1d2d37c9fd6edca0d074ce89b4647ffffb`). An owned value releases its opaque handle through `aug_sqlite_release_v1` when its scope ends, including error and return paths.
@@ -0,0 +1,8 @@
1
+ // Generated by aug spec. This is a copy of the installed dependency source.
2
+ // aug-spec: "contracts.aug.md" explains this file. Read it before changes; refresh with aug spec.
3
+ import Database from bindings
4
+ SqliteError(int code, string message) implements Error:
5
+ pass
6
+ /** Permission to open database files. Select the native adapter in main.aug. */
7
+ capability DatabaseStorage:
8
+ open(string path) returns own Database unless SqliteError uses DatabaseStorage.open
@@ -0,0 +1,22 @@
1
+ <!-- Generated by aug spec. Edit the August source, then regenerate. -->
2
+
3
+ # `contracts.aug`
4
+
5
+ <a id="symbol-SqliteError"></a>
6
+ ## `SqliteError` · class · [source](contracts.aug#L4)
7
+
8
+ It implements `Error`. It takes `code` as an integer, kept read-only and `message` as a string, kept read-only.
9
+
10
+ <a id="symbol-DatabaseStorage"></a>
11
+ ## `DatabaseStorage` · capability interface · [source](contracts.aug#L7)
12
+
13
+ Permission to open database files. Select the native adapter in main.aug.
14
+
15
+ <a id="symbol-DatabaseStorage.open"></a>
16
+ ### `DatabaseStorage.open` · [source](contracts.aug#L8)
17
+
18
+ It takes `path` as a string. It returns ownership of [`Database`](bindings.aug.md#symbol-Database). It can call [`DatabaseStorage.open`](contracts.aug.md#symbol-DatabaseStorage.open). Failures can raise [`SqliteError`](contracts.aug.md#symbol-SqliteError).
19
+
20
+ ## Dependencies
21
+
22
+ It uses [`Database`](bindings.aug.md#symbol-Database) from `bindings`.
@@ -0,0 +1,100 @@
1
+ {
2
+ "format": 1,
3
+ "profile": "aug-native-abi-1",
4
+ "resources": [
5
+ {
6
+ "module": "bindings",
7
+ "name": "Database",
8
+ "release": "aug_sqlite_release_v1"
9
+ }
10
+ ],
11
+ "functions": [
12
+ {
13
+ "module": "api",
14
+ "name": "_open",
15
+ "symbol": "aug_sqlite_open_v1",
16
+ "params": [
17
+ {
18
+ "name": "path",
19
+ "kind": "utf8"
20
+ }
21
+ ],
22
+ "result": {
23
+ "kind": "resource",
24
+ "resource": "bindings.Database"
25
+ },
26
+ "error": "contracts.SqliteError",
27
+ "callingConvention": "C",
28
+ "status": "i32",
29
+ "uses": [],
30
+ "changes": [],
31
+ "thread": "caller",
32
+ "retainsInputs": false
33
+ },
34
+ {
35
+ "module": "api",
36
+ "name": "_execute",
37
+ "symbol": "aug_sqlite_execute_v1",
38
+ "params": [
39
+ {
40
+ "name": "database",
41
+ "kind": "resource",
42
+ "resource": "bindings.Database",
43
+ "ownership": "borrow"
44
+ },
45
+ {
46
+ "name": "sql",
47
+ "kind": "utf8"
48
+ },
49
+ {
50
+ "name": "parameters",
51
+ "kind": "utf8-list"
52
+ }
53
+ ],
54
+ "result": {
55
+ "kind": "i64"
56
+ },
57
+ "error": "contracts.SqliteError",
58
+ "callingConvention": "C",
59
+ "status": "i32",
60
+ "uses": [],
61
+ "changes": [
62
+ "database"
63
+ ],
64
+ "thread": "caller",
65
+ "retainsInputs": false
66
+ },
67
+ {
68
+ "module": "api",
69
+ "name": "_queryScalar",
70
+ "symbol": "aug_sqlite_scalar_v1",
71
+ "params": [
72
+ {
73
+ "name": "database",
74
+ "kind": "resource",
75
+ "resource": "bindings.Database",
76
+ "ownership": "read"
77
+ },
78
+ {
79
+ "name": "sql",
80
+ "kind": "utf8"
81
+ },
82
+ {
83
+ "name": "parameters",
84
+ "kind": "utf8-list"
85
+ }
86
+ ],
87
+ "result": {
88
+ "kind": "utf8",
89
+ "release": "aug_sqlite_text_release_v1"
90
+ },
91
+ "error": "contracts.SqliteError",
92
+ "callingConvention": "C",
93
+ "status": "i32",
94
+ "uses": [],
95
+ "changes": [],
96
+ "thread": "caller",
97
+ "retainsInputs": false
98
+ }
99
+ ]
100
+ }
@@ -0,0 +1,5 @@
1
+ # Working on this August project
2
+
3
+ Read each file's adjacent `.aug.md` before editing; change `.aug` source and regenerate with `aug spec .`.
4
+ This project imports real SQLite through a tagged public package. Keep dependency versions, labeled SQL parameters, and native ownership explicit. Mutation requires a borrow. Do not replace native operations with a mock.
5
+ Use the August 0.21.0 LLVM preview on macOS 14+ ARM64. Run `aug install .`, `aug check .`, `aug test .`, and `aug run .`. Consumer installation must not invoke native build scripts.
@@ -0,0 +1,236 @@
1
+ {
2
+ "format": 1,
3
+ "compiler": "0.21.0",
4
+ "specifications": {
5
+ "url_ec6f73485e9c2d30be64": "https://github.com/GreenPandaStudios/aug-sqlite#v0.1.3"
6
+ },
7
+ "roots": {
8
+ "url_ec6f73485e9c2d30be64": "packages/url_ec6f73485e9c2d30be64"
9
+ },
10
+ "npm": {},
11
+ "git": [
12
+ {
13
+ "request": "https://github.com/GreenPandaStudios/aug-sqlite#v0.1.3",
14
+ "repository": "https://github.com/GreenPandaStudios/aug-sqlite.git",
15
+ "revision": "v0.1.3",
16
+ "folder": "",
17
+ "commit": "54371656e3f8d47d020b974f97267a9017b5e552"
18
+ }
19
+ ],
20
+ "packages": [
21
+ {
22
+ "path": "packages/url_ec6f73485e9c2d30be64",
23
+ "name": "@greenpandastudios/aug-sqlite",
24
+ "version": "0.1.3",
25
+ "source": "src",
26
+ "digest": "50bc12ee1c63d26c745aaa50ce065f893a1e23fb3c4027608ac90a5f81e8561d",
27
+ "dependencies": {},
28
+ "native": {
29
+ "profile": "aug-native-abi-1",
30
+ "bindings": "native.abi.json",
31
+ "bindingsSha256": "3c75c2925c85f1b83db06ee00fa04f1d2d37c9fd6edca0d074ce89b4647ffffb",
32
+ "upstream": {
33
+ "repository": "https://github.com/sqlite/sqlite",
34
+ "version": "3.53.4",
35
+ "sourceRevision": "1e71ddf93849c6a6ecf58b827c0692073d2dd7ee40196158068f7b29f422e87d"
36
+ },
37
+ "artifacts": [
38
+ {
39
+ "id": "linux-arm64",
40
+ "target": {
41
+ "triple": "aarch64-unknown-linux-gnu",
42
+ "os": "linux",
43
+ "arch": "arm64",
44
+ "minimumLibc": "2.36",
45
+ "cpuBaseline": "armv8-a",
46
+ "libc": "glibc"
47
+ },
48
+ "url": "https://github.com/GreenPandaStudios/aug-sqlite/releases/download/v0.1.3/native-linux-arm64.tar.gz",
49
+ "sha256": "480c6dfb5a257fc7047a28dd2eb6f2e60bbcb90ae4e301083a180744dadea8f2",
50
+ "maximumDownloadBytes": 1984618,
51
+ "maximumUnpackedBytes": 4131708,
52
+ "link": {
53
+ "kind": "dynamic",
54
+ "libraries": [
55
+ "lib/libaug_sqlite.so.1"
56
+ ]
57
+ },
58
+ "runtime": {
59
+ "files": [
60
+ "lib/libaug_sqlite.so.1"
61
+ ],
62
+ "closureManifest": "runtime-files.json",
63
+ "relocation": "loader-relative"
64
+ },
65
+ "components": [
66
+ {
67
+ "id": "https://github.com/sqlite/sqlite",
68
+ "version": "3.53.4",
69
+ "compatibilityKey": "aug-sqlite-runtime",
70
+ "linkage": "static",
71
+ "required": true
72
+ }
73
+ ],
74
+ "fileManifest": "files.json",
75
+ "provenance": "provenance.json",
76
+ "notices": "THIRD_PARTY_NOTICES.md"
77
+ },
78
+ {
79
+ "id": "linux-x64",
80
+ "target": {
81
+ "triple": "x86_64-unknown-linux-gnu",
82
+ "os": "linux",
83
+ "arch": "x64",
84
+ "minimumLibc": "2.36",
85
+ "cpuBaseline": "x86-64",
86
+ "libc": "glibc"
87
+ },
88
+ "url": "https://github.com/GreenPandaStudios/aug-sqlite/releases/download/v0.1.3/native-linux-x64.tar.gz",
89
+ "sha256": "3b38b5d537fbe24462505b85f52ed421c80df7af400ff1dc0567aa3f542e6255",
90
+ "maximumDownloadBytes": 2178112,
91
+ "maximumUnpackedBytes": 4509173,
92
+ "link": {
93
+ "kind": "dynamic",
94
+ "libraries": [
95
+ "lib/libaug_sqlite.so.1"
96
+ ]
97
+ },
98
+ "runtime": {
99
+ "files": [
100
+ "lib/libaug_sqlite.so.1"
101
+ ],
102
+ "closureManifest": "runtime-files.json",
103
+ "relocation": "loader-relative"
104
+ },
105
+ "components": [
106
+ {
107
+ "id": "https://github.com/sqlite/sqlite",
108
+ "version": "3.53.4",
109
+ "compatibilityKey": "aug-sqlite-runtime",
110
+ "linkage": "static",
111
+ "required": true
112
+ }
113
+ ],
114
+ "fileManifest": "files.json",
115
+ "provenance": "provenance.json",
116
+ "notices": "THIRD_PARTY_NOTICES.md"
117
+ },
118
+ {
119
+ "id": "macos-arm64",
120
+ "target": {
121
+ "triple": "aarch64-apple-darwin",
122
+ "os": "macos",
123
+ "arch": "arm64",
124
+ "minimumOS": "14.0",
125
+ "cpuBaseline": "armv8-a",
126
+ "libc": "libSystem"
127
+ },
128
+ "url": "https://github.com/GreenPandaStudios/aug-sqlite/releases/download/v0.1.3/native-macos-arm64.tar.gz",
129
+ "sha256": "f79e5ac0751aa612d1119d7769d46ee7a34b904e5ea8a993886fb005311e1ad8",
130
+ "maximumDownloadBytes": 616575,
131
+ "maximumUnpackedBytes": 1248410,
132
+ "link": {
133
+ "kind": "dynamic",
134
+ "libraries": [
135
+ "lib/libaug_sqlite.1.dylib"
136
+ ]
137
+ },
138
+ "runtime": {
139
+ "files": [
140
+ "lib/libaug_sqlite.1.dylib"
141
+ ],
142
+ "closureManifest": "runtime-files.json",
143
+ "relocation": "loader-relative"
144
+ },
145
+ "components": [
146
+ {
147
+ "id": "https://github.com/sqlite/sqlite",
148
+ "version": "3.53.4",
149
+ "compatibilityKey": "aug-sqlite-runtime",
150
+ "linkage": "static",
151
+ "required": true
152
+ }
153
+ ],
154
+ "fileManifest": "files.json",
155
+ "provenance": "provenance.json",
156
+ "notices": "THIRD_PARTY_NOTICES.md"
157
+ }
158
+ ],
159
+ "sourceBuild": {
160
+ "recipe": "native/build.json",
161
+ "inputs": "native/sources.lock.json",
162
+ "tools": [
163
+ "Node 24+",
164
+ "Clang",
165
+ "macOS: Apple SDK",
166
+ "GNU/Linux: Docker with the pinned Debian 12 maintainer image and patchelf"
167
+ ],
168
+ "automatic": false
169
+ }
170
+ }
171
+ }
172
+ ],
173
+ "native": {
174
+ "format": 1,
175
+ "targets": {
176
+ "aarch64-apple-darwin/macos14": {
177
+ "target": {
178
+ "triple": "aarch64-apple-darwin",
179
+ "os": "macos",
180
+ "arch": "arm64",
181
+ "cpuBaseline": "armv8-a",
182
+ "libc": "libSystem",
183
+ "minimumOS": "26.0"
184
+ },
185
+ "packages": [
186
+ {
187
+ "sourcePackage": "@greenpandastudios/aug-sqlite@0.1.3",
188
+ "sourceDigest": "50bc12ee1c63d26c745aaa50ce065f893a1e23fb3c4027608ac90a5f81e8561d",
189
+ "sourceCommit": "54371656e3f8d47d020b974f97267a9017b5e552",
190
+ "contractSha256": "3c75c2925c85f1b83db06ee00fa04f1d2d37c9fd6edca0d074ce89b4647ffffb",
191
+ "artifact": {
192
+ "id": "macos-arm64",
193
+ "target": {
194
+ "triple": "aarch64-apple-darwin",
195
+ "os": "macos",
196
+ "arch": "arm64",
197
+ "minimumOS": "14.0",
198
+ "cpuBaseline": "armv8-a",
199
+ "libc": "libSystem"
200
+ },
201
+ "url": "https://github.com/GreenPandaStudios/aug-sqlite/releases/download/v0.1.3/native-macos-arm64.tar.gz",
202
+ "sha256": "f79e5ac0751aa612d1119d7769d46ee7a34b904e5ea8a993886fb005311e1ad8",
203
+ "maximumDownloadBytes": 616575,
204
+ "maximumUnpackedBytes": 1248410,
205
+ "link": {
206
+ "kind": "dynamic",
207
+ "libraries": [
208
+ "lib/libaug_sqlite.1.dylib"
209
+ ]
210
+ },
211
+ "runtime": {
212
+ "files": [
213
+ "lib/libaug_sqlite.1.dylib"
214
+ ],
215
+ "closureManifest": "runtime-files.json",
216
+ "relocation": "loader-relative"
217
+ },
218
+ "components": [
219
+ {
220
+ "id": "https://github.com/sqlite/sqlite",
221
+ "version": "3.53.4",
222
+ "compatibilityKey": "aug-sqlite-runtime",
223
+ "linkage": "static",
224
+ "required": true
225
+ }
226
+ ],
227
+ "fileManifest": "files.json",
228
+ "provenance": "provenance.json",
229
+ "notices": "THIRD_PARTY_NOTICES.md"
230
+ }
231
+ }
232
+ ]
233
+ }
234
+ }
235
+ }
236
+ }
@@ -0,0 +1,15 @@
1
+ // aug-spec: "database.aug.md" explains this file. Read it before changes; refresh with aug spec.
2
+ import Database and SqliteError and openMemory and execute and queryScalar from "https://github.com/GreenPandaStudios/aug-sqlite#v0.1.3"
3
+
4
+ /** Store a bound value in an in-memory SQLite database and read it back. */
5
+ storedName() returns string unless SqliteError:
6
+ own Database database = openMemory()
7
+ borrow database:
8
+ execute(database, sql="CREATE TABLE users (name TEXT NOT NULL)", parameters=[])
9
+ execute(database, sql="INSERT INTO users (name) VALUES (?)", parameters=["August"])
10
+ return queryScalar(database, sql="SELECT name FROM users", parameters=[])
11
+
12
+ test storedName:
13
+ when database:
14
+ it inserts_and_queries_bound_data:
15
+ assert(storedName() == "August")
@@ -0,0 +1,27 @@
1
+ <!-- Generated by aug spec. Edit the August source, then regenerate. -->
2
+
3
+ # `database.aug`
4
+
5
+ <a id="symbol-storedName"></a>
6
+ ## `storedName` · [source](database.aug#L5)
7
+
8
+ Store a bound value in an in-memory SQLite database and read it back. Failures can raise [`SqliteError`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/contracts.aug.md#symbol-SqliteError).
9
+
10
+ It gets `database` of type [`Database`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/bindings.aug.md#symbol-Database) from [`openMemory`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/api.aug.md#symbol-openMemory). `database` of type [`Database`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/bindings.aug.md#symbol-Database) owns this value. With temporary permission to change `database`, it calls [`execute`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/api.aug.md#symbol-execute) with `database`, `sql` `"CREATE TABLE users (name TEXT NOT NULL)"`, and `parameters` from a list with no items; then it calls [`execute`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/api.aug.md#symbol-execute) with `database`, `sql` `"INSERT INTO users (name) VALUES (?)"`, and `parameters` from a list containing `"August"`. It returns [`queryScalar`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/api.aug.md#symbol-queryScalar) with `database`, `sql` `"SELECT name FROM users"`, and `parameters` from a list with no items.
11
+
12
+ <a id="symbol-test storedName"></a>
13
+ ## `test storedName` · [source](database.aug#L12)
14
+
15
+ Tests [`storedName`](database.aug.md#symbol-storedName). Each case gets fresh setup and dependencies.
16
+
17
+ ### `database`
18
+
19
+ #### `inserts_and_queries_bound_data` · [source](database.aug#L14)
20
+
21
+ The test requires [`storedName`](database.aug.md#symbol-storedName) equals `"August"`.
22
+
23
+ ## Dependencies
24
+
25
+ It uses [`execute`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/api.aug.md#symbol-execute), [`openMemory`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/api.aug.md#symbol-openMemory), [`queryScalar`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/api.aug.md#symbol-queryScalar), [`Database`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/bindings.aug.md#symbol-Database), and [`SqliteError`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/contracts.aug.md#symbol-SqliteError) from `https://github.com/GreenPandaStudios/aug-sqlite#v0.1.3`.
26
+
27
+ Built-in operations follow the [language reference](https://greenpandastudios.github.io/augscript/language-constructs).
@@ -0,0 +1,8 @@
1
+ // aug-spec: "main.aug.md" explains this file. Read it before changes; refresh with aug spec.
2
+ import storedName from database
3
+ import SqliteError from "https://github.com/GreenPandaStudios/aug-sqlite#v0.1.3"
4
+
5
+ try:
6
+ print(value=storedName())
7
+ catch SqliteError error:
8
+ print(value=error.message)
@@ -0,0 +1,13 @@
1
+ <!-- Generated by aug spec. Edit the August source, then regenerate. -->
2
+
3
+ # `main.aug`
4
+
5
+ ## Startup
6
+
7
+ It prints [`storedName`](database.aug.md#symbol-storedName). If this work raises [`SqliteError`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/contracts.aug.md#symbol-SqliteError) as `error`, it prints `error.message`.
8
+
9
+ ## Dependencies
10
+
11
+ It uses [`SqliteError`](.aug-spec/packages/%40greenpandastudios/aug-sqlite/0.1.3/contracts.aug.md#symbol-SqliteError) (`message`) from `https://github.com/GreenPandaStudios/aug-sqlite#v0.1.3`. It uses [`storedName`](database.aug.md#symbol-storedName) from `database`.
12
+
13
+ Built-in operations follow the [language reference](https://greenpandastudios.github.io/augscript/language-constructs).
@@ -0,0 +1,16 @@
1
+ {
2
+ "format": 1,
3
+ "files": [
4
+ ".aug-spec/packages/@greenpandastudios/aug-zlib/0.1.3/api.aug",
5
+ ".aug-spec/packages/@greenpandastudios/aug-zlib/0.1.3/api.aug.md",
6
+ ".aug-spec/packages/@greenpandastudios/aug-zlib/0.1.3/contracts.aug",
7
+ ".aug-spec/packages/@greenpandastudios/aug-zlib/0.1.3/contracts.aug.md",
8
+ ".aug-spec/packages/@greenpandastudios/aug-zlib/0.1.3/native.abi.json",
9
+ "compression.aug.md",
10
+ "main.aug.md"
11
+ ],
12
+ "nativeDescriptors": {
13
+ ".aug-spec/packages/@greenpandastudios/aug-zlib/0.1.3/native.abi.json": "c3d4b36eadcccd13caff71597ed77a8e7307f0cfe3d13660a8e9127efe942b3d"
14
+ },
15
+ "digest": "a90d4a0301197541db015da06486ffdd12ae464e0c68675cb40e838dabaec03a"
16
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "format": 1,
3
+ "profile": "aug-native-abi-1",
4
+ "resources": [],
5
+ "functions": [
6
+ {
7
+ "module": "api",
8
+ "name": "_compress",
9
+ "symbol": "aug_zlib_compress_v1",
10
+ "params": [
11
+ {
12
+ "name": "input",
13
+ "kind": "bytes"
14
+ }
15
+ ],
16
+ "result": {
17
+ "kind": "bytes",
18
+ "release": "aug_zlib_release_v1"
19
+ },
20
+ "error": "contracts.CompressionError",
21
+ "callingConvention": "C",
22
+ "status": "i32",
23
+ "uses": [],
24
+ "changes": [],
25
+ "thread": "caller",
26
+ "retainsInputs": false
27
+ },
28
+ {
29
+ "module": "api",
30
+ "name": "_decompress",
31
+ "symbol": "aug_zlib_decompress_v1",
32
+ "params": [
33
+ {
34
+ "name": "input",
35
+ "kind": "bytes"
36
+ },
37
+ {
38
+ "name": "maximumOutput",
39
+ "kind": "i64",
40
+ "minimum": 0,
41
+ "maximum": 268435456
42
+ }
43
+ ],
44
+ "result": {
45
+ "kind": "bytes",
46
+ "release": "aug_zlib_release_v1"
47
+ },
48
+ "error": "contracts.CompressionError",
49
+ "callingConvention": "C",
50
+ "status": "i32",
51
+ "uses": [],
52
+ "changes": [],
53
+ "thread": "caller",
54
+ "retainsInputs": false
55
+ }
56
+ ]
57
+ }
@@ -0,0 +1,29 @@
1
+ // Generated by aug spec. This is a copy of the installed dependency source.
2
+ // aug-spec: "api.aug.md" explains this file. Read it before changes; refresh with aug spec.
3
+ import CompressionError from contracts
4
+ extern C _compress(Bytes input) returns Bytes unless CompressionError
5
+ extern C _decompress(Bytes input, int maximumOutput) returns Bytes unless CompressionError
6
+ /** Compress bytes with the standard zlib framing. */
7
+ compress(Bytes input) returns Bytes:
8
+ unsafe:
9
+ return _compress(input)
10
+ /** Decompress at most maximumOutput bytes (maximum 256 MiB). */
11
+ decompress(Bytes input, int maximumOutput) returns Bytes:
12
+ unsafe:
13
+ return _decompress(input, maximumOutput)
14
+
15
+ test compress:
16
+ when compression:
17
+ it preserves_bytes:
18
+ Bytes input = "The world runs on language".bytes()
19
+ Bytes packed = compress(input)
20
+ Bytes restored = decompress(input=packed, maximumOutput=4096)
21
+ assert(restored.text() == "The world runs on language")
22
+ it checks_output_limit:
23
+ Bytes packed = compress(input="length limit".bytes())
24
+ bool rejected = false
25
+ try:
26
+ decompress(input=packed, maximumOutput=1)
27
+ catch CompressionError error:
28
+ rejected = true
29
+ assert(rejected)
@@ -0,0 +1,54 @@
1
+ <!-- Generated by aug spec. Edit the August source, then regenerate. -->
2
+
3
+ # `api.aug`
4
+
5
+ <a id="symbol-compress"></a>
6
+ ## `compress` · [source](api.aug#L7)
7
+
8
+ Compress bytes with the standard zlib framing. It takes `input` as `Bytes`. Failures can raise [`CompressionError`](contracts.aug.md#symbol-CompressionError).
9
+
10
+ Within an unsafe block, it returns [`_compress`](api.aug.md#symbol-_compress) with `input`. Native operations must satisfy their declared C contracts.
11
+
12
+ <a id="symbol-decompress"></a>
13
+ ## `decompress` · [source](api.aug#L11)
14
+
15
+ Decompress at most maximumOutput bytes (maximum 256 MiB). It takes `input` as `Bytes` and `maximumOutput` as an integer. Failures can raise [`CompressionError`](contracts.aug.md#symbol-CompressionError).
16
+
17
+ Within an unsafe block, it returns [`_decompress`](api.aug.md#symbol-_decompress) with `input` and `maximumOutput`. Native operations must satisfy their declared C contracts.
18
+
19
+ <a id="symbol-_compress"></a>
20
+ ## `_compress` · [source](api.aug#L4)
21
+
22
+ It is private to its defining scope. It takes `input` as `Bytes`. It returns `Bytes`. Failures can raise [`CompressionError`](contracts.aug.md#symbol-CompressionError).
23
+
24
+ Native implementation: `@greenpandastudios/aug-zlib@0.1.3`, `1.3.2`. Supported targets: linux arm64 glibc 2.36+, linux x64 glibc 2.36+, macos arm64 14.0+. Binding contract: [`native.abi.json`](native.abi.json) (SHA-256 `c3d4b36eadcccd13caff71597ed77a8e7307f0cfe3d13660a8e9127efe942b3d`). It calls `aug_zlib_compress_v1` through the C ABI on the caller thread; a blocking native call blocks that thread. August copies the returned buffer, then calls `aug_zlib_release_v1` to release it. The compiler checks the provider, descriptor digest, signature and ownership at August call sites. The native author promises not to retain inputs, enter August from foreign threads, or unwind across the C boundary; internal native workers may run. The compiler does not prove those promises.
25
+
26
+ <a id="symbol-_decompress"></a>
27
+ ## `_decompress` · [source](api.aug#L5)
28
+
29
+ It is private to its defining scope. It takes `input` as `Bytes` and `maximumOutput` as an integer. It returns `Bytes`. Failures can raise [`CompressionError`](contracts.aug.md#symbol-CompressionError).
30
+
31
+ Native implementation: `@greenpandastudios/aug-zlib@0.1.3`, `1.3.2`. Supported targets: linux arm64 glibc 2.36+, linux x64 glibc 2.36+, macos arm64 14.0+. Binding contract: [`native.abi.json`](native.abi.json) (SHA-256 `c3d4b36eadcccd13caff71597ed77a8e7307f0cfe3d13660a8e9127efe942b3d`). It calls `aug_zlib_decompress_v1` through the C ABI on the caller thread; a blocking native call blocks that thread. August copies the returned buffer, then calls `aug_zlib_release_v1` to release it. The compiler checks the provider, descriptor digest, signature and ownership at August call sites. The native author promises not to retain inputs, enter August from foreign threads, or unwind across the C boundary; internal native workers may run. The compiler does not prove those promises.
32
+
33
+ <a id="symbol-test compress"></a>
34
+ ## `test compress` · [source](api.aug#L15)
35
+
36
+ Tests [`compress`](api.aug.md#symbol-compress). Each case gets fresh setup and dependencies.
37
+
38
+ ### `compression`
39
+
40
+ #### `preserves_bytes` · [source](api.aug#L17)
41
+
42
+ It sets `input` of type `Bytes` to `bytes` on `"The world runs on language"`. It sets `packed` of type `Bytes` to [`compress`](api.aug.md#symbol-compress) with `input`. It sets `restored` of type `Bytes` to [`decompress`](api.aug.md#symbol-decompress) with `input` from `packed` and `maximumOutput` `4096`. The test requires `restored.text` equals `"The world runs on language"`.
43
+
44
+ #### `checks_output_limit` · [source](api.aug#L22)
45
+
46
+ It sets `packed` of type `Bytes` to [`compress`](api.aug.md#symbol-compress) with `input` from `bytes` on `"length limit"`. It sets `rejected` to `false`.
47
+
48
+ It tries to call [`decompress`](api.aug.md#symbol-decompress) with `input` from `packed` and `maximumOutput` `1`. If this work raises [`CompressionError`](contracts.aug.md#symbol-CompressionError), it sets `rejected` to `true`. The test requires `rejected` is true.
49
+
50
+ ## Dependencies
51
+
52
+ It uses [`CompressionError`](contracts.aug.md#symbol-CompressionError) from `contracts`.
53
+
54
+ Built-in operations follow the [language reference](https://greenpandastudios.github.io/augscript/language-constructs).
@@ -0,0 +1,4 @@
1
+ // Generated by aug spec. This is a copy of the installed dependency source.
2
+ // aug-spec: "contracts.aug.md" explains this file. Read it before changes; refresh with aug spec.
3
+ CompressionError(int code, string message) implements Error:
4
+ pass
@@ -0,0 +1,8 @@
1
+ <!-- Generated by aug spec. Edit the August source, then regenerate. -->
2
+
3
+ # `contracts.aug`
4
+
5
+ <a id="symbol-CompressionError"></a>
6
+ ## `CompressionError` · class · [source](contracts.aug#L3)
7
+
8
+ It implements `Error`. It takes `code` as an integer, kept read-only and `message` as a string, kept read-only.