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.
Please use cargo-edit to always add the latest version of this library:
cargo add pebble-skip
#![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
}
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
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.
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.