Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion .github/workflows/crap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,15 @@ jobs:
target/
key: ${{ runner.os }}-cargo-crap-${{ hashFiles('**/Cargo.lock') }}

- name: setup rust stable
- name: setup rust
# Pinned to the same release as test.yml, not `@stable`: this job runs
# the whole workspace's tests under coverage, including the trybuild
# cases whose .stderr snapshots record one compiler's wording. On an
# unpinned stable a release that rewords a diagnostic fails unrelated
# PRs here while test.yml stays green. Bump both files together.
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.96.0
# llvm-tools-preview is required by cargo-llvm-cov to produce coverage.
components: llvm-tools-preview

Expand Down
12 changes: 12 additions & 0 deletions packages/aead-value/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ decode: `INT32`↔`int32`, `UINT32`↔`uint32`, `FLOAT32`↔`float32`, and the
the matching width (e.g. `int16`→`INT32`), and `uint`/`uintptr` map to
`UINT64`.

## Declaring a kind without a value

A binding often has to say what a field's values are before it has one.
[`ValueKind`] is the `FfiValue` model without the payload: `bool`, `int32`,
`int64`, `uint32`, `uint64`, `float32`, `float64`, `string`, `bytes`,
`array` and `object`. Those names are frozen wire format, like the tag
table. `Null`, `Undefined` and `Passthrough` have no kind: the first two
are single-valued, and passthrough is a transport choice, not a type.
`FfiValue::kind` reports a value's kind, `ValueKind::holds` checks one,
and `ValueKind::tags` maps a kind to the tags above.

## Security notes

- String and byte leaves are held in `Protected`, so the Rust-side copies
Expand All @@ -121,6 +132,7 @@ the matching width (e.g. `int16`→`INT32`), and `uint`/`uintptr` map to
everywhere in Vitamin-C.

[`FfiValue`]: crate::FfiValue
[`ValueKind`]: crate::ValueKind
[`Cipher`]: vitaminc_aead::Cipher
[`Decipher`]: vitaminc_aead::Decipher
[`Context::for_map_entry`]: vitaminc_aead::Context::for_map_entry
Expand Down
Loading
Loading