From 5a154a1775449a839d713e9adba8ebea4d6e06de Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Thu, 9 Oct 2025 14:41:22 +0200 Subject: [PATCH 1/3] Add more package lines for the docs --- core/compress/gzip/doc.odin | 5 +++-- core/compress/shoco/doc.odin | 2 ++ core/compress/shoco/model.odin | 4 ++-- core/compress/shoco/shoco.odin | 6 +++--- core/compress/zlib/doc.odin | 5 +++-- core/container/bit_array/doc.odin | 6 ++++-- 6 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 core/compress/shoco/doc.odin diff --git a/core/compress/gzip/doc.odin b/core/compress/gzip/doc.odin index fd7ef5a19..745d020c5 100644 --- a/core/compress/gzip/doc.odin +++ b/core/compress/gzip/doc.odin @@ -1,3 +1,5 @@ +// package gzip implements a small GZIP implementation as an example. +package compress_gzip /* Copyright 2021 Jeroen van Rijn . Made available under Odin's BSD-3 license. @@ -86,5 +88,4 @@ Example: } bytes.buffer_destroy(&buf) } -*/ -package compress_gzip +*/ \ No newline at end of file diff --git a/core/compress/shoco/doc.odin b/core/compress/shoco/doc.odin new file mode 100644 index 000000000..78ab01776 --- /dev/null +++ b/core/compress/shoco/doc.odin @@ -0,0 +1,2 @@ +// package shoco is an implementation of the shoco short string compressor. +package compress_shoco \ No newline at end of file diff --git a/core/compress/shoco/model.odin b/core/compress/shoco/model.odin index 919563441..bca58386b 100644 --- a/core/compress/shoco/model.odin +++ b/core/compress/shoco/model.odin @@ -1,11 +1,11 @@ +package compress_shoco + /* This file was generated, so don't edit this by hand. Transliterated from https://github.com/Ed-von-Schleck/shoco/blob/master/shoco_model.h, which is an English word model. */ -package compress_shoco - DEFAULT_MODEL :: Shoco_Model { min_char = 39, max_char = 122, diff --git a/core/compress/shoco/shoco.odin b/core/compress/shoco/shoco.odin index b393b8356..d8810e532 100644 --- a/core/compress/shoco/shoco.odin +++ b/core/compress/shoco/shoco.odin @@ -1,3 +1,6 @@ +// package shoco is an implementation of the shoco short string compressor. +package compress_shoco + /* Copyright 2022 Jeroen van Rijn . Made available under Odin's BSD-3 license. @@ -8,9 +11,6 @@ An implementation of [shoco](https://github.com/Ed-von-Schleck/shoco) by Christian Schramm. */ -// package shoco is an implementation of the shoco short string compressor. -package compress_shoco - import "base:intrinsics" import "core:compress" diff --git a/core/compress/zlib/doc.odin b/core/compress/zlib/doc.odin index 6ae537a87..19ef1c045 100644 --- a/core/compress/zlib/doc.odin +++ b/core/compress/zlib/doc.odin @@ -1,3 +1,5 @@ +// package zlib implements Deflate decompression +package compress_zlib /* Copyright 2021 Jeroen van Rijn . Made available under Odin's BSD-3 license. @@ -47,5 +49,4 @@ Example: fmt.printf("Input: %v bytes, output (%v bytes):\n%v\n", len(ODIN_DEMO), len(s), s) assert(len(s) == OUTPUT_SIZE) } -*/ -package compress_zlib +*/ \ No newline at end of file diff --git a/core/container/bit_array/doc.odin b/core/container/bit_array/doc.odin index 36bf90002..6d35d48d1 100644 --- a/core/container/bit_array/doc.odin +++ b/core/container/bit_array/doc.odin @@ -1,3 +1,6 @@ +// package bit_array implements a dynamically-sized array of bits +package container_dynamic_bit_array + /* The Bit Array can be used in several ways: @@ -48,5 +51,4 @@ Example: fmt.printf("Get(Negative_Test): %v, %v\n", get(bits, Foo.Negative_Test)) fmt.printf("Freed.\n") } -*/ -package container_dynamic_bit_array +*/ \ No newline at end of file From 9c7fe1d8a7b26ecd0d4de2a1d6241f453deca6cc Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Thu, 9 Oct 2025 14:58:50 +0200 Subject: [PATCH 2/3] Package lines for core:container. --- core/container/intrusive/list/doc.odin | 6 ++++-- core/container/lru/doc.odin | 2 ++ core/container/priority_queue/doc.odin | 2 ++ core/container/queue/doc.odin | 2 ++ core/container/rbtree/doc.odin | 2 ++ core/container/rbtree/rbtree.odin | 1 - core/container/small_array/doc.odin | 9 ++++----- core/container/topological_sort/doc.odin | 2 ++ core/container/topological_sort/topological_sort.odin | 9 ++++++--- 9 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 core/container/lru/doc.odin create mode 100644 core/container/priority_queue/doc.odin create mode 100644 core/container/queue/doc.odin create mode 100644 core/container/rbtree/doc.odin create mode 100644 core/container/topological_sort/doc.odin diff --git a/core/container/intrusive/list/doc.odin b/core/container/intrusive/list/doc.odin index 155f1dfe2..78502e35d 100644 --- a/core/container/intrusive/list/doc.odin +++ b/core/container/intrusive/list/doc.odin @@ -1,3 +1,6 @@ +// package list implements an intrusive doubly-linked list. +package container_intrusive_list + /* Package list implements an intrusive doubly-linked list. @@ -45,5 +48,4 @@ Example: Output: Hello World -*/ -package container_intrusive_list +*/ \ No newline at end of file diff --git a/core/container/lru/doc.odin b/core/container/lru/doc.odin new file mode 100644 index 000000000..540487bc6 --- /dev/null +++ b/core/container/lru/doc.odin @@ -0,0 +1,2 @@ +// package lru implements an LRU cache. It automatically removes older entries if its capacity is reached. +package container_lru \ No newline at end of file diff --git a/core/container/priority_queue/doc.odin b/core/container/priority_queue/doc.odin new file mode 100644 index 000000000..a71a9dd28 --- /dev/null +++ b/core/container/priority_queue/doc.odin @@ -0,0 +1,2 @@ +// package priority_queue implements a Priority Queue data structure +package container_priority_queue \ No newline at end of file diff --git a/core/container/queue/doc.odin b/core/container/queue/doc.odin new file mode 100644 index 000000000..efb29fc2a --- /dev/null +++ b/core/container/queue/doc.odin @@ -0,0 +1,2 @@ +// package queue implements a dynamically resizable double-ended queue/ring-buffer. +package container_queue \ No newline at end of file diff --git a/core/container/rbtree/doc.odin b/core/container/rbtree/doc.odin new file mode 100644 index 000000000..691442e8e --- /dev/null +++ b/core/container/rbtree/doc.odin @@ -0,0 +1,2 @@ +// package rbtree implements a red-black tree +package container_rbtree \ No newline at end of file diff --git a/core/container/rbtree/rbtree.odin b/core/container/rbtree/rbtree.odin index e9d0d08f4..6a3b9c9ea 100644 --- a/core/container/rbtree/rbtree.odin +++ b/core/container/rbtree/rbtree.odin @@ -1,4 +1,3 @@ -// This package implements a red-black tree package container_rbtree @(require) import "base:intrinsics" diff --git a/core/container/small_array/doc.odin b/core/container/small_array/doc.odin index f3e9acd57..a57caf798 100644 --- a/core/container/small_array/doc.odin +++ b/core/container/small_array/doc.odin @@ -1,7 +1,7 @@ -/* -Package small_array implements a dynamic array like -interface on a stack-allocated, fixed-size array. +// package small_array implements a dynamic array-like interface on a stack-allocated, fixed-size array. +package container_small_array +/* The Small_Array type is optimal for scenarios where you need a container for a fixed number of elements of a specific type, with the total number known at compile time but the exact @@ -51,5 +51,4 @@ Output: Hellope -*/ -package container_small_array +*/ \ No newline at end of file diff --git a/core/container/topological_sort/doc.odin b/core/container/topological_sort/doc.odin new file mode 100644 index 000000000..cd79e0e54 --- /dev/null +++ b/core/container/topological_sort/doc.odin @@ -0,0 +1,2 @@ +// package topological_sort implements a generic O(V+E) topological sorter. +package container_topological_sort \ No newline at end of file diff --git a/core/container/topological_sort/topological_sort.odin b/core/container/topological_sort/topological_sort.odin index 10765958e..6afe9c453 100644 --- a/core/container/topological_sort/topological_sort.odin +++ b/core/container/topological_sort/topological_sort.odin @@ -1,8 +1,11 @@ -// The following is a generic O(V+E) topological sorter implementation. -// This is the fastest known method for topological sorting and Odin's -// map type is being used to accelerate lookups. package container_topological_sort +/* + The following is a generic O(V+E) topological sorter implementation. + This is the fastest known method for topological sorting and Odin's + map type is being used to accelerate lookups. +*/ + import "base:intrinsics" import "base:runtime" _ :: intrinsics From 153b0de4206773956d0402c880de2ff5254947e4 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Thu, 9 Oct 2025 15:18:23 +0200 Subject: [PATCH 3/3] Package lines for core:debug --- core/debug/trace/doc.odin | 7 +++---- core/dynlib/doc.odin | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/debug/trace/doc.odin b/core/debug/trace/doc.odin index e65548769..40f055161 100644 --- a/core/debug/trace/doc.odin +++ b/core/debug/trace/doc.odin @@ -1,6 +1,6 @@ +// package debug implements a stack trace library. Only works when debug symbols are enabled `-debug`. +package debug_trace /* -A debug stack trace library. Only works when debug symbols are enabled `-debug`. - Example: import "base:runtime" import "core:debug/trace" @@ -47,5 +47,4 @@ Example: ... } -*/ -package debug_trace \ No newline at end of file +*/ \ No newline at end of file diff --git a/core/dynlib/doc.odin b/core/dynlib/doc.odin index 487fcb715..6cb443092 100644 --- a/core/dynlib/doc.odin +++ b/core/dynlib/doc.odin @@ -1,5 +1,5 @@ /* -Package `core:dynlib` implements loading of shared libraries/DLLs and their symbols. +package dynlib implements loading of shared libraries/DLLs and their symbols. The behaviour of dynamically loaded libraries is specific to the target platform of the program. For in depth detail on the underlying behaviour please refer to your target platform's documentation.