[package]
name = "al-core"
version = "3.8.0"
authors = ["baumannmatthieu0@gmail.com", "matthieu.baumann@astro.unistra.fr"]
edition = "2018"

[dependencies]
js-sys = "0.3.47"
cgmath = "*"
fitsrs = "0.4.1"
al-api = { path = "../al-api" }
serde = { version = "^1.0.59", features = ["derive"] }
serde_json = "1.0"
serde-wasm-bindgen = "0.4"
# wasm-streams = "0.3.0"
futures = "0.3.25"
colorgrad = "0.6.2"
wasm-bindgen = "0.2.92"

[dev-dependencies]
fontdue = "0.7.2"

[features]
webgl1 = [
  "web-sys/WebGlRenderingContext",
  "web-sys/AngleInstancedArrays",   # Enabling instancing features
  "web-sys/ExtSRgb",                # Enabling SRGB8_ALPHA8 internal format
  "web-sys/OesTextureFloat"
]
webgl2 = [
  "web-sys/WebGl2RenderingContext",
  "web-sys/WebGlVertexArrayObject",
  "web-sys/ExtColorBufferFloat",
]

[dependencies.web-sys]
version = "0.3.56"
features = [ "console", "CssStyleDeclaration", "Document", "Element", "HtmlCollection", "CustomEvent", "CustomEventInit", "HtmlElement", "HtmlImageElement", "HtmlCanvasElement", "Blob", "ImageBitmap", "ImageData", "CanvasRenderingContext2d", "WebGlBuffer", "WebGlContextAttributes", "WebGlFramebuffer", "WebGlProgram", "WebGlShader", "WebGlUniformLocation", "WebGlTexture", "WebGlActiveInfo", "Headers", "Window", "Request", "RequestInit", "RequestMode", "RequestCredentials", "Response", "XmlHttpRequest", "XmlHttpRequestResponseType", "PerformanceTiming", "Performance", "Url", "ReadableStream", "File", "FileList", "OffscreenCanvas", "OffscreenCanvasRenderingContext2d", "Worker", "WorkerOptions", "WorkerType"]


[profile.dev]
opt-level = 's'
debug = true
debug-assertions = true
overflow-checks = true
lto = false
panic = 'unwind'
incremental = true
codegen-units = 256
rpath = false

[package.metadata.wasm-pack.profile.release]
wasm-opt = true
