std.Build.Cache.addPrefix
pub fn addPrefix(cache: *Cache, directory: Directory) void
- Kind
- function
- Module
std.Build.Cache
Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The entries of std.Build.Cache in the Zig reference. This page has 101 cards.
pub fn addPrefix(cache: *Cache, directory: Directory) void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
This is 128 bits - Even with 2^54 cache entries, the probably of a collision would be under 10^-6.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn binToHex(bin_digest: BinDigest) HexDigest
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The type used for hashing file contents.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Initial state with random bytes, that can be copied.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn add(hh: *HashHelper, x: anytype) void
Convert the input value into bytes and record it as a dependency of the process being cached.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addBytes(hh: *HashHelper, bytes: []const u8) void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addBytesZ(hh: *HashHelper, bytes: [:0]const u8) void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addListOfBytes(hh: *HashHelper, list_of_bytes: []const []const u8) void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addOptional(hh: *HashHelper, optional: anytype) void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addOptionalBytes(hh: *HashHelper, optional_bytes: ?[]const u8) void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addOptionalListOfBytes(hh: *HashHelper, optional_list_of_bytes: ?[]const []const u8) void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn final(hh: *HashHelper) HexDigest
Returns a hex encoded hash of the inputs, mutating the state of the hasher.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn oneShot(bytes: []const u8) [hex_digest_len]u8
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn peek(hh: HashHelper) [hex_digest_len]u8
Returns a hex encoded hash of the inputs, without modifying state.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn peekBin(hh: HashHelper) BinDigest
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn release(lock: *Lock, io: Io) void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Format: a series of consecutive `Manifest.File`, followed by a final terminating zero byte to distinguish empty manifest file from manifest with zero files.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addDiscoveredDepFile(m: *Manifest, path: Path, diagnostic: ?*AddDiscoveredDepFileDiagnostic) AddDiscoveredDepFileError!void
Add a GNU make style dep file as a dependency of process being cached, after cache miss occurs.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addDiscoveredManifest(m: *Manifest, discovered: *const Manifest, prefix_map: [5]u8) Allocator.Error!void
Add the full set of paths from another `Manifest` as a dependency of process being cached, after cache miss occurs.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addDiscoveredPath(m: *Manifest, options: AddDiscoveredPathOptions) AddDiscoveredPathError!void
Add a file or directory as a dependency of process being cached, after cache miss occurs.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn format(this: @This(), w: *Io.Writer) Io.Writer.Error!void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addInputDepFile(m: *Manifest, path: Path, diagnostic: ?*DepTokenizer.Token) AddInputDepFileError!void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addInputPath(m: *Manifest, path: Path, options: AddInputPathOptions) Allocator.Error!InputPath.Index
Add a file or directory path as a dependency of process being cached.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addInputPathOptional(m: *Manifest, opt_path: ?Path, options: AddInputPathOptions) Allocator.Error!void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn borrowFiles(m: *const Manifest) SelfContainedFiles
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn check(man: *Manifest, diag: *CheckDiagnostic, parent_progress_node: std.Progress.Node) CheckError!CheckResult
Check the cache to see if the input exists in it.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn path(fo: FileOp, manifest: *const Manifest) Path
Returned `Path` references `Manifest.contents`.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fmt(diagnostic: CheckDiagnostic, manifest: *const Manifest) Format
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn format(this: @This(), w: *Io.Writer) Io.Writer.Error!void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn checkProgressless(man: *Manifest, diag: *CheckDiagnostic) CheckError!CheckResult
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fmt(check_result: CheckResult, manifest: *const Manifest) Format
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn format(this: @This(), w: *Io.Writer) Io.Writer.Error!void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn deinit(m: *Manifest) void
Releases the manifest file and frees any memory the Manifest was using. `Manifest.hit` must be called first.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The data per tracked input file that is stored in the manifest file.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Intentionally matches if the files are different only by flags other than prefix.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn eql(this: @This(), a_off: Offset, b_off: Offset, b_index: usize) bool
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn hash(this: @This(), off: Offset) u32
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Prefixes path names in encoded directory contents.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromStat(kind: Io.File.Kind) @This()
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Byte index within `Manifest.contents` where the entry starts.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn flagsAndPath(off: File.Offset, contents: []const u8) [:0]const u8
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn get(offset: Offset, contents: []u8) *File
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn getConst(offset: Offset, contents: []const u8) *const File
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn getFallible(offset: Offset, contents: []u8) error
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn getFallibleConst(offset: Offset, contents: []const u8) error
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn path(off: File.Offset, contents: []const u8) [:0]const u8
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn pathFallible(off: File.Offset, contents: []const u8) error
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn pathOrDot(off: File.Offset, contents: []const u8) [:0]const u8
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sizeOf(path_len: usize) usize
`path_len` does not include the null byte.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn finalize(m: *Manifest) !void
If `want_shared_lock` is true, this function automatically downgrades the lock from exclusive to shared.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn hitDigest(m: *Manifest) BinDigest
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn hitDigestHex(m: *Manifest) HexDigest
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Source files and directories whose prefix and relative path are included when computing the cache manifest digest.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn getHandle(this: @This(), file: *const File) Handle
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Index into `Manifest.input_paths`.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn contents(i: @This(), manifest: *const Manifest) []const u8
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn get(i: @This(), manifest: *const Manifest) InputPath
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn offset(i: @This(), manifest: *const Manifest) File.Offset
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn missDigest(m: *Manifest) BinDigest
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn missDigestHex(m: *Manifest) HexDigest
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn have(this: @This()) bool
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isDirectory(this: @This()) bool
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn populateFileSystemInputs(man: *const Manifest, buf: *std.ArrayList(u8)) Allocator.Error!void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn deinit(scf: *SelfContainedFiles, gpa: Allocator) void
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn path(scf: *const SelfContainedFiles, file_offset: File.Offset) [:0]const u8
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(other: Io.File.Stat) Stat
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn takeFiles(m: *Manifest) SelfContainedFiles
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn toOwnedLock(self: *Manifest) Lock
Obtain only the data needed to maintain a lock on the manifest file.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn obtain(cache: *Cache) Manifest
Be sure to call `Manifest.deinit` after successful initialization.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn prefixes(cache: *const Cache) []const Directory
std.Build.CacheSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.