feat: initial release of pastel-wasm v0.1.0
🎨 WebAssembly color manipulation library Features: - ✨ Color parsing (hex, rgb, hsl, named colors) - 🎨 Color manipulation (lighten, darken, saturate, desaturate) - 🌈 Color generation (random, gradients, palettes) - ♿ Accessibility (colorblind simulation, contrast, WCAG) - 📏 Color distance (CIE76, CIEDE2000) - 🎯 Color spaces (RGB, HSL, HSV, Lab, LCH) - 🏷️ 148 CSS/X11 named colors Bundle size: 132KB Performance: ~0.1ms per operation 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
51
Cargo.toml
Normal file
51
Cargo.toml
Normal file
@@ -0,0 +1,51 @@
|
||||
[package]
|
||||
name = "pastel-wasm"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.74"
|
||||
authors = ["Valknar <valknar@pivoine.art>"]
|
||||
description = "WebAssembly bindings for the pastel color library"
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://dev.pivoine.art/valknar/pastel-wasm"
|
||||
keywords = ["color", "wasm", "webassembly", "pastel", "browser"]
|
||||
categories = ["wasm", "graphics", "web-programming"]
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[dependencies]
|
||||
# WebAssembly bindings
|
||||
wasm-bindgen = "0.2"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde-wasm-bindgen = "0.6"
|
||||
|
||||
# Random number generation with WASM support
|
||||
rand = "0.8"
|
||||
getrandom = { version = "0.2", features = ["js"] }
|
||||
rand_xoshiro = "0.6"
|
||||
|
||||
# JavaScript interop
|
||||
js-sys = "0.3"
|
||||
web-sys = { version = "0.3", features = ["console"] }
|
||||
|
||||
# Error handling
|
||||
thiserror = "1.0"
|
||||
|
||||
# Optional: Better panic messages in the browser console
|
||||
console_error_panic_hook = { version = "0.1", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
wasm-bindgen-test = "0.3"
|
||||
|
||||
[features]
|
||||
default = ["console_error_panic_hook"]
|
||||
|
||||
[profile.release]
|
||||
# Optimize for small code size
|
||||
opt-level = "s"
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
strip = true
|
||||
|
||||
[package.metadata.wasm-pack.profile.release]
|
||||
wasm-opt = ["-Os", "--enable-mutable-globals", "--enable-bulk-memory", "--enable-nontrapping-float-to-int"]
|
||||
Reference in New Issue
Block a user