zig/lib/std
Ryan Liptak 5f15acc463 Add preliminary support for Windows .manifest files
An embedded manifest file is really just XML data embedded as a RT_MANIFEST resource (ID = 24). Typically, the Windows-only 'Manifest Tool' (`mt.exe`) is used to embed manifest files, and `mt.exe` also seems to perform some transformation of the manifest data before embedding, but in testing it doesn't seem like the transformations are necessary to get the intended result.

So, to handle embedding manifest files, Zig now takes the following approach:

- Generate a .rc file with the contents `1 24 "path-to-manifest.manifest"`
- Compile that generated .rc file into a .res file
- Link the .res file into the final binary

This effectively achieves the same thing as `mt.exe` minus the validation/transformations of the XML data that it performs.

How this is used:

On the command line:
```
zig build-exe main.zig main.manifest
```
(on the command line, specifying a .manifest file when the target object format is not COFF is an error)

or in build.zig:

```
const exe = b.addExecutable(.{
    .name = "manifest-test",
    .root_source_file = .{ .path = "main.zig" },
    .target = target,
    .optimize = optimize,
    .win32_manifest = .{ .path = "main.manifest" },
});
```
(in build.zig, the manifest file is ignored if the target object format is not COFF)

Note: Currently, only one manifest file can be specified per compilation. This is because the ID of the manifest resource is currently always 1. Specifying multiple manifests could be supported if a way for the user to specify an ID for each manifest is added (manifest IDs must be a u16).

Closes #17406

options
2023-10-15 13:33:16 -07:00
..
atomic write function types consistently with a space before fn keyword 2023-09-19 15:15:05 +03:00
Build Add preliminary support for Windows .manifest files 2023-10-15 13:33:16 -07:00
c Merge pull request #17341 from rzezeski/illumos-updates 2023-10-03 11:04:41 -07:00
compress
crypto Add illumos OS tag 2023-10-02 15:31:49 -06:00
dwarf Add illumos OS tag 2023-10-02 15:31:49 -06:00
event Add a missing period in Future's description 2023-10-14 11:20:11 +03:00
fmt
fs Merge pull request #17392 from ziglang/fetch 2023-10-09 11:47:37 -07:00
hash std/hash: perform iterative + smhasher tests at comptime 2023-09-02 16:58:03 +12:00
heap GeneralPurposeAllocator.searchBucket: check current bucket before searching the list 2023-10-04 02:55:54 -07:00
http std.simd: return comptime_int from suggestVectorSize 2023-10-13 16:58:05 +03:00
io std: add type-erased reader; base GenericReader on it 2023-10-03 14:55:17 -07:00
json std.json: add fmt function (#17055) 2023-09-13 18:24:59 -04:00
math std.math: add nextAfter (#16894) 2023-10-06 14:44:47 -04:00
mem mem: explicit dupe and dupeZ error on Allocator 2023-09-07 21:56:57 +03:00
meta
net std.net: Fix IPv6 address parsing for single digit 2023-09-06 11:14:24 +03:00
os Add pause() to linux.zig 2023-10-06 11:49:31 -07:00
rand Remove @fabs, fabs and absCast/Int from std lib 2023-09-27 11:24:28 -07:00
sort
target nvptx: omit sm_90a from the CPU target features for now 2023-09-19 09:37:53 -07:00
testing std: enable FailingAllocator to fail on resize 2023-09-06 19:06:32 +03:00
Thread
time
tz
unicode
valgrind valgrind.memcheck: fix makeMem*() 2023-10-03 02:51:01 -07:00
zig drop for loop syntax upgrade mechanisms 2023-10-13 03:43:54 -07:00
array_hash_map.zig std: add unstable sorting to array hash maps 2023-10-08 16:54:31 -07:00
array_list.zig Improve (Unmanaged)ArrayList.insert 2023-09-30 16:17:22 -07:00
ascii.zig
atomic.zig
base64.zig Optimize std.base64.standard.Encoder.encode 2023-08-29 16:00:31 -04:00
bit_set.zig
BitStack.zig
bounded_array.zig
buf_map.zig
buf_set.zig
Build.zig Add preliminary support for Windows .manifest files 2023-10-15 13:33:16 -07:00
builtin.zig std.os.uefi: reorganize namespaces 2023-08-24 22:38:47 -07:00
c.zig Add illumos OS tag 2023-10-02 15:31:49 -06:00
child_process.zig Sema: add @errorCast which works for both error sets and error unions 2023-10-01 17:00:01 +03:00
coff.zig std.coff: Fixed compile error. 2023-09-02 00:18:53 +02:00
compress.zig
comptime_string_map.zig ComptimeStringMap: Add version that takes an equality function 2023-09-14 11:03:15 -07:00
crypto.zig
debug.zig Add illumos OS tag 2023-10-02 15:31:49 -06:00
dwarf.zig std: remove some unused imports (#16710) 2023-08-06 15:18:50 -04:00
dynamic_library.zig Add illumos OS tag 2023-10-02 15:31:49 -06:00
elf.zig std: remove some unused imports (#16710) 2023-08-06 15:18:50 -04:00
enums.zig Allow empty enum to be used in EnumSet/EnumMap 2023-09-28 21:48:39 +00:00
event.zig
fifo.zig std: remove some unused imports (#16710) 2023-08-06 15:18:50 -04:00
fmt.zig Remove @fabs, fabs and absCast/Int from std lib 2023-09-27 11:24:28 -07:00
fs.zig Merge pull request #17341 from rzezeski/illumos-updates 2023-10-03 11:04:41 -07:00
hash.zig
hash_map.zig std: remove some unused imports (#16710) 2023-08-06 15:18:50 -04:00
heap.zig std: remove some unused imports (#16710) 2023-08-06 15:18:50 -04:00
http.zig std.http: add identity to content encodings (#16493) 2023-09-26 17:16:40 -04:00
Ini.zig
io.zig std: add type-erased reader; base GenericReader on it 2023-10-03 14:55:17 -07:00
json.zig std.json: add fmt function (#17055) 2023-09-13 18:24:59 -04:00
leb128.zig
linked_list.zig std: Move TailQueue alias to correct namespace 2023-08-28 17:41:37 -07:00
log.zig
macho.zig std.macho: remove alignment from LoadCommandIterator 2023-10-03 14:55:17 -07:00
math.zig std.math: add nextAfter (#16894) 2023-10-06 14:44:47 -04:00
mem.zig std.simd: return comptime_int from suggestVectorSize 2023-10-13 16:58:05 +03:00
meta.zig Remove @fabs, fabs and absCast/Int from std lib 2023-09-27 11:24:28 -07:00
multi_array_list.zig std: add unstable sorting to array hash maps 2023-10-08 16:54:31 -07:00
net.zig std.net: Fix IPv6 address parsing for single digit 2023-09-06 11:14:24 +03:00
once.zig
os.zig Add filled_sigset to os.zig 2023-10-06 11:49:31 -07:00
packed_int_array.zig
pdb.zig
priority_dequeue.zig Update docs of PriorityQueue.iterator() and PriorityDeque.iterator() 2023-10-12 04:48:22 +03:00
priority_queue.zig Update docs of PriorityQueue.iterator() and PriorityDeque.iterator() 2023-10-12 04:48:22 +03:00
process.zig CLI: finish updating module API usage 2023-10-08 16:54:31 -07:00
Progress.zig Fix minor typo in the description of Progress 2023-10-13 00:44:30 +03:00
rand.zig
RingBuffer.zig
segmented_list.zig
SemanticVersion.zig
simd.zig std.simd: return comptime_int from suggestVectorSize 2023-10-13 16:58:05 +03:00
sort.zig std: add unstable sorting to array hash maps 2023-10-08 16:54:31 -07:00
start.zig lib: Fix asm code in _start for SPARC 2023-10-12 16:13:32 -07:00
start_windows_tls.zig
std.zig std.cstr: remove deprecated namespace 2023-10-10 02:08:03 +03:00
tar.zig std.tar: fix creation of symlinks with omit_empty_directories 2023-10-08 16:54:31 -07:00
target.zig illumos: fix dynamic linker path 2023-10-02 16:37:37 -06:00
testing.zig std.testing: expectEqualDeep() - support self-referential structs 2023-09-23 20:25:57 +00:00
Thread.zig Add illumos OS tag 2023-10-02 15:31:49 -06:00
time.zig
treap.zig Treap: do not set key to undefined in remove to allow re-use of removed nodes 2023-10-03 01:21:51 -07:00
tz.zig
unicode.zig std.simd: return comptime_int from suggestVectorSize 2023-10-13 16:58:05 +03:00
Uri.zig Allow only relative paths. 2023-09-29 00:32:43 -07:00
valgrind.zig Fix compilation failure in valgrind.zig 2023-10-12 10:17:49 -07:00
wasm.zig
zig.zig make Package.Path support string escape formatting 2023-10-08 16:54:31 -07:00