[package] name = "awsm_web" edition = "2018" version = "0.45.0" authors = ["David Komer "] license = "MIT OR Apache-2.0" readme = "../README.md" repository = "https://github.com/dakom/awsm-web" description = "Wrappers for WASM" categories = ["wasm"] keywords = ["webgl", "renderer", "3d", "graphics", "gamedev"] [lib] crate-type = ["cdylib", "rlib"] [profile.release] lto = true opt-level = 's' [features] all = ["data", "dom", "audio", "image", "video", "canvas", "input", "loaders", "tick", "window", "workers", "webgl", "serde_iso", "stream", "file"] default = ["file"] data = [] stream = [ "futures" ] dom= [ "web-sys/HtmlElement", "web-sys/Element", "web-sys/DocumentFragment", "web-sys/HtmlCollection", "web-sys/Document", "web-sys/DomTokenList", "web-sys/NodeList", "web-sys/CssStyleDeclaration", "web-sys/DomRect", ] audio = [ # audio "web-sys/AudioContext", "web-sys/AudioContextState", "web-sys/AudioBuffer", "web-sys/AudioNode", "web-sys/AudioContextOptions", "web-sys/AudioBufferSourceNode", "web-sys/AudioBufferSourceOptions", "web-sys/AudioDestinationNode", "web-sys/AudioBufferOptions", "web-sys/MediaElementAudioSourceNode", "web-sys/HtmlMediaElement", "web-sys/HtmlAudioElement", "web-sys/AudioParam", "web-sys/GainNode", 'web-sys/Event', "beach_map", ] image = [ 'web-sys/HtmlImageElement', 'web-sys/ImageBitmap', 'web-sys/ImageData', ] video = [ 'web-sys/HtmlVideoElement', ] canvas = [ # canvas 'web-sys/CanvasRenderingContext2d', 'web-sys/HtmlCanvasElement', ] input = [ 'web-sys/MouseEvent', 'web-sys/Event', 'web-sys/Element', 'web-sys/Document', 'web-sys/EventTarget', ] loaders = [ "data", "window", "web-sys/Request", "web-sys/RequestInit", "web-sys/Response", "web-sys/ResponseInit", 'web-sys/Location', 'web-sys/HtmlElement', 'web-sys/Url', 'web-sys/Blob', 'web-sys/BlobPropertyBag', 'web-sys/AbortController', 'web-sys/AbortSignal', 'web-sys/Headers', 'web-sys/RequestCredentials', 'web-sys/File', "futures", "wasm-bindgen-futures", "gloo-timers", "discard", ] serde_iso = [ "serde", "serde_json", "serde-wasm-bindgen", ] tick = [ "window", "workers" ] workers = [ "web-sys/WorkerGlobalScope", "web-sys/Worker", "web-sys/WorkerOptions", "web-sys/Blob", "web-sys/BlobPropertyBag", ] window= [ "web-sys/Window", ] webgl = [ "canvas", "image", "video", "data", # core webgl 'web-sys/WebGlRenderingContext', 'web-sys/WebGl2RenderingContext', 'web-sys/WebGlUniformLocation', 'web-sys/WebGlBuffer', 'web-sys/WebGlProgram', 'web-sys/WebGlShader', 'web-sys/WebGlTexture', 'web-sys/WebGlVertexArrayObject', 'web-sys/WebGlActiveInfo', 'web-sys/WebGlRenderbuffer', 'web-sys/WebglDrawBuffers', 'web-sys/WebGlFramebuffer', 'web-sys/WebGlRenderbuffer', 'web-sys/WebGlQuery', # webgl extensions 'web-sys/OesVertexArrayObject', 'web-sys/AngleInstancedArrays', 'web-sys/WebglDrawBuffers', # dependencies "serde", "serde-wasm-bindgen", "beach_map", "rustc-hash", ] file = [ # internal "data", # web-sys "web-sys/Window", "web-sys/Document", "web-sys/File", "web-sys/Blob", "web-sys/BlobPropertyBag", "web-sys/Url", "web-sys/HtmlAnchorElement", "web-sys/HtmlInputElement", "web-sys/FileList", # third-party "wasm-bindgen-futures", ] # more verbose logging of internal methods debug_log = [] # same but only in terms of how unwrap_ext() works unwrap_verbose = [] # skip some webgl cache checks and things. not reliable, just used for debugging disable_webgl_opt = [] [dependencies] web-sys = "0.3.69" js-sys = "0.3.69" wasm-bindgen = "0.2.92" log = "0.4.21" rustc-hash = { version = "1.1.0", optional = true } serde = { version = "1.0.197", features = ["derive"], optional = true } serde_json = { version = "1.0.114", optional = true } beach_map = { version = "0.2.1", optional = true } wasm-bindgen-futures= { version = "0.4.42", optional = true } serde-wasm-bindgen = { version = "0.6.5", optional = true } futures = { version = "0.3.30", optional = true } gloo-timers = { version = "0.3.0", features = ["futures"], optional = true } discard = { version = "1.0.4", optional = true } cfg-if = "1.0.0" [package.metadata.docs.rs] all-features = true