diff --git a/crates/re_types/definitions/arrow/attributes.fbs b/crates/re_types/definitions/arrow/attributes.fbs index f8e96e4d8bad..1a32ea66be33 100644 --- a/crates/re_types/definitions/arrow/attributes.fbs +++ b/crates/re_types/definitions/arrow/attributes.fbs @@ -6,7 +6,7 @@ namespace arrow; /// matter that only impacts (de)serialization. /// /// Only applies to unions. -attribute "arrow.attr.sparse_union"; +attribute "attr.arrow.sparse_union"; /// Marks a single-field object as transparent, affecting its Arrow datatype. /// @@ -14,4 +14,4 @@ attribute "arrow.attr.sparse_union"; /// matter that only impacts (de)serialization. /// /// This is generally most useful for getting rid of extraneous `struct` layers. -attribute "arrow.attr.transparent"; +attribute "attr.arrow.transparent"; diff --git a/crates/re_types/definitions/python/attributes.fbs b/crates/re_types/definitions/python/attributes.fbs index 4160bdc0c429..c24923751719 100644 --- a/crates/re_types/definitions/python/attributes.fbs +++ b/crates/re_types/definitions/python/attributes.fbs @@ -3,14 +3,14 @@ namespace python.attributes; /// Marks a field as transparent, meaning its type will be replaced by the underlying type. /// /// Only applies to fields whose type is an object with a single-field. -attribute "python.attr.transparent"; +attribute "attr.python.transparent"; /// Defines the type aliases for a component, e.g. the types that make up `ComponentLike`. /// /// Only applies to structs/unions that are components. -attribute "python.attr.aliases"; +attribute "attr.python.aliases"; /// Defines the array type aliases for a component, e.g. the types that make up `ComponentArrayLike`. /// /// Only applies to structs/unions that are components. -attribute "python.attr.array_aliases"; +attribute "attr.python.array_aliases"; diff --git a/crates/re_types/definitions/rerun/archetypes/points2d.fbs b/crates/re_types/definitions/rerun/archetypes/points2d.fbs new file mode 100644 index 000000000000..d3c97df80b81 --- /dev/null +++ b/crates/re_types/definitions/rerun/archetypes/points2d.fbs @@ -0,0 +1,63 @@ +include "fbs/attributes.fbs"; + +include "rerun/datatypes.fbs"; +include "rerun/components.fbs"; + +namespace rerun.archetypes; + +// --- + +// TODO(#2371): archetype IDL definitions must always be tables +// TODO(#2372): archetype IDL definitions must refer to objects of kind component +// TODO(#2373): `attr.rerun.component_required` implies `required` + +/// A 2D point cloud with positions and optional colors, radii, labels, etc. +table Points2D ( + "attr.rust.derive": "Debug, Clone, PartialEq", + order: 100 +) { + // --- Required --- + + /// All the actual 2D points that make up the point cloud. + points: [rerun.components.Point2D] ("attr.rerun.component_required", required, order: 1000); + + // --- Recommended --- + + /// Optional radii for the points, effectively turning them into circles. + radii: [rerun.components.Radius] ("attr.rerun.component_recommended", order: 2000); + + /// Optional colors for the points. + /// + /// \python The colors are interpreted as RGB or RGBA in sRGB gamma-space, + /// \python As either 0-1 floats or 0-255 integers, with separate alpha. + colors: [rerun.components.Color] ("attr.rerun.component_recommended", order: 2100); + + // --- Optional --- + + /// Optional text labels for the points. + labels: [rerun.components.Label] ("attr.rerun.component_optional", order: 3000); + + /// An optional floating point value that specifies the 2D drawing order. + /// Objects with higher values are drawn on top of those with lower values. + /// + /// The default for 2D points is 30.0. + draw_order: rerun.components.DrawOrder ("attr.rerun.component_optional", order: 3100); + + /// Optional class Ids for the points. + /// + /// The class ID provides colors and labels if not specified explicitly. + class_ids: [rerun.components.ClassId] ("attr.rerun.component_optional", order: 3200); + + /// Optional keypoint IDs for the points, identifying them within a class. + /// + /// If keypoint IDs are passed in but no class IDs were specified, the class ID will + /// default to 0. + /// This is useful to identify points within a single classification (which is identified + /// with `class_id`). + /// E.g. the classification might be 'Person' and the keypoints refer to joints on a + /// detected skeleton. + keypoint_ids: [rerun.components.KeypointId] ("attr.rerun.component_optional", order: 3300); + + /// Unique identifiers for each individual point in the batch. + instance_keys: [rerun.components.InstanceKey] ("attr.rerun.component_optional", order: 3400); +} diff --git a/crates/re_types/definitions/rerun/attributes.fbs b/crates/re_types/definitions/rerun/attributes.fbs new file mode 100644 index 000000000000..5d77bfe5c640 --- /dev/null +++ b/crates/re_types/definitions/rerun/attributes.fbs @@ -0,0 +1,19 @@ +namespace rerun.attributes; + +/// Marks a component as required, which is likely to impact the generated code in +/// backend-specific ways. +/// +/// Only applies to the fields of an archetype. +attribute "attr.rerun.component_required"; + +/// Marks a component as recommended, which is likely to impact the generated code in +/// backend-specific ways. +/// +/// Only applies to the fields of an archetype. +attribute "attr.rerun.component_recommended"; + +/// Marks a component as optional, which is likely to impact the generated code in +/// backend-specific ways. +/// +/// Only applies to the fields of an archetype. +attribute "attr.rerun.component_optional"; diff --git a/crates/re_types/definitions/rerun/components.fbs b/crates/re_types/definitions/rerun/components.fbs new file mode 100644 index 000000000000..bc1b16ff6953 --- /dev/null +++ b/crates/re_types/definitions/rerun/components.fbs @@ -0,0 +1,8 @@ +include "./components/class_id.fbs"; +include "./components/color.fbs"; +include "./components/draw_order.fbs"; +include "./components/instance_key.fbs"; +include "./components/keypoint_id.fbs"; +include "./components/label.fbs"; +include "./components/point2d.fbs"; +include "./components/radius.fbs"; diff --git a/crates/re_types/definitions/rerun/components/class_id.fbs b/crates/re_types/definitions/rerun/components/class_id.fbs new file mode 100644 index 000000000000..56af2d50936c --- /dev/null +++ b/crates/re_types/definitions/rerun/components/class_id.fbs @@ -0,0 +1,23 @@ +include "arrow/attributes.fbs"; +include "python/attributes.fbs"; +include "rust/attributes.fbs"; + +include "rerun/attributes.fbs"; + +namespace rerun.components; + +// --- + +/// A 16-bit ID representing a type of semantic class. +/// +/// \rs Used to look up a `crate::components::ClassDescription` within the `crate::components::AnnotationContext`. +struct ClassId ( + "attr.arrow.transparent", + "attr.python.aliases": "float", + "attr.python.array_aliases": "npt.NDArray[np.uint8], npt.NDArray[np.uint16], npt.NDArray[np.uint32]", + "attr.rust.derive": "Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash", + "attr.rust.tuple_struct", + order: 100 +) { + id: ushort; +} diff --git a/crates/re_types/definitions/rerun/components/color.fbs b/crates/re_types/definitions/rerun/components/color.fbs new file mode 100644 index 000000000000..ec4bef2f2d44 --- /dev/null +++ b/crates/re_types/definitions/rerun/components/color.fbs @@ -0,0 +1,23 @@ +include "arrow/attributes.fbs"; +include "python/attributes.fbs"; +include "rust/attributes.fbs"; + +include "rerun/attributes.fbs"; +include "rerun/datatypes.fbs"; + +namespace rerun.components; + +// --- + +/// An RGBA color tuple with unmultiplied/separate alpha, in sRGB gamma space with linear alpha. +struct Color ( + "attr.arrow.transparent", + "attr.python.aliases": "Sequence[int], Sequence[float], npt.NDArray[np.uint8], npt.NDArray[np.float32], npt.NDArray[np.float64]", + "attr.python.array_aliases": "Sequence[int], Sequence[float], npt.NDArray[np.uint8], npt.NDArray[np.float32], npt.NDArray[np.float64]", + "attr.rust.derive": "Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, bytemuck::Pod, bytemuck::Zeroable", + "attr.rust.repr": "transparent", + "attr.rust.tuple_struct", + order: 100 +) { + rgba: uint; +} diff --git a/crates/re_types/definitions/rerun/components/draw_order.fbs b/crates/re_types/definitions/rerun/components/draw_order.fbs new file mode 100644 index 000000000000..819fb82f26e6 --- /dev/null +++ b/crates/re_types/definitions/rerun/components/draw_order.fbs @@ -0,0 +1,29 @@ +include "arrow/attributes.fbs"; +include "python/attributes.fbs"; +include "rust/attributes.fbs"; + +include "rerun/datatypes.fbs"; +include "rerun/attributes.fbs"; + +namespace rerun.components; + +// --- + +/// Draw order used for the display order of 2D elements. +/// +/// Higher values are drawn on top of lower values. +/// An entity can have only a single draw order component. +/// Within an entity draw order is governed by the order of the components. +/// +/// Draw order for entities with the same draw order is generally undefined. +struct DrawOrder ( + "attr.arrow.transparent", + "attr.python.aliases": "float", + "attr.python.array_aliases": "npt.NDArray[np.float32]", + "attr.rust.derive": "Debug, Clone, Copy, PartialEq, PartialOrd", + "attr.rust.repr": "transparent", + "attr.rust.tuple_struct", + order: 100 +) { + value: float; +} diff --git a/crates/re_types/definitions/rerun/components/instance_key.fbs b/crates/re_types/definitions/rerun/components/instance_key.fbs new file mode 100644 index 000000000000..4f9e74096b0e --- /dev/null +++ b/crates/re_types/definitions/rerun/components/instance_key.fbs @@ -0,0 +1,22 @@ +include "arrow/attributes.fbs"; +include "python/attributes.fbs"; +include "rust/attributes.fbs"; + +include "rerun/datatypes.fbs"; +include "rerun/attributes.fbs"; + +namespace rerun.components; + +// --- + +/// A unique numeric identifier for each individual instance within a batch. +struct InstanceKey ( + "attr.arrow.transparent", + "attr.python.aliases": "int", + "attr.python.array_aliases": "npt.NDArray[np.uint64]", + "attr.rust.tuple_struct", + "attr.rust.derive": "Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord", + order: 100 +) { + value: uint64; +} diff --git a/crates/re_types/definitions/rerun/components/keypoint_id.fbs b/crates/re_types/definitions/rerun/components/keypoint_id.fbs new file mode 100644 index 000000000000..1db9c09f5b63 --- /dev/null +++ b/crates/re_types/definitions/rerun/components/keypoint_id.fbs @@ -0,0 +1,30 @@ +include "arrow/attributes.fbs"; +include "python/attributes.fbs"; +include "rust/attributes.fbs"; + +include "rerun/attributes.fbs"; + +namespace rerun.components; + +// --- + +/// A 16-bit ID representing a type of semantic keypoint within a class. +/// +/// \py `KeypointId`s are only meaningful within the context of a [`rerun.components.ClassDescription`][]. +/// \py +/// \py Used to look up an [`rerun.components.AnnotationInfo`][] for a Keypoint within the +/// \py [`rerun.components.AnnotationContext`]. +/// +/// \rs `KeypointId`s are only meaningful within the context of a `crate::components::ClassDescription`. +/// \rs +/// \rs Used to look up an `crate::components::AnnotationInfo` for a Keypoint within the `crate::components::AnnotationContext`. +struct KeypointId ( + "attr.arrow.transparent", + "attr.python.aliases": "float", + "attr.python.array_aliases": "npt.NDArray[np.uint8], npt.NDArray[np.uint16], npt.NDArray[np.uint32]", + "attr.rust.derive": "Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash", + "attr.rust.tuple_struct", + order: 200 +) { + id: ushort; +} diff --git a/crates/re_types/definitions/rerun/components/label.fbs b/crates/re_types/definitions/rerun/components/label.fbs new file mode 100644 index 000000000000..2e77637c4c53 --- /dev/null +++ b/crates/re_types/definitions/rerun/components/label.fbs @@ -0,0 +1,22 @@ +include "arrow/attributes.fbs"; +include "python/attributes.fbs"; +include "rust/attributes.fbs"; + +include "rerun/datatypes.fbs"; +include "rerun/attributes.fbs"; + +namespace rerun.components; + +// --- + +/// A String label component. +table Label ( + "attr.arrow.transparent", + "attr.python.aliases": "str", + "attr.rust.derive": "Debug, Clone, PartialEq, Eq, PartialOrd, Ord", + "attr.rust.repr": "transparent", + "attr.rust.tuple_struct", + order: 100 +) { + value: string (required, order: 100); +} diff --git a/crates/re_types/definitions/rerun/components/point2d.fbs b/crates/re_types/definitions/rerun/components/point2d.fbs new file mode 100644 index 000000000000..f32ab6dd389d --- /dev/null +++ b/crates/re_types/definitions/rerun/components/point2d.fbs @@ -0,0 +1,25 @@ +include "arrow/attributes.fbs"; +include "python/attributes.fbs"; +include "rust/attributes.fbs"; + +include "rerun/datatypes.fbs"; +include "rerun/attributes.fbs"; + +namespace rerun.components; + +// --- + +/// A point in 2D space. +struct Point2D ( + "attr.arrow.transparent", + "attr.python.aliases": "npt.NDArray[np.float32], Sequence[float], Tuple[float, float]", + "attr.python.array_aliases": "npt.NDArray[np.float32], Sequence[float]", + "attr.rust.tuple_struct", + "attr.rust.derive": "Debug, Default, Clone, Copy, PartialEq, PartialOrd", + order: 100 +) { + position: rerun.datatypes.Vec2D ( + "attr.python.transparent", + order: 100 + ); +} diff --git a/crates/re_types/definitions/rerun/components/radius.fbs b/crates/re_types/definitions/rerun/components/radius.fbs new file mode 100644 index 000000000000..052244aa8ca9 --- /dev/null +++ b/crates/re_types/definitions/rerun/components/radius.fbs @@ -0,0 +1,22 @@ +include "arrow/attributes.fbs"; +include "python/attributes.fbs"; +include "rust/attributes.fbs"; + +include "rerun/datatypes.fbs"; +include "rerun/attributes.fbs"; + +namespace rerun.components; + +// --- + +/// A Radius component. +struct Radius ( + "attr.arrow.transparent", + "attr.python.aliases": "float", + "attr.python.array_aliases": "npt.NDArray[np.float32]", + "attr.rust.tuple_struct", + "attr.rust.derive": "Debug, Clone, Copy, PartialEq, PartialOrd", + order: 100 +) { + value: float; +} diff --git a/crates/re_types/definitions/rerun/datatypes.fbs b/crates/re_types/definitions/rerun/datatypes.fbs new file mode 100644 index 000000000000..3048df042e85 --- /dev/null +++ b/crates/re_types/definitions/rerun/datatypes.fbs @@ -0,0 +1,3 @@ +include "./datatypes/vec2d.fbs"; + +namespace rerun.datatypes; diff --git a/crates/re_types/definitions/rerun/datatypes/vec2d.fbs b/crates/re_types/definitions/rerun/datatypes/vec2d.fbs new file mode 100644 index 000000000000..9fc31cbb3f18 --- /dev/null +++ b/crates/re_types/definitions/rerun/datatypes/vec2d.fbs @@ -0,0 +1,17 @@ +include "arrow/attributes.fbs"; +include "fbs/attributes.fbs"; +include "rust/attributes.fbs"; + +namespace rerun.datatypes; + +// --- + +/// A vector in 2D space. +struct Vec2D ( + "attr.arrow.transparent", + "attr.rust.derive": "Debug, Default, Clone, Copy, PartialEq, PartialOrd", + "attr.rust.tuple_struct", + order: 100 +) { + xy: [float: 2]; +} diff --git a/crates/re_types/definitions/rust/attributes.fbs b/crates/re_types/definitions/rust/attributes.fbs index 58a8fac6b070..eba209568488 100644 --- a/crates/re_types/definitions/rust/attributes.fbs +++ b/crates/re_types/definitions/rust/attributes.fbs @@ -3,13 +3,13 @@ namespace rust.attributes; /// Apply to a struct or table object to generate a tuple struct. /// /// The type definition of the target object must have exactly a single field. -attribute "rust.attr.tuple_struct"; +attribute "attr.rust.tuple_struct"; /// Apply to any object to generate a #derive clause. /// /// The value of the attribute will be trimmed out but otherwise left as-is. -/// E.g. "rust.attr.derive": "Debug, Clone, Copy"`. -attribute "rust.attr.derive"; +/// E.g. "attr.rust.derive": "Debug, Clone, Copy"`. +attribute "attr.rust.derive"; /// Apply to any object to generate a #repr clause with the specified value. -attribute "rust.attr.repr"; +attribute "attr.rust.repr"; diff --git a/crates/re_types/source_hash.txt b/crates/re_types/source_hash.txt index a5681461859d..fdbfe6cf0c48 100644 --- a/crates/re_types/source_hash.txt +++ b/crates/re_types/source_hash.txt @@ -1,4 +1,4 @@ # This is a sha256 hash for all direct and indirect dependencies of this crate's build script. # It can be safely removed at anytime to force the build script to run again. # Check out build.rs to see how it's computed. -dae77f291d1698807cd865265cbb77731bd1aedf07c0968a6b0ac67c18f94590 \ No newline at end of file +95c13226f31d47e4639e155fc80ee6830579c50e38ee1d997b4bda4d23ba03b6 \ No newline at end of file diff --git a/crates/re_types_builder/src/arrow_registry.rs b/crates/re_types_builder/src/arrow_registry.rs index 505d0ccd253a..4a59b18bac0c 100644 --- a/crates/re_types_builder/src/arrow_registry.rs +++ b/crates/re_types_builder/src/arrow_registry.rs @@ -4,7 +4,7 @@ use anyhow::Context as _; use arrow2::datatypes::{DataType, Field, UnionMode}; use std::collections::{BTreeMap, HashMap}; -use crate::{ElementType, Object, Type, ARROW_ATTR_SPARSE_UNION, ARROW_ATTR_TRANSPARENT}; +use crate::{ElementType, Object, Type, ATTR_ARROW_SPARSE_UNION, ATTR_ARROW_TRANSPARENT}; // --- Registry --- @@ -50,7 +50,7 @@ impl ArrowRegistry { fn arrow_datatype_from_object(&self, obj: &Object) -> LazyDatatype { let is_struct = obj.is_struct(); - let is_transparent = obj.try_get_attr::(ARROW_ATTR_TRANSPARENT).is_some(); + let is_transparent = obj.try_get_attr::(ATTR_ARROW_TRANSPARENT).is_some(); let num_fields = obj.fields.len(); assert!( @@ -79,7 +79,7 @@ impl ArrowRegistry { ) } else { let is_sparse = obj - .try_get_attr::(ARROW_ATTR_SPARSE_UNION) + .try_get_attr::(ATTR_ARROW_SPARSE_UNION) .is_some(); LazyDatatype::Extension( obj.fqname.clone(), diff --git a/crates/re_types_builder/src/codegen/python.rs b/crates/re_types_builder/src/codegen/python.rs index a695cbee5970..37df314ed9e6 100644 --- a/crates/re_types_builder/src/codegen/python.rs +++ b/crates/re_types_builder/src/codegen/python.rs @@ -10,7 +10,7 @@ use std::{ use crate::{ codegen::{StringExt as _, AUTOGEN_WARNING}, ArrowRegistry, CodeGenerator, Docs, ElementType, Object, ObjectField, ObjectKind, Objects, - Type, PYTHON_ATTR_ALIASES, PYTHON_ATTR_ARRAY_ALIASES, PYTHON_ATTR_TRANSPARENT, + Type, ATTR_PYTHON_ALIASES, ATTR_PYTHON_ARRAY_ALIASES, ATTR_PYTHON_TRANSPARENT, }; // --- @@ -544,9 +544,9 @@ fn quote_str_method_from_obj(objects: &Objects, obj: &Object) -> String { fn quote_aliases_from_object(obj: &Object) -> String { assert!(obj.kind != ObjectKind::Archetype); - let aliases = obj.try_get_attr::(PYTHON_ATTR_ALIASES); + let aliases = obj.try_get_attr::(ATTR_PYTHON_ALIASES); let array_aliases = obj - .try_get_attr::(PYTHON_ATTR_ARRAY_ALIASES) + .try_get_attr::(ATTR_PYTHON_ARRAY_ALIASES) .unwrap_or_default(); let name = &obj.name; @@ -682,7 +682,7 @@ fn quote_field_type_from_field( // agnostic) in a python specific quoting function... a static helper at the very least // would be nice. let is_transparent = field - .try_get_attr::(PYTHON_ATTR_TRANSPARENT) + .try_get_attr::(ATTR_PYTHON_TRANSPARENT) .is_some(); if is_transparent { let target = objects.get(fqname); diff --git a/crates/re_types_builder/src/codegen/rust.rs b/crates/re_types_builder/src/codegen/rust.rs index ae87dedf9398..9e78c7a984ec 100644 --- a/crates/re_types_builder/src/codegen/rust.rs +++ b/crates/re_types_builder/src/codegen/rust.rs @@ -10,8 +10,8 @@ use std::{ use crate::{ codegen::{StringExt as _, AUTOGEN_WARNING}, ArrowRegistry, CodeGenerator, Docs, ElementType, Object, ObjectField, ObjectKind, Objects, - Type, RERUN_ATTR_COMPONENT_OPTIONAL, RERUN_ATTR_COMPONENT_RECOMMENDED, - RERUN_ATTR_COMPONENT_REQUIRED, RUST_ATTR_DERIVE, RUST_ATTR_REPR, RUST_ATTR_TUPLE_STRUCT, + Type, ATTR_RERUN_COMPONENT_OPTIONAL, ATTR_RERUN_COMPONENT_RECOMMENDED, + ATTR_RERUN_COMPONENT_REQUIRED, ATTR_RUST_DERIVE, ATTR_RUST_REPR, ATTR_RUST_TUPLE_STRUCT, }; // --- @@ -392,19 +392,19 @@ fn quote_type_from_element_type(typ: &ElementType) -> String { } fn quote_derive_clause_from_obj(obj: &Object) -> Option { - obj.try_get_attr::(RUST_ATTR_DERIVE) + obj.try_get_attr::(ATTR_RUST_DERIVE) .map(|what| format!("#[derive({what})]")) } fn quote_repr_clause_from_obj(obj: &Object) -> Option { - obj.try_get_attr::(RUST_ATTR_REPR) + obj.try_get_attr::(ATTR_RUST_REPR) .map(|what| format!("#[repr({what})]")) } fn is_tuple_struct_from_obj(obj: &Object) -> bool { obj.is_struct() && obj.fields.len() == 1 - && obj.try_get_attr::(RUST_ATTR_TUPLE_STRUCT).is_some() + && obj.try_get_attr::(ATTR_RUST_TUPLE_STRUCT).is_some() } fn quote_trait_impls_from_obj(arrow_registry: &ArrowRegistry, obj: &Object) -> String { @@ -471,10 +471,10 @@ fn quote_trait_impls_from_obj(arrow_registry: &ArrowRegistry, obj: &Object) -> S (num_components, components) } - let (num_required, required) = compute_components(obj, RERUN_ATTR_COMPONENT_REQUIRED); + let (num_required, required) = compute_components(obj, ATTR_RERUN_COMPONENT_REQUIRED); let (num_recommended, recommended) = - compute_components(obj, RERUN_ATTR_COMPONENT_RECOMMENDED); - let (num_optional, optional) = compute_components(obj, RERUN_ATTR_COMPONENT_OPTIONAL); + compute_components(obj, ATTR_RERUN_COMPONENT_RECOMMENDED); + let (num_optional, optional) = compute_components(obj, ATTR_RERUN_COMPONENT_OPTIONAL); let num_all = num_required + num_recommended + num_optional; let all = [required.as_str(), recommended.as_str(), optional.as_str()] diff --git a/crates/re_types_builder/src/lib.rs b/crates/re_types_builder/src/lib.rs index 71669189d7f6..ded329c85506 100644 --- a/crates/re_types_builder/src/lib.rs +++ b/crates/re_types_builder/src/lib.rs @@ -15,7 +15,7 @@ //! //! Look for `compile_binary_schemas` in the code. //! -//! ####. 2. Run the semantic pass. +//! #### 2. Run the semantic pass. //! //! The semantic pass transforms the low-level raw reflection data generated by the first phase //! into higher level objects that are much easier to inspect/manipulate and overall friendlier @@ -23,13 +23,13 @@ //! //! Look for `objects.rs`. //! -//! ####. 3. Fill the Arrow registry. +//! #### 3. Fill the Arrow registry. //! //! The Arrow registry keeps track of all type definitions and maps them to Arrow datatypes. //! //! Look for `arrow_registry.rs`. //! -//! ####. 4. Run the actual codegen pass for a given language. +//! #### 4. Run the actual codegen pass for a given language. //! //! We currently have two different codegen passes implemented at the moment: Python & Rust. //! @@ -101,20 +101,20 @@ pub use self::objects::{ // --- Attributes --- -pub const ARROW_ATTR_TRANSPARENT: &str = "arrow.attr.transparent"; -pub const ARROW_ATTR_SPARSE_UNION: &str = "arrow.attr.sparse_union"; +pub const ATTR_ARROW_TRANSPARENT: &str = "attr.arrow.transparent"; +pub const ATTR_ARROW_SPARSE_UNION: &str = "attr.arrow.sparse_union"; -pub const RERUN_ATTR_COMPONENT_REQUIRED: &str = "rerun.attr.component_required"; -pub const RERUN_ATTR_COMPONENT_RECOMMENDED: &str = "rerun.attr.component_recommended"; -pub const RERUN_ATTR_COMPONENT_OPTIONAL: &str = "rerun.attr.component_optional"; +pub const ATTR_RERUN_COMPONENT_REQUIRED: &str = "attr.rerun.component_required"; +pub const ATTR_RERUN_COMPONENT_RECOMMENDED: &str = "attr.rerun.component_recommended"; +pub const ATTR_RERUN_COMPONENT_OPTIONAL: &str = "attr.rerun.component_optional"; -pub const PYTHON_ATTR_TRANSPARENT: &str = "python.attr.transparent"; -pub const PYTHON_ATTR_ALIASES: &str = "python.attr.aliases"; -pub const PYTHON_ATTR_ARRAY_ALIASES: &str = "python.attr.array_aliases"; +pub const ATTR_PYTHON_TRANSPARENT: &str = "attr.python.transparent"; +pub const ATTR_PYTHON_ALIASES: &str = "attr.python.aliases"; +pub const ATTR_PYTHON_ARRAY_ALIASES: &str = "attr.python.array_aliases"; -pub const RUST_ATTR_DERIVE: &str = "rust.attr.derive"; -pub const RUST_ATTR_REPR: &str = "rust.attr.repr"; -pub const RUST_ATTR_TUPLE_STRUCT: &str = "rust.attr.tuple_struct"; +pub const ATTR_RUST_DERIVE: &str = "attr.rust.derive"; +pub const ATTR_RUST_REPR: &str = "attr.rust.repr"; +pub const ATTR_RUST_TUPLE_STRUCT: &str = "attr.rust.tuple_struct"; // --- Entrypoints ---