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
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "runtime_tracing"
version = "0.7.1"
version = "0.8.0"
edition = "2021"
authors = ["Metacraft Labs Ltd"]
description = "A library for the schema and tracing helpers for the CodeTracer db trace format"
readme = "README.md"
repository = "https://github.com/metacraft-labs/runtime_tracing"
license = "MIT"
keywords = ["development-tools::debugging", "development-tools"]
keywords = ["debugging", "development-tools"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ mod tests {
Place(1),
ValueRecord::Sequence {
elements: vec![ValueRecord::Cell { place: Place(0) }], // #0
is_slice: false,
type_id,
},
);
Expand Down
17 changes: 15 additions & 2 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ pub enum TraceLowLevelEvent {

// events useful for history
BindVariable(BindVariableRecord), // bind a variable to a certain place
Assignment(AssignmentRecord), // assigning or passing by params
DropVariables(Vec<VariableId>), // dropping variables e.g. in the end of scope/heap lifetime
Assignment(AssignmentRecord), // assigning or passing by params
DropVariables(Vec<VariableId>), // dropping variables e.g. in the end of scope/heap lifetime

// experimental modification value tracking events
// probably will be reworked or replaced by the newer
Expand Down Expand Up @@ -280,6 +280,9 @@ pub struct VariableRecord {
pub struct TypeRecord {
pub kind: TypeKind,
pub lang_type: String,
// for now only for Struct: TODO eventually
// replace with an enum for TypeRecord, or with more cases
// in TypeSpecificInfo for collections, etc
pub specific_info: TypeSpecificInfo,
}

Expand Down Expand Up @@ -338,11 +341,21 @@ pub enum ValueRecord {
Sequence {
elements: Vec<ValueRecord>,
type_id: TypeId,
is_slice: bool,
},
Tuple {
elements: Vec<ValueRecord>,
type_id: TypeId,
},
Struct {
field_values: Vec<ValueRecord>,
type_id: TypeId, // must point to Type with STRUCT kind and TypeSpecificInfo::Struct
},
Variant {
discriminator: String, // TODO: eventually a more specific kind of value/type
contents: Box<ValueRecord>, // usually a Struct or a Tuple
type_id: TypeId,
},
Raw {
r: String,
type_id: TypeId,
Expand Down