@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,29 @@
1
+ {
2
+ "format": 1,
3
+ "profile": "aug-native-abi-1",
4
+ "resources": [],
5
+ "functions": [
6
+ {
7
+ "module": "api",
8
+ "name": "_hash",
9
+ "symbol": "aug_blake3_hash_v1",
10
+ "params": [
11
+ {
12
+ "name": "input",
13
+ "kind": "bytes"
14
+ }
15
+ ],
16
+ "result": {
17
+ "kind": "utf8",
18
+ "release": "aug_blake3_text_release_v1"
19
+ },
20
+ "error": "contracts.HashError",
21
+ "callingConvention": "C",
22
+ "status": "i32",
23
+ "uses": [],
24
+ "changes": [],
25
+ "thread": "caller",
26
+ "retainsInputs": false
27
+ }
28
+ ]
29
+ }
@@ -0,0 +1,14 @@
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 HashError from contracts
4
+ extern C _hash(Bytes input) returns string unless HashError
5
+ /** Return a lowercase 64-character BLAKE3 digest, computed by the Rust crate. */
6
+ hash(Bytes input) returns string:
7
+ unsafe:
8
+ return _hash(input)
9
+
10
+ test hash:
11
+ when vectors:
12
+ it hashes_abc:
13
+ Bytes input = "abc".bytes()
14
+ assert(hash(input) == "6437b3ac38465133ffb63b75273a8db548c558465d79db03fd359c6cd5bd9d85")
@@ -0,0 +1,34 @@
1
+ <!-- Generated by aug spec. Edit the August source, then regenerate. -->
2
+
3
+ # `api.aug`
4
+
5
+ <a id="symbol-hash"></a>
6
+ ## `hash` · [source](api.aug#L6)
7
+
8
+ Return a lowercase 64-character BLAKE3 digest, computed by the Rust crate. It takes `input` as `Bytes`. Failures can raise [`HashError`](contracts.aug.md#symbol-HashError).
9
+
10
+ Within an unsafe block, it returns [`_hash`](api.aug.md#symbol-_hash) with `input`. Native operations must satisfy their declared C contracts.
11
+
12
+ <a id="symbol-_hash"></a>
13
+ ## `_hash` · [source](api.aug#L4)
14
+
15
+ It is private to its defining scope. It takes `input` as `Bytes`. It returns `string`. Failures can raise [`HashError`](contracts.aug.md#symbol-HashError).
16
+
17
+ Native implementation: `@greenpandastudios/aug-blake3@0.1.3`, `1.8.7`. 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 `3bf8dea97cde70a03021bf77ea08314d6d37fe7b4935ff16030b2ab929c21279`). It calls `aug_blake3_hash_v1` through the C ABI on the caller thread; a blocking native call blocks that thread. August copies the returned buffer, then calls `aug_blake3_text_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.
18
+
19
+ <a id="symbol-test hash"></a>
20
+ ## `test hash` · [source](api.aug#L10)
21
+
22
+ Tests [`hash`](api.aug.md#symbol-hash). Each case gets fresh setup and dependencies.
23
+
24
+ ### `vectors`
25
+
26
+ #### `hashes_abc` · [source](api.aug#L12)
27
+
28
+ It sets `input` of type `Bytes` to `bytes` on `"abc"`. The test requires [`hash`](api.aug.md#symbol-hash) with `input` equals `"6437b3ac38465133ffb63b75273a8db548c558465d79db03fd359c6cd5bd9d85"`.
29
+
30
+ ## Dependencies
31
+
32
+ It uses [`HashError`](contracts.aug.md#symbol-HashError) from `contracts`.
33
+
34
+ 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
+ HashError(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-HashError"></a>
6
+ ## `HashError` · 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.
@@ -0,0 +1,29 @@
1
+ {
2
+ "format": 1,
3
+ "profile": "aug-native-abi-1",
4
+ "resources": [],
5
+ "functions": [
6
+ {
7
+ "module": "api",
8
+ "name": "_hash",
9
+ "symbol": "aug_blake3_hash_v1",
10
+ "params": [
11
+ {
12
+ "name": "input",
13
+ "kind": "bytes"
14
+ }
15
+ ],
16
+ "result": {
17
+ "kind": "utf8",
18
+ "release": "aug_blake3_text_release_v1"
19
+ },
20
+ "error": "contracts.HashError",
21
+ "callingConvention": "C",
22
+ "status": "i32",
23
+ "uses": [],
24
+ "changes": [],
25
+ "thread": "caller",
26
+ "retainsInputs": false
27
+ }
28
+ ]
29
+ }
@@ -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 the real Rust BLAKE3 implementation through a tagged public package. Keep dependency versions and known hash vectors explicit. 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,253 @@
1
+ {
2
+ "format": 1,
3
+ "compiler": "0.21.0",
4
+ "specifications": {
5
+ "url_0e8c1689393af3a98565": "https://github.com/GreenPandaStudios/aug-blake3#v0.1.3"
6
+ },
7
+ "roots": {
8
+ "url_0e8c1689393af3a98565": "packages/url_0e8c1689393af3a98565"
9
+ },
10
+ "npm": {},
11
+ "git": [
12
+ {
13
+ "request": "https://github.com/GreenPandaStudios/aug-blake3#v0.1.3",
14
+ "repository": "https://github.com/GreenPandaStudios/aug-blake3.git",
15
+ "revision": "v0.1.3",
16
+ "folder": "",
17
+ "commit": "e4ef39bdc89892e7b0644f5fa03ca4dc8b8042ae"
18
+ }
19
+ ],
20
+ "packages": [
21
+ {
22
+ "path": "packages/url_0e8c1689393af3a98565",
23
+ "name": "@greenpandastudios/aug-blake3",
24
+ "version": "0.1.3",
25
+ "source": "src",
26
+ "digest": "762d5c61efd539981a9cb9d8a1b838b7f0cf26b50373f334c163d6ab4fe6ef14",
27
+ "dependencies": {},
28
+ "native": {
29
+ "profile": "aug-native-abi-1",
30
+ "bindings": "native.abi.json",
31
+ "bindingsSha256": "3bf8dea97cde70a03021bf77ea08314d6d37fe7b4935ff16030b2ab929c21279",
32
+ "upstream": {
33
+ "repository": "https://github.com/BLAKE3-team/BLAKE3",
34
+ "version": "1.8.7",
35
+ "sourceRevision": "6d9e454fc11f76977dc803893aff6304ed33d6a26efae8696573bea74baa27ae"
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-blake3/releases/download/v0.1.3/native-linux-arm64.tar.gz",
49
+ "sha256": "69e4de7c1928254c2fb285b0ecd557c4dd1346e9207d0b7ef56e00957caae748",
50
+ "maximumDownloadBytes": 90298456,
51
+ "maximumUnpackedBytes": 90976771,
52
+ "link": {
53
+ "kind": "dynamic",
54
+ "libraries": [
55
+ "lib/libaug_blake3.so.1"
56
+ ]
57
+ },
58
+ "runtime": {
59
+ "files": [
60
+ "lib/libaug_blake3.so.1",
61
+ "lib/libgcc_s.so.1"
62
+ ],
63
+ "closureManifest": "runtime-files.json",
64
+ "relocation": "loader-relative"
65
+ },
66
+ "components": [
67
+ {
68
+ "id": "https://github.com/BLAKE3-team/BLAKE3",
69
+ "version": "1.8.7",
70
+ "compatibilityKey": "aug-blake3-runtime",
71
+ "linkage": "static",
72
+ "required": true
73
+ },
74
+ {
75
+ "id": "gcc-runtime",
76
+ "version": "12.2.0-14+deb12u1",
77
+ "compatibilityKey": "gcc-runtime",
78
+ "linkage": "dynamic",
79
+ "required": true
80
+ }
81
+ ],
82
+ "fileManifest": "files.json",
83
+ "provenance": "provenance.json",
84
+ "notices": "THIRD_PARTY_NOTICES.md"
85
+ },
86
+ {
87
+ "id": "linux-x64",
88
+ "target": {
89
+ "triple": "x86_64-unknown-linux-gnu",
90
+ "os": "linux",
91
+ "arch": "x64",
92
+ "minimumLibc": "2.36",
93
+ "cpuBaseline": "x86-64",
94
+ "libc": "glibc"
95
+ },
96
+ "url": "https://github.com/GreenPandaStudios/aug-blake3/releases/download/v0.1.3/native-linux-x64.tar.gz",
97
+ "sha256": "67e682239e6133a29e381ee2b0c59beb3070f7cb049a487d0709e4be9714232f",
98
+ "maximumDownloadBytes": 90330447,
99
+ "maximumUnpackedBytes": 90846850,
100
+ "link": {
101
+ "kind": "dynamic",
102
+ "libraries": [
103
+ "lib/libaug_blake3.so.1"
104
+ ]
105
+ },
106
+ "runtime": {
107
+ "files": [
108
+ "lib/libaug_blake3.so.1",
109
+ "lib/libgcc_s.so.1"
110
+ ],
111
+ "closureManifest": "runtime-files.json",
112
+ "relocation": "loader-relative"
113
+ },
114
+ "components": [
115
+ {
116
+ "id": "https://github.com/BLAKE3-team/BLAKE3",
117
+ "version": "1.8.7",
118
+ "compatibilityKey": "aug-blake3-runtime",
119
+ "linkage": "static",
120
+ "required": true
121
+ },
122
+ {
123
+ "id": "gcc-runtime",
124
+ "version": "12.2.0-14+deb12u1",
125
+ "compatibilityKey": "gcc-runtime",
126
+ "linkage": "dynamic",
127
+ "required": true
128
+ }
129
+ ],
130
+ "fileManifest": "files.json",
131
+ "provenance": "provenance.json",
132
+ "notices": "THIRD_PARTY_NOTICES.md"
133
+ },
134
+ {
135
+ "id": "macos-arm64",
136
+ "target": {
137
+ "triple": "aarch64-apple-darwin",
138
+ "os": "macos",
139
+ "arch": "arm64",
140
+ "minimumOS": "14.0",
141
+ "cpuBaseline": "armv8-a",
142
+ "libc": "libSystem"
143
+ },
144
+ "url": "https://github.com/GreenPandaStudios/aug-blake3/releases/download/v0.1.3/native-macos-arm64.tar.gz",
145
+ "sha256": "2eae982e532845a67077abe9918c4eb736775fcbddfb6eef552303400687ffa5",
146
+ "maximumDownloadBytes": 169406,
147
+ "maximumUnpackedBytes": 503261,
148
+ "link": {
149
+ "kind": "dynamic",
150
+ "libraries": [
151
+ "lib/libaug_blake3.1.dylib"
152
+ ]
153
+ },
154
+ "runtime": {
155
+ "files": [
156
+ "lib/libaug_blake3.1.dylib"
157
+ ],
158
+ "closureManifest": "runtime-files.json",
159
+ "relocation": "loader-relative"
160
+ },
161
+ "components": [
162
+ {
163
+ "id": "https://github.com/BLAKE3-team/BLAKE3",
164
+ "version": "1.8.7",
165
+ "compatibilityKey": "aug-blake3-runtime",
166
+ "linkage": "static",
167
+ "required": true
168
+ }
169
+ ],
170
+ "fileManifest": "files.json",
171
+ "provenance": "provenance.json",
172
+ "notices": "THIRD_PARTY_NOTICES.md"
173
+ }
174
+ ],
175
+ "sourceBuild": {
176
+ "recipe": "native/build.json",
177
+ "inputs": "native/sources.lock.json",
178
+ "tools": [
179
+ "Node 24+",
180
+ "Clang",
181
+ "macOS: Apple SDK",
182
+ "GNU/Linux: Docker with the pinned Debian 12 maintainer image and patchelf",
183
+ "Rust and Cargo 1.98.1"
184
+ ],
185
+ "automatic": false
186
+ }
187
+ }
188
+ }
189
+ ],
190
+ "native": {
191
+ "format": 1,
192
+ "targets": {
193
+ "aarch64-apple-darwin/macos14": {
194
+ "target": {
195
+ "triple": "aarch64-apple-darwin",
196
+ "os": "macos",
197
+ "arch": "arm64",
198
+ "cpuBaseline": "armv8-a",
199
+ "libc": "libSystem",
200
+ "minimumOS": "26.0"
201
+ },
202
+ "packages": [
203
+ {
204
+ "sourcePackage": "@greenpandastudios/aug-blake3@0.1.3",
205
+ "sourceDigest": "762d5c61efd539981a9cb9d8a1b838b7f0cf26b50373f334c163d6ab4fe6ef14",
206
+ "sourceCommit": "e4ef39bdc89892e7b0644f5fa03ca4dc8b8042ae",
207
+ "contractSha256": "3bf8dea97cde70a03021bf77ea08314d6d37fe7b4935ff16030b2ab929c21279",
208
+ "artifact": {
209
+ "id": "macos-arm64",
210
+ "target": {
211
+ "triple": "aarch64-apple-darwin",
212
+ "os": "macos",
213
+ "arch": "arm64",
214
+ "minimumOS": "14.0",
215
+ "cpuBaseline": "armv8-a",
216
+ "libc": "libSystem"
217
+ },
218
+ "url": "https://github.com/GreenPandaStudios/aug-blake3/releases/download/v0.1.3/native-macos-arm64.tar.gz",
219
+ "sha256": "2eae982e532845a67077abe9918c4eb736775fcbddfb6eef552303400687ffa5",
220
+ "maximumDownloadBytes": 169406,
221
+ "maximumUnpackedBytes": 503261,
222
+ "link": {
223
+ "kind": "dynamic",
224
+ "libraries": [
225
+ "lib/libaug_blake3.1.dylib"
226
+ ]
227
+ },
228
+ "runtime": {
229
+ "files": [
230
+ "lib/libaug_blake3.1.dylib"
231
+ ],
232
+ "closureManifest": "runtime-files.json",
233
+ "relocation": "loader-relative"
234
+ },
235
+ "components": [
236
+ {
237
+ "id": "https://github.com/BLAKE3-team/BLAKE3",
238
+ "version": "1.8.7",
239
+ "compatibilityKey": "aug-blake3-runtime",
240
+ "linkage": "static",
241
+ "required": true
242
+ }
243
+ ],
244
+ "fileManifest": "files.json",
245
+ "provenance": "provenance.json",
246
+ "notices": "THIRD_PARTY_NOTICES.md"
247
+ }
248
+ }
249
+ ]
250
+ }
251
+ }
252
+ }
253
+ }
@@ -0,0 +1,11 @@
1
+ // aug-spec: "hashing.aug.md" explains this file. Read it before changes; refresh with aug spec.
2
+ import HashError and hash from "https://github.com/GreenPandaStudios/aug-blake3#v0.1.3"
3
+
4
+ /** Hash UTF-8 text with the real Rust BLAKE3 implementation. */
5
+ hashText(string value) returns string unless HashError:
6
+ return hash(input=value.bytes())
7
+
8
+ test hashText:
9
+ when vectors:
10
+ it matches_the_published_abc_vector:
11
+ assert(hashText(value="abc") == "6437b3ac38465133ffb63b75273a8db548c558465d79db03fd359c6cd5bd9d85")
@@ -0,0 +1,25 @@
1
+ <!-- Generated by aug spec. Edit the August source, then regenerate. -->
2
+
3
+ # `hashing.aug`
4
+
5
+ <a id="symbol-hashText"></a>
6
+ ## `hashText` · [source](hashing.aug#L5)
7
+
8
+ Hash UTF-8 text with the real Rust BLAKE3 implementation. It takes `value` as a string. Failures can raise [`HashError`](.aug-spec/packages/%40greenpandastudios/aug-blake3/0.1.3/contracts.aug.md#symbol-HashError). It returns [`hash`](.aug-spec/packages/%40greenpandastudios/aug-blake3/0.1.3/api.aug.md#symbol-hash) with `input` from the UTF-8 bytes of `value`.
9
+
10
+ <a id="symbol-test hashText"></a>
11
+ ## `test hashText` · [source](hashing.aug#L8)
12
+
13
+ Tests [`hashText`](hashing.aug.md#symbol-hashText). Each case gets fresh setup and dependencies.
14
+
15
+ ### `vectors`
16
+
17
+ #### `matches_the_published_abc_vector` · [source](hashing.aug#L10)
18
+
19
+ The test requires [`hashText`](hashing.aug.md#symbol-hashText) with `value` `"abc"` equals `"6437b3ac38465133ffb63b75273a8db548c558465d79db03fd359c6cd5bd9d85"`.
20
+
21
+ ## Dependencies
22
+
23
+ It uses [`hash`](.aug-spec/packages/%40greenpandastudios/aug-blake3/0.1.3/api.aug.md#symbol-hash) and [`HashError`](.aug-spec/packages/%40greenpandastudios/aug-blake3/0.1.3/contracts.aug.md#symbol-HashError) from `https://github.com/GreenPandaStudios/aug-blake3#v0.1.3`.
24
+
25
+ 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 hashText from hashing
3
+ import HashError from "https://github.com/GreenPandaStudios/aug-blake3#v0.1.3"
4
+
5
+ try:
6
+ print(value=hashText(value="abc"))
7
+ catch HashError 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 [`hashText`](hashing.aug.md#symbol-hashText) with `value` `"abc"`. If this work raises [`HashError`](.aug-spec/packages/%40greenpandastudios/aug-blake3/0.1.3/contracts.aug.md#symbol-HashError) as `error`, it prints `error.message`.
8
+
9
+ ## Dependencies
10
+
11
+ It uses [`HashError`](.aug-spec/packages/%40greenpandastudios/aug-blake3/0.1.3/contracts.aug.md#symbol-HashError) (`message`) from `https://github.com/GreenPandaStudios/aug-blake3#v0.1.3`. It uses [`hashText`](hashing.aug.md#symbol-hashText) from `hashing`.
12
+
13
+ Built-in operations follow the [language reference](https://greenpandastudios.github.io/augscript/language-constructs).
@@ -0,0 +1,18 @@
1
+ {
2
+ "format": 1,
3
+ "files": [
4
+ ".aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/api.aug",
5
+ ".aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/api.aug.md",
6
+ ".aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/bindings.aug",
7
+ ".aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/bindings.aug.md",
8
+ ".aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/contracts.aug",
9
+ ".aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/contracts.aug.md",
10
+ ".aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/native.abi.json",
11
+ "main.aug.md",
12
+ "tensors.aug.md"
13
+ ],
14
+ "nativeDescriptors": {
15
+ ".aug-spec/packages/@greenpandastudios/aug-pytorch/0.1.4/native.abi.json": "f07b8cab89ad7cfe368edcd9daf87ecc810adb6a2eed1f446d7b71fb664e91f5"
16
+ },
17
+ "digest": "ce21763c52d4bd78af38c7a85b8dd29521c82ae9b8a112aab03c9cbe8e27e3e7"
18
+ }
@@ -0,0 +1,142 @@
1
+ {
2
+ "format": 1,
3
+ "profile": "aug-native-abi-1",
4
+ "resources": [
5
+ {
6
+ "module": "bindings",
7
+ "name": "Tensor",
8
+ "release": "aug_torch_tensor_release_v1"
9
+ }
10
+ ],
11
+ "functions": [
12
+ {
13
+ "module": "api",
14
+ "name": "_tensor",
15
+ "symbol": "aug_torch_tensor_from_f64_v1",
16
+ "params": [
17
+ {
18
+ "name": "values",
19
+ "kind": "f64-list"
20
+ }
21
+ ],
22
+ "result": {
23
+ "kind": "resource",
24
+ "resource": "bindings.Tensor"
25
+ },
26
+ "error": "contracts.TensorError",
27
+ "callingConvention": "C",
28
+ "status": "i32",
29
+ "uses": [],
30
+ "changes": [],
31
+ "thread": "caller",
32
+ "retainsInputs": false
33
+ },
34
+ {
35
+ "module": "api",
36
+ "name": "_add",
37
+ "symbol": "aug_torch_tensor_add_v1",
38
+ "params": [
39
+ {
40
+ "name": "left",
41
+ "kind": "resource",
42
+ "resource": "bindings.Tensor",
43
+ "ownership": "read"
44
+ },
45
+ {
46
+ "name": "right",
47
+ "kind": "resource",
48
+ "resource": "bindings.Tensor",
49
+ "ownership": "read"
50
+ }
51
+ ],
52
+ "result": {
53
+ "kind": "resource",
54
+ "resource": "bindings.Tensor"
55
+ },
56
+ "error": "contracts.TensorError",
57
+ "callingConvention": "C",
58
+ "status": "i32",
59
+ "uses": [],
60
+ "changes": [],
61
+ "thread": "caller",
62
+ "retainsInputs": false
63
+ },
64
+ {
65
+ "module": "api",
66
+ "name": "_sum",
67
+ "symbol": "aug_torch_tensor_sum_v1",
68
+ "params": [
69
+ {
70
+ "name": "tensor",
71
+ "kind": "resource",
72
+ "resource": "bindings.Tensor",
73
+ "ownership": "read"
74
+ }
75
+ ],
76
+ "result": {
77
+ "kind": "f64"
78
+ },
79
+ "error": "contracts.TensorError",
80
+ "callingConvention": "C",
81
+ "status": "i32",
82
+ "uses": [],
83
+ "changes": [],
84
+ "thread": "caller",
85
+ "retainsInputs": false
86
+ },
87
+ {
88
+ "module": "api",
89
+ "name": "_values",
90
+ "symbol": "aug_torch_tensor_values_v1",
91
+ "params": [
92
+ {
93
+ "name": "tensor",
94
+ "kind": "resource",
95
+ "resource": "bindings.Tensor",
96
+ "ownership": "read"
97
+ }
98
+ ],
99
+ "result": {
100
+ "kind": "f64-list",
101
+ "release": "aug_torch_values_release_v1"
102
+ },
103
+ "error": "contracts.TensorError",
104
+ "callingConvention": "C",
105
+ "status": "i32",
106
+ "uses": [],
107
+ "changes": [],
108
+ "thread": "caller",
109
+ "retainsInputs": false
110
+ },
111
+ {
112
+ "module": "api",
113
+ "name": "_liveTensors",
114
+ "symbol": "aug_probe_live_tensors_v1",
115
+ "params": [],
116
+ "result": {
117
+ "kind": "i64"
118
+ },
119
+ "callingConvention": "C",
120
+ "status": "direct",
121
+ "uses": [],
122
+ "changes": [],
123
+ "thread": "caller",
124
+ "retainsInputs": false
125
+ },
126
+ {
127
+ "module": "api",
128
+ "name": "_liveBuffers",
129
+ "symbol": "aug_probe_live_buffers_v1",
130
+ "params": [],
131
+ "result": {
132
+ "kind": "i64"
133
+ },
134
+ "callingConvention": "C",
135
+ "status": "direct",
136
+ "uses": [],
137
+ "changes": [],
138
+ "thread": "caller",
139
+ "retainsInputs": false
140
+ }
141
+ ]
142
+ }