struct Options [src]

Fields

source_dir: LazyPath
install_dir: std.Build.InstallDir
install_subdir: []const u8
exclude_extensions: []const []const u8 = &.{}File paths which end in any of these suffixes will be excluded from being installed.
include_extensions: ?[]const []const u8 = nullOnly file paths which end in any of these suffixes will be included in installation. null means all suffixes are valid for this option. exclude_extensions take precedence over include_extensions
blank_extensions: []const []const u8 = &.{}File paths which end in any of these suffixes will result in empty files being installed. This is mainly intended for large test.zig files in order to prevent needless installation bloat. However if the files were not present at all, then @import("test.zig") would be a compile error.

Source

pub const Options = struct { source_dir: LazyPath, install_dir: std.Build.InstallDir, install_subdir: []const u8, /// File paths which end in any of these suffixes will be excluded /// from being installed. exclude_extensions: []const []const u8 = &.{}, /// Only file paths which end in any of these suffixes will be included /// in installation. `null` means all suffixes are valid for this option. /// `exclude_extensions` take precedence over `include_extensions` include_extensions: ?[]const []const u8 = null, /// File paths which end in any of these suffixes will result in /// empty files being installed. This is mainly intended for large /// test.zig files in order to prevent needless installation bloat. /// However if the files were not present at all, then /// `@import("test.zig")` would be a compile error. blank_extensions: []const []const u8 = &.{}, fn dupe(opts: Options, b: *std.Build) Options { return .{ .source_dir = opts.source_dir.dupe(b), .install_dir = opts.install_dir.dupe(b), .install_subdir = b.dupe(opts.install_subdir), .exclude_extensions = b.dupeStrings(opts.exclude_extensions), .include_extensions = if (opts.include_extensions) |incs| b.dupeStrings(incs) else null, .blank_extensions = b.dupeStrings(opts.blank_extensions), }; } }