feat: add chainable embedding context setup - #57
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a builder-style embedding configuration API to Context so hosts can chain context setup (globals + native callbacks) while keeping the existing mutable APIs, and updates the embedding example + manuals/doc outputs to document and validate the new surface.
Changes:
- Add
Context::with_globalandContext::with_nativebuilder methods (paralleling existing mutable APIs). - Extend embedding API tests and update
examples/embed.rsto demonstrate chained setup. - Regenerate/manual-touch documentation and update
make docsto also emit Markdown versions of all manuals.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/embedding_api.rs | Adds a new test covering chained Context configuration with builder methods. |
| src/vm.rs | Introduces Context::with_global and Context::with_native builder APIs. |
| RFCs/0114-context-builder-api.md | Defines RFC 0114 for the new chainable embedding context configuration. |
| RFCs/0000-project-scope.md | Updates project scope index to include RFC 0114. |
| README.md | Updates the “current RFC range” link to RFC 0114. |
| manuals/manual.zh-CN.qc | Mentions with_global/with_native in the embedding notes. |
| manuals/manual.latin.qc | Mentions with_global/with_native in the embedding notes. |
| manuals/manual.en.qc | Mentions with_global/with_native in the embedding notes. |
| manuals/manual.devanagari-sa.qc | Mentions with_global/with_native in the embedding notes. |
| manuals/manual.classical-zh.qc | Mentions with_global/with_native in the embedding notes. |
| Makefile | Extends docs target to also generate Markdown manual outputs. |
| examples/embed.rs | Switches embedding example to chained builder-style configuration. |
| docs/syntax.zh-CN.md | Updates syntax index to mention the new builder APIs. |
| docs/syntax.en.md | Updates syntax index to mention the new builder APIs. |
| docs/manual.zh-CN.md | Regenerated manual output (Markdown) reflecting updated notes/tooling. |
| docs/manual.zh-CN.html | Regenerated manual output (HTML) reflecting updated notes. |
| docs/manual.latin.md | Regenerated manual output (Markdown) reflecting updated notes/tooling. |
| docs/manual.latin.html | Regenerated manual output (HTML) reflecting updated notes. |
| docs/manual.en.md | Regenerated manual output (Markdown) reflecting updated notes/tooling. |
| docs/manual.en.html | Regenerated manual output (HTML) reflecting updated notes. |
| docs/manual.devanagari.sa.md | Adds/regenerates Devanagari manual Markdown output (note filename format). |
| docs/manual.devanagari-sa.html | Regenerated Devanagari manual HTML output reflecting updated notes. |
| docs/manual.classical-zh.md | Regenerated classical Chinese manual output (Markdown) reflecting updated notes/tooling. |
| docs/manual.classical-zh.html | Regenerated classical Chinese manual output (HTML) reflecting updated notes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Merged
tiye
force-pushed
the
feat/stdlib-numeric-functions
branch
from
August 22, 2026 18:07
1784c57 to
a212a66
Compare
tiye
force-pushed
the
feat/context-builder-api
branch
from
August 22, 2026 18:30
ceb64a9 to
80d7480
Compare
tiye
force-pushed
the
feat/stdlib-numeric-functions
branch
from
August 22, 2026 18:31
a212a66 to
6b6ba36
Compare
tiye
force-pushed
the
feat/context-builder-api
branch
from
August 22, 2026 18:33
80d7480 to
b43b920
Compare
tiye
force-pushed
the
feat/stdlib-numeric-functions
branch
from
August 22, 2026 18:35
6b6ba36 to
6d95923
Compare
tiye
force-pushed
the
feat/context-builder-api
branch
from
August 22, 2026 18:35
b43b920 to
1ff02f9
Compare
tiye
force-pushed
the
feat/stdlib-numeric-functions
branch
from
August 22, 2026 18:53
6d95923 to
b55fd9b
Compare
tiye
force-pushed
the
feat/context-builder-api
branch
from
August 22, 2026 18:54
1ff02f9 to
f202b93
Compare
Base automatically changed from
feat/stdlib-numeric-functions
to
chore/msrv-contract
August 23, 2026 04:12
tiye
force-pushed
the
chore/msrv-contract
branch
4 times, most recently
from
August 23, 2026 06:32
dcbb35c to
0873beb
Compare
Base automatically changed from
chore/msrv-contract
to
feat/program-fingerprint
August 23, 2026 07:00
tiye
force-pushed
the
feat/context-builder-api
branch
from
August 23, 2026 07:03
6ab7a33 to
c5296d4
Compare
tiye
added a commit
that referenced
this pull request
Aug 23, 2026
* feat: add strict string escapes * feat: add interactive qcoffee session * feat: support comma-free multiline collections * feat: support indented map literals * feat: support constrained implicit calls * feat: expose embedding execution stats * feat: add CLI execution statistics * feat: add qtest execution statistics * perf: cache shared program verification * merge: retain string escape coverage on integration line * merge: integrate string escapes and interactive CLI * fix: avoid stale REPL execution stats * feat: iterate over Unicode strings * feat: support array pattern rest bindings * feat: support Unicode string indexing * fix: optimize Unicode slicing and docs * fix: bound untrusted destructuring patterns * chore: regenerate generated manual output * feat: add dynamic destructuring pattern defaults * feat: support map literal spread * feat: add map destructuring rest patterns * fix: address review comments * fix: address review comments * RFC 0076: negative array and string indexing (#7) * feat: support negative sequence indexing * docs: record negative indexing benchmark * docs: document map rest and negative indexing in Chinese syntax * fix: regenerate map spread manual * chore: regenerate classical Chinese manual * feat: add machine-readable qtest JSON output * docs: add qtest JSON examples to all manuals * test: assert qtest JSON line structure * docs: align core RFC index with implemented extensions * feat: expose deterministic bytecode fingerprints * docs: document program fingerprints in all manuals * test: add qtest TAP output Resolves the reviewed TAP output feature after portable path coverage and passing Actions. * feat: expose bytecode fingerprints in qcoffee Resolves all review feedback; CLI tests and Actions pass. * feat: add machine-readable qbench runner All review feedback is resolved; CLI tests, clippy, and GitHub Actions pass. * feat: canonicalize bytecode fingerprints Fixed fixed-width i32 encoding review feedback; regression tests and Actions pass. * feat: add qdocco Markdown output All review feedback was resolved; qdocco tests, clippy, and Actions pass. * feat: add mutable Context fuel control Resolved review coverage for retained native callbacks; tests, clippy, and Actions pass. * feat: add executable Rust embedding example Review feedback is resolved; example, tests, clippy, and Actions pass. * chore: add crate publishing metadata Resolved publication metadata validation feedback; checks and Actions pass. * feat: add consistent CLI version reporting No outstanding review comments; CLI version test, clippy, and Actions pass. * test: verify public embedding API externally Resolved review feedback; embedding API tests, clippy, and Actions pass. * docs: enforce complete public API documentation No outstanding review comments; public docs, embedding API tests, clippy, and Actions pass. * feat: forward named arguments in do iifes Resolved allocation and coverage feedback; RFC tests, clippy, and Actions pass. * test: enforce RFC index consistency Resolved path anchoring and RFC wording feedback; tests, clippy, and Actions pass. * feat: support bang as not alias Resolved runtime, lexer, and membership-alias feedback; tests, clippy, and Actions pass. * feat: support signed by iteration steps Resolved string iteration traversal feedback; RFC tests, clippy, and Actions pass. * fix: make qtest multi-input order deterministic Resolved JSON sorting/dedup coverage feedback; CLI tests, clippy, and Actions pass. * fix: reject conflicting qcoffee source modes Resolved diagnostic completeness feedback; CLI tests, clippy, and Actions pass. * perf: record RFC 0100 benchmark sample Resolved reproducibility metadata feedback; qbench validation and Actions pass. * perf: cover signed by in core benchmark Resolved benchmark iteration consistency feedback; core benchmark check, qbench, and Actions pass. * fix: protect qdocco source files Resolved symlink overwrite coverage feedback; CLI tests, clippy, and Actions pass. * fix: ignore heredoc markers in comments Resolved closing-line heredoc boundary feedback; lexer tests, clippy, and Actions pass. * fix: write qdocco outputs atomically Resolved cross-platform replacement, directory durability, and non-UTF-8 path feedback; tests, clippy, and Actions pass. * fix: deduplicate qtest files by canonical path Resolved collection path diagnostics feedback; CLI tests, clippy, and Actions pass. * feat: version qbench machine output Resolves the per-record text-output contract review and refreshes the branch on the current baseline. * chore: gate checks on cargo package Uses cargo publish --dry-run to validate and build the isolated release package without uploading. * test: add executable qtest showcase corpus Keeps the showcase corpus portable and preserves the latest package and qdocco safeguards. * chore: declare and verify Rust MSRV (#52) * feat: add chainable embedding context setup (#57) * feat: add chainable embedding context setup * fix: permit generated docs during package verification * docs: regenerate literate manual markdown
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.
Summary
Context::with_globalandContext::with_nativewhile preserving mutable APIsmake docsregenerate both HTML and Markdown for all five manualsValidation
make docsmake checkcargo run --locked --quiet --example embedThis PR is stacked on PR #56 and is intentionally not merged independently.