Crates.io | pebble-skip |
lib.rs | pebble-skip |
version | 0.0.1 |
source | src |
created_at | 2020-10-31 11:54:29.313422 |
updated_at | 2020-10-31 11:54:29.313422 |
description | High-level API wrapper for Pebble (watch) SDK 4.3 |
homepage | https://github.com/Tamschi/pebble-skip/tree/v0.0.1 |
repository | https://github.com/Tamschi/pebble-skip |
max_upload_size | |
id | 307226 |
size | 61,205 |
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
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:
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.