Skip to content

Enable rkyv's strict feature #9025

@nagisa

Description

@nagisa

Upgrading the toolchain today may change the encoding of the near-vm executables due to rkyv's strict feature not being enabled. This means that any time users build and run neard with a version of rustc toolchain other than what's specified in the rust-toolchain file, they are exposing themselves to invalid execution and, likely, crashes.

Upstream has expressed an intent to make this feature the default, but before that happens we can make an effort to remove this class of footguns ourselves by enabling the strict feature now. This disables rkyv encoding for Rust tuples, though, which we use across near-vm, so those would need additional code changes to adapt.

(There are also other complications with wasmer2, which must not unify this feature due to its own use of tuples…)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contract-runtimeArea: contract compilation and execution, virtual machines, etcC-housekeepingCategory: Refactoring, cleanups, code qualityT-contract-runtimeTeam: issues relevant to the contract runtime team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions