Scoop API

scoop:scoop.core:0.1.0

scoop.compiler

API

  • struct EmbeddedDir

    An immutable file table. Lookup returns the first exact path match, or None. Lookup does not expand globs, normalize paths, or access the file system.

  • struct EmbeddedFile

    One immutable file with its logical path relative to the included directory.

  • function env

    Reads a SCOOP_-prefixed environment variable while compiling this Cone. Missing values return None; an empty value returns Some(""). The name must be a constant String with the case-sensitive SCOOP_ prefix, without '=' or NUL. Invalid names and non-Unicode values are compile errors. Reads the compiler host environment, including when cross-compiling. The result is embedded in the artifact; runtime environment changes do not affect it. This intrinsic cannot be used as a function reference.

  • function includeBytes

    Embeds the exact bytes of a file as an immutable Array. The constant path is relative to this call's source directory. Both the path and its resolved symlink target must stay inside the Cone directory. The file is read at compile time. This intrinsic has no function reference.

  • function includeDir

    Embeds selected files from a directory inside the defining Cone. The constant path is relative to this call's source directory. Every entry and resolved symlink target must stay inside the Cone, even when excluded. Include and exclude are array literals of constant String patterns. Include patterns form a union; exclude patterns remove matches. Matching uses full, case-sensitive relative paths with '/' separators. '*' stays in a component; '**' spans zero or more directory levels, including the root directory. Defaults include all files, including hidden files; no gitignore is applied. Files are ordered by relative path in UTF-8 byte order. Empty directories are omitted. This compile-time intrinsic cannot be used as a function reference.

  • function includeStr

    Embeds the exact UTF-8 contents of a file inside the defining Cone. The constant path is relative to this call's source directory. Both the path and its resolved symlink target must stay inside the Cone directory. Invalid UTF-8 is a compile error; BOM and line endings are preserved. The file is read at compile time. This intrinsic has no function reference.