From d159929e46106a975c7e213a1eedc83d0673f8df Mon Sep 17 00:00:00 2001 From: ske Date: Sun, 22 Feb 2026 01:07:20 -0300 Subject: [PATCH 1/2] Add docs for `#all_or_none` --- src/server/documentation.odin | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/documentation.odin b/src/server/documentation.odin index 7c26a374..0bd31e85 100644 --- a/src/server/documentation.odin +++ b/src/server/documentation.odin @@ -1011,8 +1011,10 @@ keywords_docs: map[string]string = { } directive_docs : map[string]string = { + // Record validation + "all_or_none" = "```odin\nall_or_none\n```\n\nThis tag can be applied to a `struct`. Prevents partial initialization of the struct, so either all or none of the fields must be filled.", // Record memory layout - "packed" = "```odin\n#packed\n```\n\nThis tag can be applied to a struct. Removes padding between fields that’s normally inserted to ensure all fields meet their type’s alignment requirements. Fields remain in source order.\n\nThis is useful where the structure is unlikely to be correctly aligned (the insertion rules for padding assume it is), or if the space-savings are more important or useful than the access speed of the fields.\n\nAccessing a field in a packed struct may require copying the field out of the struct into a temporary location, or using a machine instruction that doesn’t assume the pointer address is correctly aligned, in order to be performant or avoid crashing on some systems. (See `intrinsics.unaligned_load`.)", + "packed" = "```odin\n#packed\n```\n\nThis tag can be applied to a `struct`. Removes padding between fields that’s normally inserted to ensure all fields meet their type’s alignment requirements. Fields remain in source order.\n\nThis is useful where the structure is unlikely to be correctly aligned (the insertion rules for padding assume it is), or if the space-savings are more important or useful than the access speed of the fields.\n\nAccessing a field in a packed struct may require copying the field out of the struct into a temporary location, or using a machine instruction that doesn’t assume the pointer address is correctly aligned, in order to be performant or avoid crashing on some systems. (See `intrinsics.unaligned_load`.)", "raw_union" = "```odin\n#raw_union\n```\n\nThis tag can be applied to a `struct`. Struct’s fields will share the same memory space which serves the same functionality as `union`s in C language. Useful when writing bindings especially.", "align" = "```odin\n#align\n```\n\nThis tag can be applied to a `struct` or `union`. When `#align` is passed an integer `N` (as in `#align N`), it specifies that the `struct` will be aligned to `N` bytes. The `struct`’s fields will remain in source-order.", "no_nil" = "```odin\n#align\n```\n\nThis tag can be applied to a union to not allow `nil` values.", From 17e4fd67b2c53b4db7f3669e2b696d0b17d01920 Mon Sep 17 00:00:00 2001 From: ske Date: Sun, 22 Feb 2026 01:09:54 -0300 Subject: [PATCH 2/2] add missing # --- src/server/documentation.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/documentation.odin b/src/server/documentation.odin index 0bd31e85..125329db 100644 --- a/src/server/documentation.odin +++ b/src/server/documentation.odin @@ -1012,7 +1012,7 @@ keywords_docs: map[string]string = { directive_docs : map[string]string = { // Record validation - "all_or_none" = "```odin\nall_or_none\n```\n\nThis tag can be applied to a `struct`. Prevents partial initialization of the struct, so either all or none of the fields must be filled.", + "all_or_none" = "```odin\n#all_or_none\n```\n\nThis tag can be applied to a `struct`. Prevents partial initialization of the struct, so either all or none of the fields must be filled.", // Record memory layout "packed" = "```odin\n#packed\n```\n\nThis tag can be applied to a `struct`. Removes padding between fields that’s normally inserted to ensure all fields meet their type’s alignment requirements. Fields remain in source order.\n\nThis is useful where the structure is unlikely to be correctly aligned (the insertion rules for padding assume it is), or if the space-savings are more important or useful than the access speed of the fields.\n\nAccessing a field in a packed struct may require copying the field out of the struct into a temporary location, or using a machine instruction that doesn’t assume the pointer address is correctly aligned, in order to be performant or avoid crashing on some systems. (See `intrinsics.unaligned_load`.)", "raw_union" = "```odin\n#raw_union\n```\n\nThis tag can be applied to a `struct`. Struct’s fields will share the same memory space which serves the same functionality as `union`s in C language. Useful when writing bindings especially.",