# Silver Documentation - Tree of Contents

Canonical markdown documentation for the Silver programming language.
These files are the source of truth for AI agents and crawlers: fetch them instead of scraping the HTML docs at /docs.

- Start here: [001-operating-silverc.md](001-operating-silverc.md) - how to compile with silverc
- Then: [002-operating-silveri.md](002-operating-silveri.md) - how to run with silveri
- Total docs: 272 (numbered sequentially, no gaps)

## Recommendation for AI agents: mirror these docs locally

Scrape all of the docs into a subfolder of your local project called `learn silver` and keep them there while you work:

- Mirror target: `learn silver/` in your project root
- Save this file as `learn silver/index.md` (the start / tree-of-contents file)
- Then fetch every file linked below into that folder (272 docs, about 170 KB total)
- With the full set local you can search and cite the docs without re-fetching, and every agent working on the project reasons against the same snapshot
- Files are numbered sequentially with no gaps; if your local set ever diverges from the numbering below, re-fetch

## Toolchain (silverc, silveri, projects)

- [Operating silverc](001-operating-silverc.md)
- [Operating silveri](002-operating-silveri.md)
- [x86-64 Assembly](154-x86-assembly.md)
- [PE Executable](155-pe-executable.md)
- [Native Code Generation](156-native-codegen.md)
- [Compiler Pipeline](157-compiler-pipeline.md)
- [FFI / Runtime Imports](158-ffi-imports.md)
- [PE VERSIONINFO Resource](208-pe-versioninfo.md)
- [sources](218-sources.md)
- [QuickSilver (.qs) Library Files](219-qs-lib-files.md)
- [Spinners Library](220-spinners-library.md)
- [QuickSilver Bytecode (.qs v3) Design](221-qs-bytecode-design.md)
- [`.col` Collections](234-col-collections.md)
- [Binary Metadata](244-binary-metadata.md)
- [Project Types](246-project-types.md)
- [Compiler Flags](247-compiler-flags.md)
- [Preprocessor (`#on` / `#else` / `#off`)](250-preprocessor.md)
- [Custom Native Modules](251-native-modules.md)

## Basics

- [Variables](003-variables.md)
- [Constants](004-constants.md)
- [Data Types](005-data-types.md)
- [Functions](006-functions.md)
- [Comments](007-comments.md)
- [Multi-Line Comments](008-multi-line-comments.md)
- [Doc Comments](009-doc-comments.md)
- [Debug Output](253-debug-output.md)
- [Path Literals](254-path-literals.md)

## Control Flow

- [If / Else](010-if-else.md)
- [If Let](011-if-let.md)
- [Match](012-match.md)
- [Loop](013-loop.md)
- [While](014-while.md)
- [For](015-for.md)
- [For with Iterator](016-for-iter.md)
- [Return](017-return.md)

## Data Structures

- [Tuples](018-tuples.md)
- [Arrays](019-arrays.md)
- [Vectors](020-vectors.md)
- [Slices](021-slices.md)
- [String](022-string.md)
- [Structs](023-struct.md)
- [Tuple Structs](024-tuple-structs.md)
- [Unit Structs](025-unit-structs.md)
- [Enum](026-enum.md)
- [Option](027-option.md)
- [Result](028-result.md)

## Functions & Modules

- [Impl (Methods)](029-impl.md)
- [Associated Functions](030-associated-functions.md)
- [Modules](038-modules.md)
- [Use](039-use.md)
- [Closures](040-closures.md)
- [Iterators](041-iterators.md)
- [Internal](248-internal.md)
- [Anonymous Function Parameters](249-anonymous-function-parameters.md)

## Ownership & Memory

- [Ownership](031-ownership.md)
- [Clone](032-clone.md)
- [References (Borrowing)](033-references.md)
- [Mutable References](034-mutable-references.md)
- [Type Alias](046-type-alias.md)
- [Lifetimes](047-lifetimes.md)
- [Unsafe](048-unsafe.md)

## Types & Traits

- [Trait (Interface)](035-trait.md)
- [Derive](036-derive.md)
- [HashMap](037-hashmap.md)
- [Class Inheritance](204-class-inheritance.md)
- [Enum Types](205-enum-types.md)
- [Byte Type](236-byte-type.md)
- [Character Type](237-char-type.md)
- [Read Only Prop](261-read-only-prop.md)
- [Object Initializer](267-object-initializer.md)
- [Visible Prop](268-visible-prop.md)
- [Anonymous Classes](271-anonymous-classes.md)
- [Operator Overloading](272-operator-overloading.md)

## Error Handling

- [Pattern Matching](042-pattern-matching.md)
- [Error Handling (unwrap / expect)](043-error-handling.md)
- [? Operator](044-question-mark.md)
- [Panic](045-panic.md)

## Strings

- [String Length](069-string-length.md)
- [String Split](070-string-split.md)
- [String Trim](071-string-trim.md)
- [String Replace](072-string-replace.md)
- [String To Upper & Lower](073-string-to-upper-lower.md)
- [String Contains](074-string-contains.md)
- [String Starts With & Ends With](075-string-starts-ends-with.md)
- [String Slice](076-string-slice.md)
- [String Find](077-string-find.md)
- [String Repeat](078-string-repeat.md)
- [String Concatenation](099-string-concat.md)
- [String Interpolation](100-string-interpolation.md)
- [Multi-line Strings](101-string-multiline.md)
- [String CharAt / Index](102-string-char-at.md)
- [String Pad](103-string-pad.md)
- [String Strip Prefix / Suffix](104-string-strip-prefix.md)
- [String Trim Start & Trim End](138-string-trim-start-end.md)
- [String To Chars](139-string-to-chars.md)
- [String Is Empty / Is Blank](140-string-is-empty-blank.md)
- [String Char Code](141-string-char-code.md)
- [String Methods](202-string-methods.md)
- [Character Is White Space](209-char-is-white-space.md)
- [String Lines](210-string-lines.md)
- [String Trim With Characters](211-string-trim-chars.md)
- [URL Kind Detection](212-url-kind.md)
- [String Pad, Pad Left, and Pad Right](224-string-pad-left-right.md)
- [Integer `toString` Radix Formatting](225-integer-tostring-radix.md)
- [String `slugify`](226-string-slugify.md)
- [String Equals](252-string-equals.md)
- [String Replace All](260-string-replace-all.md)
- [String Dissimilarity](266-string-dissimilarity.md)

## Arrays & Collections

- [Array Map](079-array-map.md)
- [Array Filter](080-array-filter.md)
- [Array Reduce](081-array-reduce.md)
- [Array Reverse](082-array-reverse.md)
- [Array Sort](083-array-sort.md)
- [Array Find](084-array-find.md)
- [Array Push & Pop](085-array-push-pop.md)
- [Array Join](086-array-join.md)
- [Array Slice](087-array-slice.md)
- [Array Concat](088-array-concat.md)
- [Array Every & Some](089-array-every-some.md)
- [Array Flat](090-array-flat.md)
- [Array Includes](091-array-includes.md)
- [Array Index Of](092-array-index-of.md)
- [HTML Beautify](093-html-beautify.md)
- [JSON Beautify](094-json-beautify.md)
- [Math Tan](095-math-tan.md)
- [Math Log](096-math-log.md)
- [Array ForEach](097-array-foreach.md)
- [Array Fill](098-array-fill.md)
- [Set](115-set.md)
- [Dictionary / Map](116-dictionary.md)
- [Destructuring](117-destructuring.md)
- [Array Enumerate (Iterate with Index)](130-array-enumerate.md)
- [Array Take & Skip](131-array-take-skip.md)
- [Array Distinct (Unique)](132-array-distinct.md)
- [Array Chunk (Split into Groups)](133-array-chunk.md)
- [Array Zip (Combine Two Arrays)](134-array-zip.md)
- [Array Partition (Split by Predicate)](135-array-partition.md)
- [Array Sort By (Custom Comparator)](136-array-sort-by.md)
- [Array Take While & Skip While](137-array-take-while-skip-while.md)
- [Array `indexOf` for Values and Characters](229-array-indexof-values-chars.md)
- [Array Unique](230-array-unique.md)
- [Array Last](231-array-last.md)
- [Array `any`, `all`, and `reverse`](235-array-any-all-reverse.md)
- [Array Swap](269-array-swap.md)

## Math

- [Math Cos](051-math-cos.md)
- [Math Pow](052-math-pow.md)
- [Math Sin](053-math-sin.md)
- [Math Sqrt](054-math-sqrt.md)
- [Math Abs](055-math-abs.md)
- [Math Floor & Ceil](056-math-floor-ceil.md)
- [Math Round](057-math-round.md)
- [Math Max & Min](058-math-max-min.md)
- [Math Random](059-math-random.md)
- [Math Pi](060-math-pi.md)
- [Math Exp](149-math-exp.md)
- [Math Hypot](150-math-hypot.md)
- [Mathematical Expression Evaluation](239-math-eval.md)

## I/O & Files

- [Read File](049-read-file.md)
- [Write File](050-write-file.md)
- [File Exists](142-file-exists.md)
- [File Delete](143-file-delete.md)
- [File Rename / Move](144-file-rename.md)
- [Directory List](145-directory-list.md)
- [Directory Create](146-directory-create.md)
- [Format Number (Hex, Octal, Binary)](147-format-number.md)
- [Stdin Input](203-stdin-input.md)
- [File & Folder Copy](213-file-folder-copy.md)
- [File & Folder Size](214-file-folder-size.md)
- [Filesystem Type Checks](215-fs-type-checks.md)
- [Folder Delete](216-folder-delete.md)
- [Directory Entries](217-directory-entries.md)
- [Path Join](228-path-join.md)
- [Byte Order Mark (BOM)](232-bom.md)
- [Path Guard For Windows](259-path-guard-windows.md)
- [Path Normalize](262-path-normalize.md)
- [Path Dirname](263-path-dirname.md)
- [Path Stem](264-path-stem.md)
- [Path Invalid](265-path-invalid.md)

## Networking & HTTP

- [HTTP GET](061-http-get.md)
- [HTTP POST](062-http-post.md)
- [HTTP DELETE](063-http-delete.md)
- [HTTP Server](159-http-server.md)
- [HTTPS / TLS](160-https.md)
- [TCP Client](161-tcp-client.md)
- [TCP Server](162-tcp-server.md)
- [FTP Client](163-ftp-client.md)
- [FTP Server](164-ftp-server.md)
- [POP3](165-pop.md)
- [IMAP](166-imap.md)
- [WebSocket](167-websocket.md)
- [Console Colors](168-console-colors.md)
- [DNS](185-dns.md)
- [SSH](186-ssh.md)
- [FTPS (FTP over TLS/SSL)](187-ftps.md)

## Serialization & Formats

- [JSON Parse](064-json-parse.md)
- [JSON Stringify](065-json-stringify.md)
- [YAML Parse](066-yaml-parse.md)
- [YAML Stringify](067-yaml-stringify.md)
- [HTML Parse](068-html-parse.md)
- [XML](181-xml.md)
- [TOML](182-toml.md)
- [INI](183-ini.md)
- [CSV](188-csv.md)
- [Compression Modules](257-compression.md)

## Concurrency & Async

- [Thread Spawn](148-thread-spawn.md)
- [Full Async Runtime](177-async.md)

## System & OS

- [CLI Arguments](122-cli-args.md)
- [Environment Variables](123-environment-variables.md)
- [Standard Input](124-stdin.md)
- [Sleep / Delay](125-sleep-delay.md)
- [Exit Code](126-exit-code.md)
- [Timing / Benchmarking](127-timing.md)
- [Assertions](128-assertions.md)
- [Nullable / Optional Chaining](129-nullable-conditional.md)
- [appinfo](153-appinfo.md)
- [Process, Subprocess, Pipes & Exit Codes](175-process.md)
- [UUID / UUIDv4](176-uuid.md)
- [GUI (Window, Button, Checkbox, Image - Custom Draw)](184-gui.md)
- [System Info (sysinfo)](196-sysinfo.md)
- [Events (Emitter / Pub-Sub)](197-events.md)
- [IP Addresses & Ranges](198-ip.md)
- [os](201-os.md)
- [Win32 API (Module Imports)](206-win32-api.md)
- [OS Module](207-os-module.md)
- [Keyboard Input](222-keyboard-input.md)
- [Mouse Input](223-mouse-input.md)
- [Focused Process](233-focused-process.md)
- [Console Title and Clear Screen](238-console-title-clear.md)
- [Windows Notifications](240-windows-notifications.md)
- [Window GUI](241-window-gui.md)
- [System Tray Icon](242-system-tray-icon.md)
- [Windows Registry](243-windows-registry.md)
- [Carg Parser](245-carg-parser.md)
- [Message Box](255-message-box.md)
- [File Dialogs](256-file-dialogs.md)

## Security & Crypto

- [Regex](172-regex.md)
- [Hashing & File Hashing](173-hashing.md)
- [Encryption (Password & File)](174-encryption.md)
- [OAuth 2.0](189-oauth.md)
- [MIME](190-mime.md)
- [Image (PNG, JPEG, Resize, Crop)](191-image.md)
- [JWT](192-jwt.md)
- [Validation](193-validation.md)
- [Headers Parsing](194-headers.md)
- [Cookies Parsing](195-cookies.md)
- [DJB2, FNV-1, CRC-32C and CRC32 Hashing](227-djb2-fnv1-hashing.md)

## Database

- [SQLite](169-sqlite.md)

## Advanced

- [Ternary / Conditional Expression](105-ternary.md)
- [Switch](106-switch.md)
- [Range Literal](107-range-literal.md)
- [Recursion](108-recursion.md)
- [Default Parameters](109-default-parameters.md)
- [Variadic Parameters](110-variadic-parameters.md)
- [Type Conversion](111-type-conversion.md)
- [Type Introspection](112-type-introspection.md)
- [Null Coalescing](113-null-coalescing.md)
- [Spread / Rest Operator](114-spread-rest.md)
- [Compound Assignment](118-compound-assignment.md)
- [Increment / Decrement](119-increment-decrement.md)
- [Bitwise Operators](120-bitwise-operators.md)
- [Logical Operators](121-logical-operators.md)
- [While Let](151-while-let.md)
- [Match Guard](152-match-guard.md)
- [DateTime](170-datetime.md)
- [Logging](171-logging.md)
- [SMTP](178-smtp.md)
- [Text Encoding (Base64, UTF-8, Unicode)](179-encoding.md)
- [Compression (GZip, Zstd)](180-compression.md)
- [LLM AI](199-llm-ai.md)
- [Standard Library](200-standard-library.md)
- [Membership Operators (`in` / `not in`)](258-membership-operators.md)
- [Null Safe Operators](270-null-safe-operators.md)
