playdate-sys 0.3.6

Low-level Playdate API bindings
Documentation
[package]
name = "playdate-sys"
version = "0.3.6"
build = "src/build.rs"
readme = "README.md"
description = "Low-level Playdate API bindings"
keywords = ["playdate", "bindings", "ffi", "gamedev"]
categories = [
	"external-ffi-bindings",
	"development-tools::ffi",
	"game-development",
	"no-std",
]
edition.workspace = true
license.workspace = true
authors.workspace = true
homepage.workspace = true
repository.workspace = true


[features]
default = ["bindgen-runtime", "bindings-derive-debug"]

lang-items = ["allocator", "panic-handler", "eh-personality"] # lang-items
allocator = []                                                # global allocator
panic-handler = ["arrayvec"]                                  # global panic handler
eh-personality = []                                           # eh_personality for sim-targets, dummy empty no-op

entry-point = []  # simple minimal proxy entry point
try-trait-v2 = [] # impl `FromResidual` for `EventLoopCtrl`
error-ctx = []    # errors with context (incomplete feature)


bindgen-runtime = ["bindgen", "bindgen/runtime"]  # runtime linking (dlopen)
bindgen-static = ["bindgen", "bindgen/static"]    # static linking to clang
bindgen-logging = ["bindgen/logging"]
bindgen-pretty-please = ["bindgen/pretty-please"]
bindgen-which-rustfmt = ["bindgen/which-rustfmt"]
# parse docs from the SDK, gen doc-comments
bindings-documentation = ["bindgen/documentation"] # generate docs for bindings

bindings-derive-default = []      # ask bindgen to derive `Default`
bindings-derive-eq = []           # ask bindgen to derive `Eq`
bindings-derive-copy = []         # ask bindgen to derive `Copy`
bindings-derive-debug = []        # ask bindgen to derive `Debug`
bindings-derive-hash = []         # ask bindgen to derive `Hash`
bindings-derive-ord = []          # ask bindgen to derive `Ord`
bindings-derive-partialeq = []    # ask bindgen to derive `PartialEq`
bindings-derive-partialord = []   # ask bindgen to derive `PartialOrd`
bindings-derive-constparamty = [] # derive `ConstParamTy`
# These "derive-" bindgen's options are presented as features
# to allow top-down infecting of the deps-tree, from user's top to this crate.


[dependencies]
arrayvec = { version = "0.7", default-features = false, optional = true }


[build-dependencies.bindgen]
optional = true
workspace = true
default-features = false

[build-dependencies.bindgen-cfg]
workspace = true
default-features = false


[package.metadata.docs.rs]
all-features = false
features = [
	"lang-items",
	"entry-point",
	"try-trait-v2",
	"error-ctx",
	"bindings-derive-default",
	"bindings-derive-eq",
	"bindings-derive-copy",
	"bindings-derive-debug",
	"bindings-derive-hash",
	"bindings-derive-ord",
	"bindings-derive-partialeq",
	"bindings-derive-partialord",
]
# https://docs.rs/about/builds#cross-compiling
# rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--show-type-layout"]
default-target = "thumbv7em-none-eabihf"
cargo-args = [
	"-Zunstable-options",
	"-Zrustdoc-scrape-examples",
	"-Zbuild-std=core,alloc",
]


[[example]]
name = "hello-world"
crate-type = ["dylib", "staticlib"]
path = "examples/hello-world.rs"
required-features = ["lang-items"]

[[example]]
name = "handler"
crate-type = ["dylib", "staticlib"]
path = "examples/handler.rs"
required-features = ["lang-items", "entry-point"]

[package.metadata.playdate]
bundle-id = "rs.playdate.sys"