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

[dependencies]
js-sys = "0.3.47"
cgmath = "*"
serde = { version = "^1.0.59", features = ["derive"] }
serde-wasm-bindgen = "0.4"
wasm-bindgen = "0.2.92"
colorgrad = "0.6.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',
  'HtmlElement',
  'HtmlImageElement',
  'HtmlCanvasElement',
  'Blob',
  'ImageBitmap',
  'ImageData',

  'CanvasRenderingContext2d',

  'WebGlBuffer',
  'WebGlContextAttributes',
  'WebGlFramebuffer',
  'WebGlProgram',
  'WebGlShader',
  'WebGlUniformLocation',
  'WebGlTexture',
  'WebGlActiveInfo',

  'Window',
  'Request',
  'RequestInit',
  'RequestMode',
  'Response',
  'XmlHttpRequest',
  'XmlHttpRequestResponseType',
  'PerformanceTiming',
  'Performance',
  'Url',
  'File',
  'FileList'
]

[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