feat: add stable ValueKind inspection - #25
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a stable, host-facing type-tag API (ValueKind, Value::kind(), and Value::is_nil()) so embedders can branch on QuickCoffee value types without relying on internal Rc/container representations, while keeping runtime and bytecode semantics unchanged.
Changes:
- Add
ValueKindplusValue::kind()/Value::is_nil()to the public embedding surface and re-export them from the crate root. - Extend the embedding API tests to use the new type-tag inspection.
- Document the new inspection APIs via RFC 0093 and propagate the embedding guidance across manuals and generated docs.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/embedding_api.rs | Adds assertions for Value::kind() / Value::is_nil() in the public embedding tests. |
| src/vm.rs | Defines ValueKind and implements Value::kind() / Value::is_nil() on Value. |
| src/lib.rs | Re-exports ValueKind from the crate root for embedders. |
| RFCs/0093-value-kind-inspection.md | Introduces and records the stable value-kind inspection contract (RFC 0093). |
| README.md | Updates the RFC range to include RFC 0093. |
| manuals/manual.zh-CN.qc | Mentions Value::kind() / Value::is_nil() in the embedding notes. |
| manuals/manual.latin.qc | Mentions Value::kind() / Value::is_nil() in the embedding notes. |
| manuals/manual.en.qc | Mentions Value::kind() / Value::is_nil() in the embedding notes. |
| manuals/manual.devanagari-sa.qc | Mentions Value::kind() / Value::is_nil() in the embedding notes. |
| manuals/manual.classical-zh.qc | Mentions Value::kind() / Value::is_nil() in the embedding notes. |
| docs/manual.zh-CN.md | Updates generated manual content to reference stable type checks. |
| docs/manual.zh-CN.html | Updates generated manual content to reference stable type checks. |
| docs/manual.latin.md | Updates generated manual content to reference stable type checks. |
| docs/manual.latin.html | Updates generated manual content to reference stable type checks. |
| docs/manual.en.md | Updates generated manual content to reference stable type checks. |
| docs/manual.en.html | Updates generated manual content to reference stable type checks. |
| docs/manual.devanagari.sa.md | Updates generated manual content to reference stable type checks. |
| docs/manual.devanagari-sa.html | Updates generated manual content to reference stable type checks. |
| docs/manual.classical-zh.md | Updates generated manual content to reference stable type checks. |
| docs/manual.classical-zh.html | Updates generated manual content to reference stable type checks. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
tiye
force-pushed
the
docs/public-api-docs
branch
from
August 22, 2026 18:39
f0eec00 to
c61caa9
Compare
tiye
force-pushed
the
feat/value-kind-api
branch
from
August 22, 2026 18:40
398bf8d to
9a35143
Compare
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
ValueKindandValue::kind()plusValue::is_nil()Validation
make checkmake api-docvia the check targetmake docsHosts can branch on value types without inspecting internal Rc/container representations; runtime and bytecode semantics are unchanged.