Skip to content

add support for Complex error types with zerocopy #58

@hawkw

Description

@hawkw

Presently, attempting to use encoding: Zerocopy with an IPC using the Complex error type produces an error, like this:

error: failed to run custom build command for `drv-cpu-seq-api v0.1.0 (/home/eliza/Code/oxide/hubris/drv/cpu-seq-api)`

Caused by:
  process didn't exit successfully: `/home/eliza/Code/oxide/hubris/target/release/build/drv-cpu-seq-api-43c66dba4c036f49/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /home/eliza/.cargo/git/checkouts/idolatry-1ebf1c2fd2f30300/6bc9555/src/client.rs:518:41:
  Complex error types not supported for Zerocopy encoding, sorry
  stack backtrace:

This is the case because previous versions of zerocopy did not support enums with data fields, and could only be used with C-like enums. However, zerocopy 0.8 adds support for deriving zerocopy's traits for enums with data fields. Now PR #57 has updated our zerocopy dependency to v0.8.x, we could presumably add support for the Complex error type on encoding: Zerocopy IPCs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions