Scarp v0.0.5-alpha.5 — प्रकाशित compiler prerelease
4 नवंबर 2026 को 11:59:57 UTC पर प्रकाशित। GitHub पर आधिकारिक release · निश्चित source commit 2eeed0aa52ccb59523307841ad8ffbd83f8911a8 · यह prerelease है, stable नहीं। Scarp executable अभी Rust में लिखा interpreter तथा tooling CLI है।
इस release में पहली बार project-directory module inspection उपलब्ध है। साथ में Rust embedding hosts के लिए प्रयोगात्मक C11 scalar code emitter भी है। यह emitter Scarp का native compile CLI command नहीं है। alpha.5 CLI, alpha.5 इंस्टॉलेशन और C11 backend संदर्भ पढ़ें।
Alpha.5 की नई प्रकाशित सुविधाएँ
| सुविधा | प्रकाशित व्यवहार | सीमा |
|---|---|---|
| Project module inspection | scarp inspect modules --json DIRECTORY स्पष्ट Scarp.project पढ़कर entrypoint से schema-version-1 module inventory देता है |
सामान्य runtime statements नहीं चलाता; file mode alpha.3 में था |
| पुराना project inspection alias | scarp modules --json DIRECTORY वही static backend इस्तेमाल करता है |
नया नाम inspect modules बेहतर है |
| सीमित C11 source generation | Rust API scarp::c_backend::emit_c / emit_program से C11 source text मिलता है |
scarp compile CLI, executable या C compiler अपने आप नहीं मिलता |
| Generated scalar loops | सीमित repeat, while, integers/booleans, checked expressions तथा break/continue |
C backend केवल कुछ interpreter programs स्वीकारता है |
| Diagnostics तथा सुरक्षा | Unsupported emitter form पर E0049; गलत shifts पर E0046 |
Interpreter की पुरानी सुविधाएँ हटने का अर्थ नहीं |
प्रकाशित CLI चलाकर देखें
Windows x64, Linux x64 या macOS ARM64 का आधिकारिक alpha.5 archive तथा उसका checksum डाउनलोड करें। Extract करने के बाद उसी folder का executable चलाएँ। नीचे के example के लिए official archive के साथ आने वाला examples/ folder भी चाहिए।
scarp version
scarp verify examples/native_scalar_repeat.srp
scarp exec examples/native_scalar_repeat.srp
scarp create hello-scarp
scarp verify hello-scarp
scarp inspect modules --json hello-scarp
scarp inspect modules --json hello-scarp/src/main.srp
scarp launch hello-scarp
create से पहले hello-scarp नाम का folder मौजूद नहीं होना चाहिए। verify runtime statements चलाए बिना project जाँचता है। एक ही canonical entry file के लिए project और source-file inspection की inventory समान होनी चाहिए। सफल inspection stdout पर JSON देता है; गलत manifest stderr पर error और nonzero exit status देता है।
ध्यान दें: ये commands alpha.5 के लिए हैं। पुराने alpha.4 CLI में file module inspection था, लेकिन project-directory inspection नहीं था। alpha.4 project quickstart अभी भी create/verify/launch के पहले से मौजूद व्यवहार को समझने के लिए उपयोगी है।
प्रकाशित scalar-repeat उदाहरण
Compiler के examples/native_scalar_repeat.srp को interpreter चलाता है। यह interpreter और C output की तुलना वाले tests में भी शामिल है। इसका पूरा प्रकाशित source:
// Experimental C11 scalar subset: this file also runs in the Scarp interpreter.
// The native emitter is a Rust library API, not a Scarp CLI command.
var even_sum = 0;
repeat 5 as index {
if index % 2 == 0 {
even_sum += index;
}
}
print("even-index sum");
print(even_sum);
var triangle = 0;
repeat 4 as row {
repeat row as column {
triangle += 1;
}
}
print("triangle cells");
print(triangle);
repeat 4 as step {
if step == 1 { continue; }
if step == 3 { break; }
print(step);
}
प्रकाशित stdout fixture के बिल्कुल समान output:
even-index sum
6
triangle cells
6
0
2
यह zero-based loop index, nested repeat, continue, break और scalar integer गणना समझाता है। इसे सामान्य native compiler का उदाहरण न समझें।
C11 backend की सीमाएँ
प्रयोगात्मक emitter में सीमित scalars समर्थित हैं: integers, booleans, checked arithmetic, bit operations, scalar variables, if, while, counted repeat, और सीमित stdout print/println। Floats, functions/recursion, vectors/tiles, computed text, stderr output, कई arguments वाले output तथा unsupported intrinsics को यह C backend स्वीकार नहीं करता, भले interpreter उनमें से कुछ को समर्थित करता हो। Generated C को compile करना हो तो Rust host को अलग से C11 compiler उपलब्ध कराना होगा। C ABI अभी work/print budgets स्वीकारता है, interpreter के सभी options नहीं।
C11 संदर्भ में स्वीकृत syntax, resource caps और scarp build command क्यों नहीं है, पढ़ें।
आधिकारिक packages और प्रमाण
आधिकारिक GitHub release पर तीन native archives, उनकी तीन .sha256 files और SHA256SUMS (कुल सात uploaded assets) हैं। Platforms: Windows x64, Linux x64 (glibc), macOS Apple Silicon। Extract करने से पहले SHA-256 जाँचें; अन्य CPU/OS के लिए binary होने की कल्पना न करें। Exact source 2eeed0aa52ccb59523307841ad8ffbd83f8911a8 के आधार पर integrity जाँची गई। compiler का publication record देखें।
Package registry, dependency resolver, stable language spec, .srp के native executable और scarp compile command इस release में उपलब्ध नहीं हैं। पुराना alpha.4 guide और compatibility matrix ऐतिहासिक संदर्भ के रूप में अलग हैं।