Refactor naming and crates info (#8)

* Refactor naming and crates info

This commit:
* changes workspace crates to have a `wiggle_` prefix in names
* rename `memory` module of `wiggle-memory` crate to `runtime`
* fixes authors of all crates

* Rename wiggle memory crate to runtime
This commit is contained in:
Jakub Konka
2020-02-13 22:40:42 +01:00
committed by GitHub
parent 44584bccfc
commit 48a218b5c5
17 changed files with 77 additions and 79 deletions

View File

@@ -0,0 +1,28 @@
use crate::Region;
use thiserror::Error;
#[derive(Debug, Error, PartialEq, Eq)]
pub enum GuestError {
#[error("Invalid enum value {0}")]
InvalidEnumValue(&'static str),
#[error("Pointer out of bounds: {0:?}")]
PtrOutOfBounds(Region),
#[error("Pointer not aligned to {1}: {0:?}")]
PtrNotAligned(Region, u32),
#[error("Pointer already borrowed: {0:?}")]
PtrBorrowed(Region),
#[error("In func {funcname}:{location}:")]
InFunc {
funcname: &'static str,
location: &'static str,
#[source]
err: Box<GuestError>,
},
#[error("In data {typename}.{field}:")]
InDataField {
typename: String,
field: String,
#[source]
err: Box<GuestError>,
},
}