Add a "Galvan by Example" book#36
Open
antoniusnaumann wants to merge 23 commits into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.