Skip to content

Commit

Permalink
Isolate testing types in Rust backend (#2810)
Browse files Browse the repository at this point in the history
Testing types now live under `re_types/src/testing`, which is itself
feature gated behind the `testing` flag.

Fixes #2809 
Part of #2537 

### What

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2810) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2810)
- [Docs
preview](https://rerun.io/preview/pr%3Acmc%2Frust_exclude_fuzzy/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Acmc%2Frust_exclude_fuzzy/examples)
  • Loading branch information
teh-cmc authored Jul 25, 2023
1 parent 381a847 commit 775e789
Show file tree
Hide file tree
Showing 17 changed files with 1,126 additions and 1,176 deletions.
9 changes: 6 additions & 3 deletions crates/re_types/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion crates/re_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ version.workspace = true


[package.metadata.docs.rs]
all-features = true
all-features = false
no-default-features = true
features = ["all"]


[features]
default = []

## All features except `testing`.
all = ["ecolor", "glam", "serde"]

## Enable color conversions.
ecolor = ["dep:ecolor"]

Expand All @@ -29,6 +34,10 @@ glam = ["dep:glam", "dep:macaw"]
## Enable (de)serialization using serde.
serde = ["dep:serde", "re_string_interner/serde"]

## Include testing archetypes/components/datatypes into the crate.
## Only useful for testing purposes.
testing = []

[dependencies]
# Rerun
re_error.workspace = true
Expand Down Expand Up @@ -74,3 +83,9 @@ re_types_builder.workspace = true

# External
rayon.workspace = true


[[test]]
name = "fuzzy"
path = "tests/fuzzy.rs"
required-features = ["testing"]
2 changes: 1 addition & 1 deletion crates/re_types/source_hash.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions crates/re_types/src/archetypes/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions crates/re_types/src/components/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions crates/re_types/src/datatypes/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion crates/re_types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,14 @@ impl<T> ResultExt<T> for DeserializationResult<T> {
pub const DISPLAY_PRECISION: usize = 3;

pub mod archetypes;
mod component_name;
pub mod components;
pub mod datatypes;

mod component_name;
mod size_bytes;

pub use component_name::ComponentName;
pub use size_bytes::SizeBytes;

#[cfg(feature = "testing")]
pub mod testing;
Loading

0 comments on commit 775e789

Please sign in to comment.