raymanfx / eye-rs

Cross platform camera capture in Rust
MIT License
140 stars 10 forks source link

Can't run example #6

Closed rawnly closed 1 year ago

rawnly commented 1 year ago

Hello! Cool project! But I'm not able to run any of your examples / readme. Platform: macos 13.0

CleanShot 2023-01-17 at 22 14 06@2x

raymanfx commented 1 year ago

Hi, it looks like you might be using an old checkout of the source? The particular line referenced by your error message is here: https://github.com/raymanfx/eye-rs/blob/master/eye-hal/src/platform/mod.rs#L49 but points to something completely different. The default method does not exist anymore for the Context type in the latest master branch.

Let me know whether that makes sense. I am building on Ventura 13.1 myself.

rawnly commented 1 year ago

Yeah I saw the source code. But the only thing I did was cargo add eye_halt :/ I'll try manually

rawnly commented 1 year ago

The version is the right one... Here's myCargo.toml

[package]
name = "my-project"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
eye-hal = "0.1.0"
raymanfx commented 1 year ago

I see, the reason for the confusion is that they 0.1.0 published version of eye-hal is "outdated". The latest code in this repository has not been released yet. You'll need to point your Cargo.toml at this GitHub repo explicitly:

eye-hal = { git = "https://github.com/raymanfx/eye-rs", branch = "master" }