1 unstable release

0.0.1 Oct 31, 2020

#5 in #pebble

MIT/Apache

48KB
1K SLoC

pebble-skip

Lib.rs Crates.io Docs.rs

Rust nightly-2020-10-30 Build Status Crates.io - License

GitHub open issues open pull requests crev reviews

This is a Semi-transparent high-level API wrapper for Pebble (watch) SDK 4.3, available at https://developer.rebble.io/developer.pebble.com/sdk/index.html.

The Pebble SDK isn't automatically included, but you can build a statically linked library and the use the official toolchain to link and package the watch app. See here for an example.

This crate is still heavily work in progress, so expect frequent breaking changes and missing functionality before 0.1. If you'd like me to prioritise a specific API, please file a feature request on GitHub.

Installation

Please use cargo-edit to always add the latest version of this library:

cargo add pebble-skip

Example

#![no_std]

use debugless_unwrap::DebuglessUnwrap as _;
use pebble_skip::{
  foundation::app,
  standard_c::CStr,
  user_interface::window::number_window::{NumberWindow, NumberWindowData},
};

#[no_mangle]
pub extern "C" fn main() -> i32 {
  let label = CStr::try_from_static("miles to see you\0").unwrap();
  let number_window = NumberWindow::new(
    &label,
    NumberWindowData {
      incremented: |_, _| (),
      decremented: |_, _| (),
      selected: |_, _| (),
      context: (),
    },
  )
  .debugless_unwrap();
  number_window.set_value(10_000);
  let window = number_window.window();
  window.show(true);
  app::event_loop();
  0
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Code of Conduct

Changelog

Versioning

pebble-skip strictly follows Semantic Versioning 2.0.0 with the following exceptions:

  • The minor version will not reset to 0 on major version changes (except for v1).
    Consider it the global feature level.
  • The patch version will not reset to 0 on major or minor version changes (except for v0.1 and v1).
    Consider it the global patch level.

This includes the Rust version requirement specified above.
Earlier Rust versions may be compatible, but this can change with minor or patch releases.

Which versions are affected by features and patches can be determined from the respective headings in CHANGELOG.md.

Dependencies

~41KB