DoxigAlpha

addBytesToSource

A path relative to the package root.

Be careful with this because it updates source files. This should not be used as part of the normal build process, but as a utility occasionally run by a developer with intent to modify source files and then commit those changes to version control.

Function parameters

Parameters

#
usf:*UpdateSourceFiles
bytes:[]const u8
sub_path:[]const u8

Type definitions in this namespace

Types

#

Functions in this namespace

Functions

#
addCopyFileToSource
A path relative to the package root.
addBytesToSource
A path relative to the package root.

= .update_source_files

Values

#
base_id
= .update_source_files

Source

Implementation

#
pub fn addBytesToSource(usf: *UpdateSourceFiles, bytes: []const u8, sub_path: []const u8) void {
    const b = usf.step.owner;
    usf.output_source_files.append(b.allocator, .{
        .contents = .{ .bytes = bytes },
        .sub_path = sub_path,
    }) catch @panic("OOM");
}