Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
047213d
chore(quest): claim quest/m1/ffi-rules/transcript.md
kixelated Nov 19, 2026
e88806f
wip: transcript as a typed Rust subset, parsed against api.json
kixelated Nov 19, 2026
de6da76
wip: type the whole transcript
kixelated Nov 19, 2026
2a13cc5
wip: generate the Python transcript
kixelated Nov 19, 2026
7c8c4c5
docs(ffi): the api scripts are written from the transcript
kixelated Nov 19, 2026
f665360
wip: generate the Dart transcript
kixelated Nov 19, 2026
d51bd30
wip: generate the Go transcript
kixelated Nov 19, 2026
82d1394
wip: generate the Kotlin transcript
kixelated Nov 19, 2026
85b3fdc
Merge branch 'transcript-go' into transcript-integrate
kixelated Nov 19, 2026
8a9567d
Merge branch 'transcript-dart' into transcript-integrate
kixelated Nov 19, 2026
3f3afcc
Merge branch 'worktree-agent-a066082c0cb9b7d30' into transcript-integ…
kixelated Nov 19, 2026
6c21bf9
wip: generate the TypeScript transcript
kixelated Nov 19, 2026
a90015d
wip: generate the Swift transcript
kixelated Nov 19, 2026
97273fc
Merge branch 'transcript-swift' into transcript-integrate
kixelated Nov 19, 2026
4aea862
Merge branch 'quest/m1/ffi-rules/transcript-ts' into transcript-integ…
kixelated Nov 19, 2026
5e1c2a0
wip: generate the C++ transcript
kixelated Nov 19, 2026
c69f422
Merge branch 'transcript-cpp' into transcript-integrate
kixelated Nov 19, 2026
8961027
wip: generate the C transcript
kixelated Nov 19, 2026
93c012c
style: rustfmt the transcript
kixelated Nov 19, 2026
8da8b53
Merge branch 'worktree-agent-a7ce2d0de17b10775' into transcript-integ…
kixelated Nov 19, 2026
42148f8
style: rustfmt
kixelated Nov 19, 2026
aa03ac3
chore: drop unread IR fields, lint, and keep main's formatting
kixelated Nov 19, 2026
ae983cc
Merge remote-tracking branch 'origin/main' into quest/m1/ffi-rules/tr…
kixelated Nov 19, 2026
296a992
quest: the transcript is generated; follow up on the names table
kixelated Nov 19, 2026
6c712b5
fix(ffi): the transcript folds integers as Rust does and refuses what…
kixelated Nov 19, 2026
e38e174
fix(ffi): lint the folding test
kixelated Nov 19, 2026
92568ec
fix(ffi): the transcript folds at Rust's widths and types aliases in …
kixelated Nov 19, 2026
d97570b
fix(ffi): aliases resolve in their own scope everywhere, and a map_or…
kixelated Nov 19, 2026
b585613
fix(ffi): the transcript refuses what its steps cannot keep, and Type…
kixelated Nov 19, 2026
78bb5b4
fix(ffi): the transcript refuses what C, C++, and wasm32 would evalua…
kixelated Nov 19, 2026
bfecc6a
fix(ffi): the transcript refuses a change through a field and an argu…
kixelated Nov 19, 2026
7f271c7
fix(ffi): the transcript's own functions count in its argument-order …
kixelated Nov 19, 2026
88c0198
fix(ffi): the transcript refuses a captured drop, a handle in a loop'…
kixelated Nov 19, 2026
0740857
fix(ffi): the transcript counts option levels through a Box or a refe…
kixelated Nov 19, 2026
4176930
Merge origin/main into quest/m1/ffi-rules/transcript
kixelated Nov 19, 2026
31ed4b0
Merge origin/main into quest/m1/ffi-rules/transcript
kixelated Nov 19, 2026
5051325
fix(ffi): each Dart program its own package config, and the transcrip…
kixelated Nov 19, 2026
05c8203
quest: record the maintainer's follow-up answers
kixelated Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions ffi/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ wasmparser = { version = "0.263.0", default-features = false, features = ["std"]

[dev-dependencies]
loom = "0.7.3"
proc-macro2 = { version = "1.0.107", features = ["span-locations"] }
syn = { version = "3.0.10", default-features = false, features = ["clone-impls", "full", "parsing", "printing"] }

[lints]
workspace = true
12 changes: 9 additions & 3 deletions ffi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1495,9 +1495,15 @@ nix develop .#sanitize --command just ffi sanitize # api's C and C++ scripts un
The `api` fixture covers each rule once, and re-exports the `dep` fixture's types, which
export into the same library. The fixture's binding serves the host and wasm32, whose
items the host's library lacks, and each language's test checks that the host's items work
and that wasm32's fail. `tests/api.c` runs the same script as the
fixture's `examples/transcript.rs`, and the two transcripts must match line for line;
then it breaks each runtime check, which must abort with its message. `tests/api.cpp`
and that wasm32's fail. Each language's script is written at test time by
`tests/fixtures/transcript` from the fixture's `examples/transcript.rs`, whose `main` is a
typed subset of Rust checked against the export's `api.json`: an item it cannot resolve, or
a construct a language's writer cannot spell, fails the test naming it. Each function the
example defines is a hook each language's test writes by hand under the same name, for what
tests its idiom, such as futures and readers, or prints a value no two bindings shape alike.
A new rule's case is a few lines of `main`, which every language then runs.
`tests/api.c` runs the script through the C, and its transcript must match the native one
line for line; then it breaks each runtime check, which must abort with its message. `tests/api.cpp`
runs the script through the C++ header at C++17, 20, and 23, with exceptions and RTTI off
at 17 and 23, builds it under Clang's `-Wconsumed -Wdangling -Werror`, each case of
`tests/api_strict.cpp` failing there, then checks its futures: a wake that lands during a poll, a cancel between a
Expand Down
Loading