slint/tools/lsp/Cargo.toml
Ashley 5c6f07da64
Move named color & color literal parsing to slint common (#9981)
* Move color_parsing to common

* [autofix.ci] apply automated fixes

* Fixes

* Change how feature flags work

* Use std feature for common in compiler

* Add color-parsing feature instead

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-11-10 08:39:28 +00:00

140 lines
5.3 KiB
TOML

# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
[package]
name = "slint-lsp"
description = "A language server protocol implementation for Slint"
authors = ["Slint Developers <info@slint.dev>"]
edition.workspace = true
homepage = "https://slint.dev"
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version = "1.15.0"
categories = ["gui", "development-tools", "command-line-utilities"]
keywords = ["lsp", "ui", "toolkit"]
[package.metadata.bundle]
name = "Slint Live Preview"
icon = ["../../logo/slint-logo.icns"]
[[bin]]
name = "slint-lsp"
path = "main.rs"
[lib]
# lib is there only for the web
crate-type = ["cdylib"]
path = "wasm_main.rs"
# On windows building this package creates slint-lsp.exe and slint-lsp.dll.
# To avoid that both end up trying to create slint-lsp.pdb for their debug
# symbols, rename the lib.
name = "slint_lsp_wasm"
[features]
backend-qt = ["slint/backend-qt", "preview"]
backend-winit = ["slint/backend-winit", "preview"]
backend-winit-x11 = ["slint/backend-winit-x11", "preview"]
backend-winit-wayland = ["slint/backend-winit-wayland", "preview"]
backend-linuxkms = ["slint/backend-linuxkms", "preview"]
backend-linuxkms-noseat = ["slint/backend-linuxkms-noseat", "preview"]
backend-default = ["slint/backend-default", "preview"]
renderer-femtovg = ["slint/renderer-femtovg", "preview"]
renderer-skia = ["slint/renderer-skia", "preview"]
renderer-skia-opengl = ["slint/renderer-skia-opengl", "preview"]
renderer-skia-vulkan = ["slint/renderer-skia-vulkan", "preview"]
renderer-software = ["slint/renderer-software", "preview"]
# Compat
backend-gl-all = ["backend-winit", "renderer-femtovg"]
backend-gl-wayland = ["backend-winit-wayland", "renderer-femtovg"]
backend-gl-x11 = ["backend-winit-x11", "renderer-femtovg"]
eventloop-qt = ["backend-qt"]
renderer-winit-qt = ["backend-qt"]
renderer-winit-femtovg = ["renderer-femtovg"]
renderer-winit-skia = ["renderer-skia"]
renderer-winit-skia-opengl = ["renderer-skia-opengl"]
renderer-winit-skia-vulkan = ["renderer-skia-vulkan"]
renderer-winit-software = ["renderer-software"]
## Enable support for previewing .slint files
preview = ["preview-builtin", "preview-external", "preview-engine"]
## [deprecated] Used to enable the "Show Preview" lenses and action on components.
preview-lense = []
## [deprecated] Used to enable partial support for external previewers.
## Use "preview-external" (and maybe "preview-engine" if you want the LSP binary
## to provide an implementation of the external preview API when building for WASM)
preview-api = ["preview-external"]
## Build in the actual code to act as a preview for slint files.
preview-engine = [
"dep:slint",
"dep:slint-interpreter",
"dep:i-slint-core",
"dep:i-slint-backend-selector",
"dep:slint-build",
"dep:i-slint-backend-winit",
"dep:muda",
"dep:objc2-foundation",
]
## Build in the actual code to act as a preview for slint files. Does nothing in WASM!
preview-builtin = ["preview-engine"]
## Support the external preview optionally used by e.g. the VSCode plugin
preview-external = []
default = ["backend-default", "renderer-femtovg", "renderer-software", "preview"]
[dependencies]
i-slint-compiler = { workspace = true, features = ["display-diagnostics"] }
i-slint-common = { workspace = true }
by_address = { workspace = true }
clru = { workspace = true }
dissimilar = "1.0.7"
itertools = { workspace = true }
# Not updated because of https://github.com/gluon-lang/lsp-types/issues/284
lsp-types = { version = "0.95.0", features = ["proposed"] }
serde = { workspace = true }
serde_json = { workspace = true }
smol_str = { workspace = true }
# for the preview-engine feature
i-slint-backend-selector = { workspace = true, optional = true }
i-slint-core = { workspace = true, features = ["std"], optional = true }
slint = { workspace = true, features = ["compat-1-2"], optional = true }
slint-interpreter = { workspace = true, features = ["compat-1-2", "internal", "internal-highlight", "internal-json", "image-default-formats"], optional = true }
nucleo-matcher = "0.3.1"
[target.'cfg(not(any(target_os = "windows", target_arch = "wasm32", all(target_arch = "aarch64", target_os = "linux"))))'.dependencies]
tikv-jemallocator = { workspace = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
clap = { workspace = true }
crossbeam-channel = "0.5" # must match the version used by lsp-server
lsp-server = "0.7"
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.5"
js-sys = { version = "0.3.57" }
web-sys = { workspace = true, features = ["Navigator", "Clipboard", "UrlSearchParams", "Location"] }
send_wrapper = { workspace = true }
serde-wasm-bindgen = "0.6.0"
wasm-bindgen = "0.2.80"
wasm-bindgen-futures = "0.4.30"
i-slint-backend-winit = { workspace = true }
[target.'cfg(target_vendor = "apple")'.dependencies]
i-slint-backend-winit = { workspace = true, optional = true }
muda = { version = "0.17.0", optional = true, default-features = false }
objc2-foundation = { version = "0.3.0", optional = true }
[dev-dependencies]
i-slint-backend-testing = { path = "../../internal/backends/testing" }
spin_on = { workspace = true }
[build-dependencies]
slint-build = { workspace = true, features = ["default"], optional = true }
# [package.metadata.wasm-pack.profile.release]
# wasm-opt = false