Skip to content

Add a "Galvan by Example" book#36

Open
antoniusnaumann wants to merge 23 commits into
mainfrom
docs/galvan-by-example
Open

Add a "Galvan by Example" book#36
antoniusnaumann wants to merge 23 commits into
mainfrom
docs/galvan-by-example

Conversation

@antoniusnaumann

Copy link
Copy Markdown
Owner

No description provided.

antoniusnaumann and others added 23 commits July 9, 2026 11:34
An mdBook in documentation/galvan-by-example that introduces the
language example by example, in the style of Rust by Example:

- 14 chapters covering hello world through basics, functions, custom
  types, ownership (mut/ref), collections, control flow, optionals
  and results, closures, generics, testing, CLI apps, Rust interop,
  and a Looking Ahead roadmap chapter closed by the axum northstar
  case study.
- Every transpiling example ends with a collapsible "Generated Rust"
  section containing real transpiler output (trimmed of module
  plumbing and formatted with rustfmt) so Rust users can build a
  precise mental model of the lowering.
- Features that do not transpile yet carry [!WARNING] alerts stating
  exactly what is missing, so the book doubles as a roadmap and
  consistency check. Gaps found while writing it: tuple-struct
  construction and named tuple types, enums with shared variant data,
  throw into flexible-error results and bare `-> !` success paths,
  `===` on refs, closure literals in let bindings, ordered
  dictionaries lowering to BTreeMap instead of IndexMap, and
  paren-free calls on assignment right-hand sides.
- Custom highlight.js definition for Galvan code blocks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Each collapsible details block now follows the code block it
documents instead of sitting at the end of the page. Pages with two
examples (hello world, variables) get one details block per example,
and the collection-alias example gained its own generated output.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Update variables.md

* Update primitives.md

* Update operators.md

* Update strings.md

* Update defining.md

* Update member.md

* Update overloading.md

* Update structs.md

* Update defaults.md

* Update defaults.md

* Update enums_shared.md

* Update enums_shared.md

* Update auto_traits.md

* Update index.md

* Update index.md

* Update by_value.md

* Update receivers.md

* Update ref_fields.md

* Update index.md

* Update index.md

* Update index.md

* Update match.md

* Update index.md

* Outline while loops and expressions

* Update book
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant