linebender / linebender/piet

Unresolved import `direct2d::math`

Open
#33 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.4k
Forks
98
PR merge metrics
No merged PRs in 30d

Description

I am (probably naively) trying to run "cargo build" on a fresh pull of `piet` and I'm seeing several errors in the build, e.g.:

```
error[E0432]: unresolved import `direct2d::math`
--> piet-direct2d/src/conv.rs:3:15
|
3 | use direct2d::math::{Matrix3x2F, Point2F, RectF};
| ^^^^ could not find `math` in `direct2d`

error[E0433]: failed to resolve: could not find `shared` in `winapi`
--> piet-direct2d/src/lib.rs:11:13
|
11 | use winapi::shared::basetsd::UINT32;
| ^^^^^^ could not find `shared` in `winapi`

error[E0433]: failed to resolve: could not find `um` in `winapi`
--> piet-direct2d/src/lib.rs:12:13
|
12 | use winapi::um::dcommon::D2D_SIZE_U;
| ^^ could not find `um` in `winapi`
```

I assume that as a new user of rust I just don't know what I'm doing :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported errors with cargo build on a fresh piet checkout. Inspect the imports in piet-direct2d/src/conv.rs and piet-direct2d/src/lib.rs, then determine why direct2d::math and the winapi modules are unavailable. Done means the project builds successfully with these imports resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.