본문으로 건너뛰기
토파즈6.0 · 출시 전
다운로드 →

문서 검색

명세 6.0

방향키로 결과를 고르고 Enter를 눌러 여세요.

API 이름, 진단 번호, 규칙 또는 프로젝트 주제를 입력하세요.

    라이브러리

    std.lispex.admitPackage

    Validate supplied package bytes and the supported execution envelope.

    admitPackage(input: LispexPackageInput, limits: LispexHostLimits) -> Result<LispexPackage, LispexBoundaryReport>
    수신자
    해당 없음
    최소 인자 수
    2
    최대 인자 수
    2

    Declaration and parameters

    링크

    사용 조건

    기본 포함 · 아니요

    Import std.lispex from an application package with a verified lock. Packages with [lispex] require --locked. Application profile topaz/lispex-decision-application/1 uses evaluator profile lispex/r7rs-rule-embedded-core/1. Application profile topaz/lispex-decision-application/2 uses evaluator profile lispex/r7rs-rule-current-profile-bounded/1.

    The generated-module resolver gate starts at language mode 5.18. Compatibility of this API with earlier released editions remains Pending. Target deployment conditions are native (native-only), web (web-isolated-workers), web-worker (web-isolated-workers). Runtime payload follows checker-reached rules. An empty reached-rule set includes no runtime payload. Application quotas are required. Lock-only packages do not receive these application modules.

    수신자

    매개변수 제약

    std.lispex is the Topaz 6.0 host module. Importing it does not start a guest or grant guest capabilities. std.lispex.rules additionally requires the verified application lock that determines its generated names.

    LispexPackageInput contains the manifest, evaluator artifact, standard library artifact and every declared dependency as immutable bytes. Each LispexPackagePart pairs dependency bytes with an exact logical name declared by the manifest. Admission computes and verifies the identity promised for that name. Arrays and records at call entry follow collection value semantics.

    admitPackage requires complete finite LispexHostLimits. Validate the limit record before parsing artifacts. Reject negative or unrepresentable fields without beginning admission. No package handle is returned on refusal.

    Check manifest structure and declared identities before using a component. Verify evaluator interface and exports, standard library, ABI, codec, language semantics, Unicode semantics, selected profile and resource model. Every required component must be supplied exactly once and match its declared identity.

    Dependencies resolve from the supplied package closure. Reject missing or duplicate components, identity collisions and incompatible contracts. Do not consult the working directory, environment, network, host registry or another installed evaluator as a substitute.

    Evaluator artifacts must expose the selected data only interface. Reject host function imports and any dependency that obtains ambient authority. A callback advertised as pure is still a callback and is rejected. No import can turn a guest value into a host object reference.

    The host checks the physical envelope needed to honor the selected semantic limits and supported package contracts. Refuse an unsupported target or insufficient envelope before guest entry. Do not silently lower limits or retry another engine.

    Return Ok of an immutable LispexPackage after all checks succeed. The handle records the exact verified contract identities and closure. Refusal returns Err of LispexBoundaryReport. The checks may fail deterministically on supplied data or operationally on the physical host, but neither case is a canonical evaluation outcome.

    applicationPackage reads an already admitted handle associated with the current verified application lock. It performs no parsing, preparation, guest execution or discovery. Without such a handle it returns a no-application-package report. Startup admission has its own recorded finite host limits.

    The same package bytes, supported contract and finite budget produce the same validation decision unless the physical host cannot supply the declared envelope. Admission success alone proves neither issuer trust nor application permission to act.

    The package container, ABI bytes and identity encodings remain Lispex versioned contracts. A supported admitted version is required. This API does not assign 1.21 artifact formats to Lispex 2.0.

    결과

    The declared result type is Result<LispexPackage, LispexBoundaryReport>.

    효과

    실패

    Result and effects

    링크

    Validate supplied package bytes and the supported execution envelope.

    Why

    링크

    The admission contract gives this operation one explicit input boundary and preserves the distinct result and failure cases.

    Related entries

    링크

    std.lispex →

    Admit complete packages without ambient authority

    링크
    규칙topaz.stdlib.contract.lispex-admission.rule

    Admit complete packages without ambient authority

    std.lispex is the Topaz 6.0 host module. Importing it does not start a guest or grant guest capabilities. std.lispex.rules additionally requires the verified application lock that determines its generated names.

    LispexPackageInput contains the manifest, evaluator artifact, standard library artifact and every declared dependency as immutable bytes. Each LispexPackagePart pairs dependency bytes with an exact logical name declared by the manifest. Admission computes and verifies the identity promised for that name. Arrays and records at call entry follow collection value semantics.

    admitPackage requires complete finite LispexHostLimits. Validate the limit record before parsing artifacts. Reject negative or unrepresentable fields without beginning admission. No package handle is returned on refusal.

    Check manifest structure and declared identities before using a component. Verify evaluator interface and exports, standard library, ABI, codec, language semantics, Unicode semantics, selected profile and resource model. Every required component must be supplied exactly once and match its declared identity.

    Dependencies resolve from the supplied package closure. Reject missing or duplicate components, identity collisions and incompatible contracts. Do not consult the working directory, environment, network, host registry or another installed evaluator as a substitute.

    Evaluator artifacts must expose the selected data only interface. Reject host function imports and any dependency that obtains ambient authority. A callback advertised as pure is still a callback and is rejected. No import can turn a guest value into a host object reference.

    The host checks the physical envelope needed to honor the selected semantic limits and supported package contracts. Refuse an unsupported target or insufficient envelope before guest entry. Do not silently lower limits or retry another engine.

    Return Ok of an immutable LispexPackage after all checks succeed. The handle records the exact verified contract identities and closure. Refusal returns Err of LispexBoundaryReport. The checks may fail deterministically on supplied data or operationally on the physical host, but neither case is a canonical evaluation outcome.

    applicationPackage reads an already admitted handle associated with the current verified application lock. It performs no parsing, preparation, guest execution or discovery. Without such a handle it returns a no-application-package report. Startup admission has its own recorded finite host limits.

    The same package bytes, supported contract and finite budget produce the same validation decision unless the physical host cannot supply the declared envelope. Admission success alone proves neither issuer trust nor application permission to act.

    The package container, ABI bytes and identity encodings remain Lispex versioned contracts. A supported admitted version is required. This API does not assign 1.21 artifact formats to Lispex 2.0.

    이유

    Supplying the complete closure makes package admission an explicit host decision. A package handle preserves that decision without reopening discovery at every call. Inspecting a current application binding and admitting new bytes are different intentions.

    Admit supplied package bytes with finite host limits

    링크
    src/main.tpzAdmit supplied package bytes with finite host limits플레이그라운드 열기 →
    1. import std.bytes { Bytes }
    2. import std.lispex {
    3. LispexPackageInput,
    4. LispexPackage,
    5. LispexBoundaryReport,
    6. LispexHostLimits,
    7. admitPackage,
    8. applicationPackage,
    9. }
    10. function admit(input: LispexPackageInput, limits: LispexHostLimits) -> Result<LispexPackage, LispexBoundaryReport> {
    11. return admitPackage(input, limits)
    12. }
    13. function current() -> Result<LispexPackage, LispexBoundaryReport> {
    14. return applicationPackage()
    15. }
    16. export function main(args: Array<string>, stdin: string) -> Result<int, string> {
    17. return Ok(0)
    18. }
    기대 출력종료 코드 0
    표준 출력 없음.
    $ topaz check --root . --locked --format json · 대상 제품 5.21.3
    기대 결과

    기대 결과

    검사가 프로그램을 받아들입니다. 종료 코드 0.

    Use a verified Lispex application package supplied through TOPAZ_LISPEX_APPLICATION. This example specifies the Lispex 2.0 behavior. The product scope remains the public 5.21.3 observation scope.

    메뉴

    다운로드 →