Skip to content

visualization engine components#89

Merged
jonmmease merged 319 commits into
mainfrom
jonmmease/scales
Jun 28, 2025
Merged

visualization engine components#89
jonmmease merged 319 commits into
mainfrom
jonmmease/scales

Conversation

@jonmmease

Copy link
Copy Markdown
Owner

Adds a bunch of "visualization engine" components:

  • Scene Graph Layer (avenger-scenegraph): Abstract representation of visual elements
  • Rendering Layer (avenger-wgpu): GPU-accelerated rendering implementation
  • Event Handling Layer (avenger-eventstream): Reactive event system
  • Application Layer (avenger-app): High-level application framework
  • Integration Layer (avenger-vega-scenegraph): Vega/Vega-Lite compatibility
  • Scales (avenger-scales): Vega-style scales
  • Guides (avenger-guides): Vega-style axis and legend builders
  • Geometry (avenger-geometry): R-tree representation of scenegraph for hit testing and bounding box calculations

jonmmease and others added 27 commits May 30, 2025 12:11
This commit updates wgpu and adapts the codebase to API changes:
- Updated wgpu::Instance::new() to take a reference
- Changed device.poll() to use PollType instead of Maintain
- Added trace field to DeviceDescriptor
- Updated error handling for request_adapter
- Renamed deprecated image copy types to new names
- Added handling for new SurfaceError::Other variant
- Updated capture method names in comments

All tests pass, including test_image_baselines.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updated dependencies:
- Patch updates: image, winit, chrono, geo-types, lyon crates, tracing, etc.
- Minor updates: lazy_static, rayon, itertools, reqwest
- Fixed pollster version inconsistency (0.3 → 0.4.0)
- Fixed wasm32 wgpu override (23.0.1 → 25.0.2)
- Updated web-sys across all examples (0.3.67 → 0.3.77)

Created tasks/crate_updates.md to track complex major version updates
that require more investigation (PyO3, cosmic-text, geo, etc.)

All tests pass after updates.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Successfully updated cosmic-text with minimal changes:
- Changed buffer.set_text() to take &attrs instead of attrs
- Updated unit test expected value to match new text metrics behavior
- All text rendering tests pass

The update was straightforward as the codebase was already using
the newer API patterns (physical glyphs, etc.).

Also updated tasks/crate_updates.md to remove completed cosmic-text
update and mark fixed inconsistencies.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Investigated updating geo from 0.29.3 to 0.30.0:
- Found that geo-svg 0.7.3 (latest on crates.io) still depends on geo 0.29
- geo-svg main branch supports geo 0.30 but hasn't been released yet
- geo-svg is only used for debugging/visualization (not critical functionality)
- The codebase doesn't use any of geo 0.30's breaking change methods

Updated tasks/crate_updates.md to document:
- geo 0.30 update is blocked by geo-svg
- Listed the breaking changes in geo 0.30
- Noted that the update should be straightforward once geo-svg is updated

Per user request, keeping existing versions from crates.io rather than
using git dependencies.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Successfully updated ordered-float with no code changes required.

Breaking changes in ordered-float 5.0:
- Hash implementation now only for f32 and f64 (not generic Float)
- Removed implicit panics in NotNan<T> x T operators

Our codebase only uses OrderedFloat for hashing f32/f64 values and
doesn't use NotNan, so the breaking changes don't affect us.

All tests pass after the update.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
No code changes required as the codebase only uses VariantNames trait,
which was not affected by the breaking changes in strum 0.27.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
No code changes required - the API remains compatible for our usage
of SVG parsing and rendering functionality.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
No code changes required - the codebase only uses PyO3 for error
conversion (From<Error> for PyErr), which hasn't changed in the API.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- Add workspace-wide test execution
- Add separate doc test execution
- Tests now run as part of CI on Ubuntu
The avenger-wgpu tests require GPU access which is not available
in headless CI environments, causing MakeWgpuAdapterError.
This change excludes the avenger-wgpu crate from test runs
while still building it to ensure compilation.
- Fixed cargo fmt compliance issues
- Allow clippy::await_holding_refcell_ref warnings in async code
  where RefCell borrows are needed across await points
Move #[allow(clippy::await_holding_refcell_ref)] attributes outside async blocks
to properly suppress the warnings. The attributes need to be on the statement
that creates the async block, not inside it.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add #[allow(clippy::new_ret_no_self)] to all scale new() methods that return
ConfiguredScale instead of Self. This is intentional design - these are factory
methods that create configured instances.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add #[allow(clippy::too_many_arguments)] to make_line_group function
  in avenger-guides legend module

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jonmmease jonmmease merged commit 9bc0731 into main Jun 28, 2025
1 check passed
@airstrike

Copy link
Copy Markdown

Great to see so much progress! Btw you don't need to name all subcrate directories avenger-foo if you don't want to. The directory can be named something different than the actual crate. If you're looking for an example, see https://github.com/iced-rs/iced and its subcrates/directories.

@jonmmease

Copy link
Copy Markdown
Owner Author

Thanks @airstrike, that's a good callout and I'll think about it. I'm not sure why I got in the habit of doing it this way initially, but I kind of like being able to easily see the difference between top level directories that are crates and those that aren't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants