dfrankland / bluster

A Rust crate for implementing BLE (Bluetooth Low Energy) peripherals
https://crates.io/crates/bluster
MIT License
111 stars 33 forks source link

Compilation Fails on MacOS #39

Open wbrickner opened 3 years ago

wbrickner commented 3 years ago

Clean project, add bluster as dependency.

use bluster::Peripheral;

pub fn main() { }

$ cargo check yields

error[E0282]: type annotations needed
  --> /Users/wbrickner/.cargo/registry/src/github.com-1ecc6299db9ec823/bluster-0.1.2/src/peripheral/corebluetooth/events.rs:86:9
   |
86 | /         msg_send![peripheral, respondToRequest:request
87 | |                                     withResult:CBATTError::CBATTErrorSuccess];
   | |______________________________________________________________________________^ consider giving `result` a type
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed
   --> /Users/wbrickner/.cargo/registry/src/github.com-1ecc6299db9ec823/bluster-0.1.2/src/peripheral/corebluetooth/events.rs:99:13
    |
99  | /             msg_send![peripheral, respondToRequest:request
100 | |                                         withResult:CBATTError::CBATTErrorSuccess];
    | |__________________________________________________________________________________^ consider giving `result` a type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed
   --> /Users/wbrickner/.cargo/registry/src/github.com-1ecc6299db9ec823/bluster-0.1.2/src/peripheral/corebluetooth/peripheral_manager.rs:141:13
    |
141 |             msg_send![peripheral_manager, startAdvertising: advertising_data];
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider giving `result` a type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed
   --> /Users/wbrickner/.cargo/registry/src/github.com-1ecc6299db9ec823/bluster-0.1.2/src/peripheral/corebluetooth/peripheral_manager.rs:150:13
    |
150 |             msg_send![peripheral_manager, stopAdvertising];
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider giving `result` a type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed
   --> /Users/wbrickner/.cargo/registry/src/github.com-1ecc6299db9ec823/bluster-0.1.2/src/peripheral/corebluetooth/peripheral_manager.rs:196:13
    |
196 | /             msg_send![service, setValue:NSArray::from_vec(characteristics)
197 | |                                  forKey:NSString::from_str("characteristics")];
    | |_______________________________________________________________________________^ consider giving `result` a type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0282`.
error: could not compile `bluster`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
dfrankland commented 3 years ago

I think this might be fixed on master, but isn't published yet. We could publish to crates.io

wbrickner commented 3 years ago

Will try to check soon and report back with results.

enochc commented 3 years ago

This is compiling fine for me on mac using version 0.1.3