pub struct CompileResult {Show 15 fields
pub success: bool,
pub wasm: Option<Vec<u8>>,
pub errors: CompileErrors,
pub ast: Option<Program>,
pub source_hash: String,
pub wasm_hash: Option<String>,
pub state_fields: Vec<FieldInfo>,
pub actions: Vec<ActionInfo>,
pub views: Vec<String>,
pub capabilities: Vec<String>,
pub credentials: Vec<FieldInfo>,
pub language_version: String,
pub compiler_version: String,
pub warnings: Vec<PeplError>,
pub source_map: Option<SourceMap>,
}Expand description
The result of a full compilation pipeline.
Serializable to JSON for the host / playground.
Fields§
§success: boolWhether compilation succeeded.
wasm: Option<Vec<u8>>The compiled .wasm bytes (base64-encoded in JSON), if successful.
errors: CompileErrorsStructured compile errors, if any.
ast: Option<Program>Full AST (serializable to JSON).
source_hash: StringSHA-256 hash of the source text (hex-encoded).
wasm_hash: Option<String>SHA-256 hash of the compiled WASM bytes (hex-encoded), if available.
state_fields: Vec<FieldInfo>State field names and types.
actions: Vec<ActionInfo>Action names and parameter types.
views: Vec<String>View names.
capabilities: Vec<String>Declared required capabilities.
credentials: Vec<FieldInfo>Declared credentials (name + type).
language_version: StringPEPL language version.
compiler_version: StringCompiler version.
warnings: Vec<PeplError>Warnings from compilation (separate from errors).
source_map: Option<SourceMap>Source map: WASM function index → PEPL source location.
Trait Implementations§
Source§impl Clone for CompileResult
impl Clone for CompileResult
Source§fn clone(&self) -> CompileResult
fn clone(&self) -> CompileResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompileResult
impl Debug for CompileResult
Source§impl<'de> Deserialize<'de> for CompileResult
impl<'de> Deserialize<'de> for CompileResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompileResult
impl RefUnwindSafe for CompileResult
impl Send for CompileResult
impl Sync for CompileResult
impl Unpin for CompileResult
impl UnwindSafe for CompileResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more