mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
100 lines
2.7 KiB
TOML
100 lines
2.7 KiB
TOML
[package]
|
|
name = "script"
|
|
version = "0.0.1"
|
|
authors = ["The Servo Project Developers"]
|
|
license = "MPL-2.0"
|
|
publish = false
|
|
|
|
build = "build.rs"
|
|
|
|
[lib]
|
|
name = "script"
|
|
path = "lib.rs"
|
|
|
|
[features]
|
|
debugmozjs = ['js/debugmozjs']
|
|
unstable = []
|
|
|
|
[build-dependencies]
|
|
cmake = "0.1"
|
|
phf_codegen = "0.7.18"
|
|
phf_shared = "0.7.18"
|
|
serde_json = "1.0"
|
|
|
|
[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
|
|
tinyfiledialogs = "2.5.9"
|
|
|
|
[dependencies]
|
|
app_units = "0.5"
|
|
audio-video-metadata = "0.1.4"
|
|
base64 = "0.6"
|
|
bitflags = "0.7"
|
|
bluetooth_traits = {path = "../bluetooth_traits"}
|
|
byteorder = "1.0"
|
|
canvas_traits = {path = "../canvas_traits"}
|
|
caseless = "0.1.0"
|
|
cookie = "0.6"
|
|
cssparser = "0.22.0"
|
|
deny_public_fields = {path = "../deny_public_fields"}
|
|
devtools_traits = {path = "../devtools_traits"}
|
|
dom_struct = {path = "../dom_struct"}
|
|
domobject_derive = {path = "../domobject_derive"}
|
|
encoding = "0.2"
|
|
euclid = "0.15"
|
|
fnv = "1.0"
|
|
gleam = "0.4"
|
|
half = "1.0"
|
|
html5ever = "0.20"
|
|
hyper = "0.10"
|
|
hyper_serde = "0.7"
|
|
image = "0.16"
|
|
ipc-channel = "0.9"
|
|
js = {git = "https://github.com/servo/rust-mozjs", features = ["promises"]}
|
|
jstraceable_derive = {path = "../jstraceable_derive"}
|
|
lazy_static = "0.2"
|
|
libc = "0.2"
|
|
log = "0.3.5"
|
|
malloc_size_of = { path = "../malloc_size_of" }
|
|
malloc_size_of_derive = { path = "../malloc_size_of_derive" }
|
|
metrics = {path = "../metrics"}
|
|
mitochondria = "1.1.2"
|
|
mime = "0.2.1"
|
|
mime_guess = "1.8.0"
|
|
msg = {path = "../msg"}
|
|
net_traits = {path = "../net_traits"}
|
|
nonzero = {path = "../nonzero"}
|
|
num-traits = "0.1.32"
|
|
offscreen_gl_context = { version = "0.11", features = ["serde"] }
|
|
open = "1.1.1"
|
|
parking_lot = "0.4"
|
|
phf = "0.7.18"
|
|
profile_traits = {path = "../profile_traits"}
|
|
ref_filter_map = "1.0.1"
|
|
ref_slice = "1.0"
|
|
regex = "0.2"
|
|
script_layout_interface = {path = "../script_layout_interface"}
|
|
script_plugins = {path = "../script_plugins"}
|
|
script_traits = {path = "../script_traits"}
|
|
selectors = { path = "../selectors" }
|
|
serde = "1.0"
|
|
servo_arc = {path = "../servo_arc"}
|
|
servo_atoms = {path = "../atoms"}
|
|
servo_config = {path = "../config"}
|
|
servo_geometry = {path = "../geometry" }
|
|
servo_rand = {path = "../rand"}
|
|
servo_url = {path = "../url"}
|
|
smallvec = "0.4"
|
|
style = {path = "../style"}
|
|
style_traits = {path = "../style_traits"}
|
|
swapper = "0.1"
|
|
time = "0.1.12"
|
|
unicode-segmentation = "1.1.0"
|
|
url = {version = "1.2", features = ["query_encoding"]}
|
|
utf-8 = "0.7"
|
|
uuid = {version = "0.5", features = ["v4"]}
|
|
xml5ever = {version = "0.10"}
|
|
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|
|
webvr_traits = {path = "../webvr_traits"}
|
|
|
|
[target.'cfg(not(target_os = "ios"))'.dependencies]
|
|
angle = {git = "https://github.com/servo/angle", branch = "servo"}
|