With a `tree-sitter-languages` feature to enable it (Default not enable). Changed this for reduce the application size (From 52 MB to 22MB), Ref #1132 Now default only includes `tree-sitter-json`, if you want more: ```toml [dependencies] gpui-component = { features = ["tree-sitter-languages"] } ``` --- ``` cargo bloat -p hello_world --release -n 10 Finished `release` profile [optimized] target(s) in 0.27s Analyzing target/release/hello_world File .text Size Crate Name 0.4% 1.4% 88.5KiB simple_minify_html simple_minify_html::code_gen::attrs::ATTRS::{{closure}} 0.3% 1.0% 62.1KiB taffy taffy::compute::grid::track_sizing::resolve_intrinsic_track_sizes 0.1% 0.5% 32.6KiB gpui_component gpui_component::theme::theme_color::ThemeColor::dark 0.1% 0.5% 30.0KiB gpui_component gpui_component::theme::theme_color::ThemeColor::light 0.1% 0.5% 29.9KiB html5ever html5ever::tree_builder::TreeBuilder<Handle,Sink>::step 0.1% 0.4% 27.2KiB gpui taffy::compute::flexbox::compute_flexbox_layout 0.1% 0.4% 23.3KiB usvg usvg::text::layout::layout_text 0.1% 0.4% 22.5KiB resvg resvg::filter::apply_inner 0.1% 0.3% 21.4KiB gpui jpeg_decoder::decoder::Decoder<R>::decode_internal 0.1% 0.3% 21.2KiB image_webp image_webp::lossless::LosslessDecoder<R>::decode_image_stream 25.3% 94.3% 5.7MiB And 14091 smaller methods. Use -n N to show more. 26.8% 100.0% 6.0MiB .text section size, the file size is 22.4MiB ```
129 lines
4.1 KiB
TOML
129 lines
4.1 KiB
TOML
[package]
|
|
name = "gpui-component"
|
|
description = "UI components for building fantastic desktop application by using GPUI."
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
homepage = "https://github.com/longbridge/gpui-component"
|
|
keywords = ["GPUI", "application", "desktop", "ui"]
|
|
license-file = "LICENSE-APACHE"
|
|
publish = true
|
|
|
|
[lib]
|
|
doctest = false
|
|
|
|
[features]
|
|
decimal = ["dep:rust_decimal"]
|
|
inspector = []
|
|
webview = ["dep:wry"]
|
|
# For syntax highlighting in Markdown and CodeEditor.
|
|
tree-sitter-languages = [
|
|
"dep:tree-sitter-bash",
|
|
"dep:tree-sitter-c",
|
|
"dep:tree-sitter-c-sharp",
|
|
"dep:tree-sitter-cmake",
|
|
"dep:tree-sitter-cpp",
|
|
"dep:tree-sitter-css",
|
|
"dep:tree-sitter-diff",
|
|
"dep:tree-sitter-elixir",
|
|
"dep:tree-sitter-embedded-template",
|
|
"dep:tree-sitter-go",
|
|
"dep:tree-sitter-graphql",
|
|
"dep:tree-sitter-html",
|
|
"dep:tree-sitter-java",
|
|
"dep:tree-sitter-javascript",
|
|
"dep:tree-sitter-jsdoc",
|
|
"dep:tree-sitter-make",
|
|
"dep:tree-sitter-md",
|
|
"dep:tree-sitter-proto",
|
|
"dep:tree-sitter-python",
|
|
"dep:tree-sitter-ruby",
|
|
"dep:tree-sitter-rust",
|
|
"dep:tree-sitter-scala",
|
|
"dep:tree-sitter-sequel",
|
|
"dep:tree-sitter-swift",
|
|
"dep:tree-sitter-toml-ng",
|
|
"dep:tree-sitter-typescript",
|
|
"dep:tree-sitter-yaml",
|
|
"dep:tree-sitter-zig"
|
|
]
|
|
|
|
[dependencies]
|
|
gpui.workspace = true
|
|
gpui-component-macros.workspace = true
|
|
rust-i18n.workspace = true
|
|
schemars.workspace = true
|
|
serde.workspace = true
|
|
serde_repr.workspace = true
|
|
serde_json.workspace = true
|
|
smallvec.workspace = true
|
|
smol.workspace = true
|
|
tracing.workspace = true
|
|
anyhow.workspace = true
|
|
|
|
enum-iterator = "2.1.0"
|
|
futures-util = "0.3.31"
|
|
image = "0.25.1"
|
|
itertools = "0.13.0"
|
|
once_cell = "1.19.0"
|
|
paste = "1"
|
|
regex = "1"
|
|
resvg = { version = "0.45.0", default-features = false, features = ["text"] }
|
|
unicode-segmentation = "1.12.0"
|
|
usvg = { version = "0.45.0", default-features = false, features = ["text"] }
|
|
uuid = "1.10"
|
|
wry = { version = "0.48.0", optional = true }
|
|
palette = "0.7.6"
|
|
|
|
# Chart
|
|
num-traits = "0.2"
|
|
rust_decimal = { version = "1.37.0", optional = true }
|
|
|
|
# Markdown Parser
|
|
markdown = "1.0.0-alpha.22"
|
|
|
|
# HTML Parser
|
|
html5ever = "0.27"
|
|
markup5ever_rcdom = "0.3.0"
|
|
simple-minify-html = "0.17.2"
|
|
|
|
# Calendar
|
|
chrono = "0.4.38"
|
|
|
|
# Code Editor
|
|
indexset = "0.12.2"
|
|
tree-sitter = "0.25.4"
|
|
tree-sitter-json = "0.24.8"
|
|
tree-sitter-bash = { version = "0.23.3", optional = true }
|
|
tree-sitter-c = { version = "0.24.1", optional = true }
|
|
tree-sitter-c-sharp = { version = "0.23.1", optional = true }
|
|
tree-sitter-cmake = { version = "0.7.1", optional = true }
|
|
tree-sitter-cpp = { version = "0.23.4", optional = true }
|
|
tree-sitter-css = { version = "0.23.2", optional = true }
|
|
tree-sitter-diff = { version = "0.1.0", optional = true }
|
|
tree-sitter-elixir = { version = "0.3", optional = true }
|
|
tree-sitter-embedded-template = { version = "0.23.0", optional = true }
|
|
tree-sitter-go = { version = "0.23.4", optional = true }
|
|
tree-sitter-graphql = { version = "0.1.0", optional = true }
|
|
tree-sitter-html = { version = "0.23.2", optional = true }
|
|
tree-sitter-java = { version = "0.23.5", optional = true }
|
|
tree-sitter-javascript = { version = "0.23.1", optional = true }
|
|
tree-sitter-jsdoc = { version = "0.23.2", optional = true }
|
|
tree-sitter-make = { version = "1.1.1", optional = true }
|
|
tree-sitter-md = { git = "https://github.com/tree-sitter-grammars/tree-sitter-markdown", tag = "v0.5.0", optional = true }
|
|
tree-sitter-proto = { version = "0.2.0", optional = true }
|
|
tree-sitter-python = { version = "0.23.6", optional = true }
|
|
tree-sitter-ruby = { version = "0.23.1", optional = true }
|
|
tree-sitter-rust = { version = "0.24.0", optional = true }
|
|
tree-sitter-scala = { version = "0.23.4", optional = true }
|
|
tree-sitter-sequel = { version = "0.3.8", optional = true }
|
|
tree-sitter-swift = { version = "0.7.0", optional = true }
|
|
tree-sitter-toml-ng = { version = "0.7.0", optional = true }
|
|
tree-sitter-typescript = { version = "0.23.2", optional = true }
|
|
tree-sitter-yaml = { version = "0.7.1", optional = true }
|
|
tree-sitter-zig = { version = "1.1.2", optional = true }
|
|
|
|
[dev-dependencies]
|
|
indoc = "2"
|
|
|
|
[lints]
|
|
workspace = true
|