Skip to content

feat: add chainable embedding context setup - #57

Merged
tiye merged 3 commits into
feat/program-fingerprintfrom
feat/context-builder-api
Aug 23, 2026
Merged

feat: add chainable embedding context setup#57
tiye merged 3 commits into
feat/program-fingerprintfrom
feat/context-builder-api

Conversation

@tiye

@tiye tiye commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary

  • define RFC 0114 for chainable embedding context configuration
  • add Context::with_global and Context::with_native while preserving mutable APIs
  • update the compiled Rust embedding example and external integration tests
  • make make docs regenerate both HTML and Markdown for all five manuals

Validation

  • make docs
  • make check
  • cargo run --locked --quiet --example embed

This PR is stacked on PR #56 and is intentionally not merged independently.

Copilot AI lite review requested due to automatic review settings August 22, 2026 17:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_global and Context::with_native builder methods (paralleling existing mutable APIs).
  • Extend embedding API tests and update examples/embed.rs to demonstrate chained setup.
  • Regenerate/manual-touch documentation and update make docs to 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.

Comment thread Makefile Outdated
Comment thread tests/embedding_api.rs
@tiye tiye mentioned this pull request Aug 22, 2026
@tiye
tiye force-pushed the feat/stdlib-numeric-functions branch from 1784c57 to a212a66 Compare August 22, 2026 18:07
@tiye
tiye force-pushed the feat/context-builder-api branch from ceb64a9 to 80d7480 Compare August 22, 2026 18:30
@tiye
tiye force-pushed the feat/stdlib-numeric-functions branch from a212a66 to 6b6ba36 Compare August 22, 2026 18:31
@tiye
tiye force-pushed the feat/context-builder-api branch from 80d7480 to b43b920 Compare August 22, 2026 18:33
@tiye
tiye force-pushed the feat/stdlib-numeric-functions branch from 6b6ba36 to 6d95923 Compare August 22, 2026 18:35
@tiye
tiye force-pushed the feat/context-builder-api branch from b43b920 to 1ff02f9 Compare August 22, 2026 18:35
@tiye
tiye force-pushed the feat/stdlib-numeric-functions branch from 6d95923 to b55fd9b Compare August 22, 2026 18:53
@tiye
tiye force-pushed the feat/context-builder-api branch from 1ff02f9 to f202b93 Compare August 22, 2026 18:54
Base automatically changed from feat/stdlib-numeric-functions to chore/msrv-contract August 23, 2026 04:12
@tiye
tiye force-pushed the chore/msrv-contract branch 4 times, most recently from dcbb35c to 0873beb Compare August 23, 2026 06:32
Base automatically changed from chore/msrv-contract to feat/program-fingerprint August 23, 2026 07:00
@tiye
tiye force-pushed the feat/context-builder-api branch from 6ab7a33 to c5296d4 Compare August 23, 2026 07:03
@tiye
tiye merged commit d9a93d8 into feat/program-fingerprint Aug 23, 2026
4 checks passed
@tiye
tiye deleted the feat/context-builder-api branch August 23, 2026 07:45
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
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.

2 participants