Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Jun 27, 2023
1 parent 1eb3e4b commit d8065fa
Show file tree
Hide file tree
Showing 51 changed files with 10,087 additions and 6,049 deletions.
6,765 changes: 842 additions & 5,923 deletions Cargo.lock

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
[workspace]
resolver = "2"
members = [
"crates/*",
"examples/rust/*",
"docs/code-examples",
"rerun_py",
"run_wasm",
"tests/rust/*",
"crates/re_build_tools",
"crates/re_types_builder",
"crates/re_types",
# "crates/*",
# "examples/rust/*",
# "docs/code-examples",
# "rerun_py",
# "run_wasm",
# "tests/rust/*",
]

[workspace.package]
Expand Down
7 changes: 4 additions & 3 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ extend-exclude = [


[default.extend-words]
lod = "lod" # level-of-detail
teh = "teh" # part of @teh-cmc
ND = "ND" # np.NDArray
lod = "lod" # level-of-detail
teh = "teh" # part of @teh-cmc
ND = "ND" # np.NDArray
somes = "somes" # many `Some`

# American English:
grey = "gray"
Expand Down
6 changes: 6 additions & 0 deletions crates/re_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,20 @@ glam = ["dep:glam", "dep:macaw"]

[dependencies]

# Rerun
re_log_types.workspace = true

# External
arrow2 = { workspace = true, features = [
"io_ipc",
"io_print",
"compute_concatenate",
] }
anyhow.workspace = true
bytemuck = { version = "1.11", features = ["derive", "extern_crate_alloc"] }
document-features = "0.2"
itertools.workspace = true
thiserror.workspace = true

# External (optional)
ecolor = { workspace = true, optional = true }
Expand Down
2 changes: 2 additions & 0 deletions crates/re_types/definitions/rerun/archetypes.fbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include "./archetypes/points2d.fbs";

include "./testing/archetypes/fuzzy.fbs";

namespace rerun.archetypes;
1 change: 0 additions & 1 deletion crates/re_types/definitions/rerun/archetypes/points2d.fbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include "fbs/attributes.fbs";

include "rerun/datatypes.fbs";
include "rerun/components.fbs";

namespace rerun.archetypes;
Expand Down
50 changes: 50 additions & 0 deletions crates/re_types/definitions/rerun/testing/archetypes/fuzzy.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
include "fbs/attributes.fbs";

include "rerun/testing/components/fuzzy.fbs";

namespace rerun.testing.archetypes;

// ---

// TODO(cmc): we actually have an opportunity to resolve the nullability situation here if we make
// component_required vs. required do different things:
// - component_required affects the nullability of the component itself at the archetype level (as it does today)
// - required affects the nullability of the element values for the underlying array (both native and arrow)

table AffixFuzzer1 (
"attr.rust.derive": "Debug, Clone, PartialEq",
order: 100
) {
fuzz1001: rerun.testing.components.AffixFuzzer1 ("attr.rerun.component_required", required, order: 1001);
fuzz1002: rerun.testing.components.AffixFuzzer2 ("attr.rerun.component_required", required, order: 1002);
fuzz1003: rerun.testing.components.AffixFuzzer3 ("attr.rerun.component_required", required, order: 1003);
fuzz1004: rerun.testing.components.AffixFuzzer4 ("attr.rerun.component_required", required, order: 1004);
fuzz1005: rerun.testing.components.AffixFuzzer5 ("attr.rerun.component_required", required, order: 1005);
fuzz1006: rerun.testing.components.AffixFuzzer6 ("attr.rerun.component_required", required, order: 1006);
fuzz1007: rerun.testing.components.AffixFuzzer7 ("attr.rerun.component_required", required, order: 1007);

fuzz1101: [rerun.testing.components.AffixFuzzer1] ("attr.rerun.component_required", required, order: 1101);
fuzz1102: [rerun.testing.components.AffixFuzzer2] ("attr.rerun.component_required", required, order: 1102);
fuzz1103: [rerun.testing.components.AffixFuzzer3] ("attr.rerun.component_required", required, order: 1103);
fuzz1104: [rerun.testing.components.AffixFuzzer4] ("attr.rerun.component_required", required, order: 1104);
fuzz1105: [rerun.testing.components.AffixFuzzer5] ("attr.rerun.component_required", required, order: 1105);
fuzz1106: [rerun.testing.components.AffixFuzzer6] ("attr.rerun.component_required", required, order: 1106);
fuzz1107: [rerun.testing.components.AffixFuzzer7] ("attr.rerun.component_required", required, order: 1107);

fuzz2001: rerun.testing.components.AffixFuzzer1 ("attr.rerun.component_optional", order: 2001);
fuzz2002: rerun.testing.components.AffixFuzzer2 ("attr.rerun.component_optional", order: 2002);
fuzz2003: rerun.testing.components.AffixFuzzer3 ("attr.rerun.component_optional", order: 2003);
fuzz2004: rerun.testing.components.AffixFuzzer4 ("attr.rerun.component_optional", order: 2004);
fuzz2005: rerun.testing.components.AffixFuzzer5 ("attr.rerun.component_optional", order: 2005);
fuzz2006: rerun.testing.components.AffixFuzzer6 ("attr.rerun.component_optional", order: 2006);
fuzz2007: rerun.testing.components.AffixFuzzer7 ("attr.rerun.component_optional", order: 2007);

fuzz2101: [rerun.testing.components.AffixFuzzer1] ("attr.rerun.component_optional", order: 2101);
fuzz2102: [rerun.testing.components.AffixFuzzer2] ("attr.rerun.component_optional", order: 2102);
fuzz2103: [rerun.testing.components.AffixFuzzer3] ("attr.rerun.component_optional", order: 2103);
fuzz2104: [rerun.testing.components.AffixFuzzer4] ("attr.rerun.component_optional", order: 2104);
fuzz2105: [rerun.testing.components.AffixFuzzer5] ("attr.rerun.component_optional", order: 2105);
fuzz2106: [rerun.testing.components.AffixFuzzer6] ("attr.rerun.component_optional", order: 2106);
fuzz2107: [rerun.testing.components.AffixFuzzer7] ("attr.rerun.component_optional", order: 2107);
}

72 changes: 72 additions & 0 deletions crates/re_types/definitions/rerun/testing/components/fuzzy.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
include "arrow/attributes.fbs";
include "fbs/attributes.fbs";
include "rust/attributes.fbs";

include "rerun/testing/datatypes/fuzzy.fbs";

namespace rerun.testing.components;

// ---

table AffixFuzzer1 (
"attr.arrow.transparent",
"attr.rust.derive": "Debug, Clone, PartialEq",
order: 100
) {
single_required: rerun.testing.datatypes.AffixFuzzer1 (required);
}

table AffixFuzzer2 (
"attr.arrow.transparent",
"attr.rust.derive": "Debug, Clone, PartialEq",
"attr.rust.tuple_struct",
order: 200
) {
single_required: rerun.testing.datatypes.AffixFuzzer1 (required);
}

table AffixFuzzer3 (
"attr.rust.derive": "Debug, Clone, PartialEq",
order: 300
) {
single_required: rerun.testing.datatypes.AffixFuzzer1 (required);
}

table AffixFuzzer4 (
"attr.arrow.transparent",
"attr.rust.derive": "Debug, Clone, PartialEq",
order: 400
) {
single_optional: rerun.testing.datatypes.AffixFuzzer1;
}

table AffixFuzzer5 (
"attr.arrow.transparent",
"attr.rust.derive": "Debug, Clone, PartialEq",
"attr.rust.tuple_struct",
order: 500
) {
single_optional: rerun.testing.datatypes.AffixFuzzer1;
}

table AffixFuzzer6 (
"attr.rust.derive": "Debug, Clone, PartialEq",
order: 600
) {
single_optional: rerun.testing.datatypes.AffixFuzzer1;
}

table AffixFuzzer7 (
"attr.rust.derive": "Debug, Clone, PartialEq",
order: 700
) {
many_optional: [rerun.testing.datatypes.AffixFuzzer1] (order: 100);
single_float_optional: float (order: 101);
single_string_required: string (order: 102, required);
single_string_optional: string (order: 103);
many_floats_optional: [float] (order: 104);
many_strings_required: [string] (order: 105, required);
many_strings_optional: [string] (order: 106);
// TODO(cmc): the ugly bug we need to take care of at some point
// many_transparent_optionals: rerun.testing.datatypes.AffixFuzzer2 (order: 107);
}
28 changes: 28 additions & 0 deletions crates/re_types/definitions/rerun/testing/datatypes/fuzzy.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
include "arrow/attributes.fbs";
include "fbs/attributes.fbs";
include "rust/attributes.fbs";

namespace rerun.testing.datatypes;

// ---

table AffixFuzzer1 (
"attr.rust.derive": "Debug, Clone, PartialEq",
order: 100
) {
single_float_optional: float (order: 101);
single_string_required: string (order: 102, required);
single_string_optional: string (order: 103);
many_floats_optional: [float] (order: 104);
many_strings_required: [string] (order: 105, required);
many_strings_optional: [string] (order: 106);
}

table AffixFuzzer2 (
"attr.arrow.transparent",
"attr.rust.derive": "Debug, Clone, PartialEq",
"attr.rust.tuple_struct",
order: 200
) {
single_float_optional: float (order: 101);
}
2 changes: 1 addition & 1 deletion crates/re_types/source_hash.txt
Original file line number Diff line number Diff line change
@@ -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.
ea902e939a081ac25e71769d8927ad409d74b9eb961a7c919f946be50630ed39
0bb36d54cd4c56810abe7dd942f07640e9ddf91d927b6b729a201927fef98e7e
Loading

0 comments on commit d8065fa

Please sign in to comment.