
[package]
edition = "2015"
name = "gkrust-shared"
version = "0.1.0"
authors = ["The Mozilla Project Developers"]
license = "MPL-2.0"
description = "Shared Rust code for libxul"

[dependencies]
moz_asserts = "0.1"
mozglue-static = { path = "../../../../mozglue/static/rust" }
geckoservo = { path = "../../../../servo/ports/geckolib" }
kvstore = { path = "../../../components/kvstore" }
mp4parse_capi = { git = "https://github.com/mozilla/mp4parse-rust", rev = "b693c7e4a91d1d5a391c0404d18b6fc94714894e", features = ["missing-pixi-permitted"] }
nserror = { path = "../../../../xpcom/rust/nserror" }
nsstring = { path = "../../../../xpcom/rust/nsstring" }
netwerk_helper = { path = "../../../../netwerk/base/rust-helper" }
xpcom = { path = "../../../../xpcom/rust/xpcom" }
prefs_parser = { path = "../../../../modules/libpref/parser" }
static_prefs = { path = "../../../../modules/libpref/init/static_prefs" }
profiler_helper = { path = "../../../../tools/profiler/rust-helper" }
mozurl = { path = "../../../../netwerk/base/mozurl" }
harfbuzz_glue = { path = "../../../../gfx/harfbuzz_glue" }
webrender_bindings = { path = "../../../../gfx/webrender_bindings" }
cubeb-coreaudio = { git = "https://github.com/mozilla/cubeb-coreaudio-rs", rev = "840f69c1b3f95accd582555e10abcef8ee67514b", optional = true, features=["vpio-forcelist"] }
cubeb-pulse = { git = "https://github.com/mozilla/cubeb-pulse-rs", rev="88194f91c8778fa608a19af7b91306094525595d", optional = true, features=["pulse-dlopen"] }
cubeb-sys = { version = "0.34", optional = true, features=["gecko-in-tree"] }
audioipc2-client = { git = "https://github.com/mozilla/audioipc", rev = "88fe860", optional = true }
audioipc2-server = { git = "https://github.com/mozilla/audioipc", rev = "88fe860", optional = true }
encoding_glue = { path = "../../../../intl/encoding_glue" }
locale_service_glue = { path = "../../../../intl/locale/rust/locale_service_glue" }
app_collator_glue = { path = "../../../../intl/app_collator_glue" }
authrs_bridge = { path = "../../../../dom/webauthn/authrs_bridge" }
gkrust_utils = { path = "../../../../xpcom/rust/gkrust_utils" }
gecko_logger = { path = "../../../../xpcom/rust/gecko_logger" }
gecko_tracing = { path = "../../../../xpcom/rust/gecko_tracing" }
rsdparsa_capi = { path = "../../../../dom/media/webrtc/sdp/rsdparsa_capi" }
# We have these to enforce common feature sets for said crates.
log = {version = "0.4", features = ["release_max_level_info"]}
cose-c = { version = "0.1.5" }
jsrust_shared = { path = "../../../../js/src/rust/shared" }
jxl_decoder = { path = "../../../../image/rust/jxl", optional = true }
cascade_bloom_filter = { path = "../../../components/cascade_bloom_filter" }
bitsdownload = { path = "../../../components/bitsdownload", optional = true }
storage = { path = "../../../../storage/rust" }
bookmark_sync = { path = "../../../components/places/bookmark_sync", optional = true }
buildid_reader_ffi = { path = "../../buildid_reader/ffi" }
chardetng_c = "1.0.0"
audio_thread_priority = { version = "0.35", default-features = false }
mdns_service = { path="../../../../dom/media/webrtc/transport/mdns_service", optional = true }
neqo_glue = { path = "../../../../netwerk/socket/neqo_glue" }
wgpu_bindings = { path = "../../../../gfx/wgpu_bindings" }
mapped_hyph = { git = "https://github.com/jfkthame/mapped_hyph.git", rev = "eff105f6ad7ec9b79816cfc1985a28e5340ad14b" }
fog_control = { path = "../../../components/glean" }
http_sfv = { path = "../../../../netwerk/base/http-sfv" }
idna_glue = { path = "../../../../netwerk/base/idna_glue" }
ssl_tokens_cache = { path = "../../../../netwerk/base/ssl_tokens_cache" }
ipdl_utils = { path = "../../../../ipc/rust/ipdl_utils" }
unic-langid = { version = "0.9", features = ["likelysubtags"] }
unic-langid-ffi = { path = "../../../../intl/locale/rust/unic-langid-ffi" }
fluent-langneg = { version = "0.13", features = ["cldr"] }
fluent-langneg-ffi = { path = "../../../../intl/locale/rust/fluent-langneg-ffi" }
oxilangtag = "0.1.3"
oxilangtag-ffi = { path = "../../../../intl/locale/rust/oxilangtag-ffi" }
unicode-bidi = "0.3.15"
unicode-bidi-ffi = { path = "../../../../intl/bidi/rust/unicode-bidi-ffi" }
rure = "0.2.2"
rust_minidump_writer_linux = { path = "../../../crashreporter/rust_minidump_writer_linux", optional = true }
mozannotation_client = { path = "../../../crashreporter/mozannotation_client", optional = true }
mozannotation_server  = { path = "../../../crashreporter/mozannotation_server", optional = true }
crash_helper_client = { path = "../../../crashreporter/crash_helper_client", optional = true }
gecko-profiler = { path = "../../../../tools/profiler/rust-api"}
midir_impl = { path = "../../../../dom/midi/midir_impl", optional = true }
dom = { path = "../../../../dom/base/rust" }
dom_fragmentdirectives = { path="../../../../dom/base/fragmentdirectives" }
dom_speculationrules = { path="../../../../dom/base/speculationrules" }
origin-trials-ffi = { path = "../../../../dom/origin-trials/ffi" }
jog = { path = "../../../components/glean/bindings/jog" }
dap_ffi = { path = "../../../components/dap/ffi" }
data-encoding-ffi = { path = "../../../../dom/fs/parent/rust/data-encoding-ffi" }
binary_http = { path = "../../../../netwerk/protocol/http/binary_http" }
oblivious_http = { path = "../../../../netwerk/protocol/http/oblivious_http" }
happy_eyeballs_glue = { path = "../../../../netwerk/protocol/http/happy_eyeballs_glue" }

abridged_certs = { path = "../../../../security/manager/ssl/abridged_certs" }
cert_storage = { path = "../../../../security/manager/ssl/cert_storage" }
crypto_hash = { path = "../../../../security/manager/ssl/crypto_hash" }
data_storage = { path = "../../../../security/manager/ssl/data_storage" }
ipcclientcerts = { path = "../../../../security/manager/ssl/ipcclientcerts" }
lockstore_ffi = { path = "../../../../security/lockstore/lockstore_ffi" }
mls_gk = { path = "../../../../security/mls/mls_gk" }
pdf-trust-anchors = { path = "../../../../security/manager/ssl/pdf_trust_anchors" }
qwac-trust-anchors = { path = "../../../../security/manager/ssl/qwac_trust_anchors" }
trust-anchors = { path = "../../../../security/manager/ssl/trust_anchors" }
signature_cache = { path = "../../../../security/certverifier/signature_cache" }

mime-guess-ffi = { path = "../../../../dom/fs/parent/rust/mime-guess-ffi" }

# Note: `modern_sqlite` means rusqlite's bindings file be for a sqlite with
# version less than or equal to what we link to. This isn't a problem because we
# tend to keep this up to date, but it needs to be taken into consideration when
# changing this version.
rusqlite = { workspace = true, features = ["modern_sqlite"] }

fluent = { version = "0.17.0", features = ["fluent-pseudo"] }
fluent-ffi = { path = "../../../../intl/l10n/rust/fluent-ffi" }
l10nregistry-ffi = { path = "../../../../intl/l10n/rust/l10nregistry-ffi" }
l10nregistry = { path = "../../../../intl/l10n/rust/l10nregistry-rs" }
fluent-fallback = "0.7.0"
localization-ffi = { path = "../../../../intl/l10n/rust/localization-ffi" }

processtools = { path = "../../../components/processtools" }
qcms = { path = "../../../../gfx/qcms", features = ["c_bindings", "neon", "cmyk"], default-features = false }

wpf-gpu-raster = { git = "https://github.com/FirefoxGraphics/wpf-gpu-raster", rev = "99979da091fd58fba8477e7fcdf5ec0727102916" }
aa-stroke = { git = "https://github.com/FirefoxGraphics/aa-stroke", rev = "5776bdfc8ad664a1503db668fab397d818a5f98a" }
etagere = { version = "0.2.13", features = ["ffi"] }

url = "2.5.7"
urlpattern = "0.6.0"
urlpattern_glue = { path = "../../../../netwerk/base/urlpattern_glue" }
uritemplate_glue = { path = "../../../../netwerk/base/uritemplate_glue" }

adblock = { version = "0.12.1", features = ["full-regex-handling", "single-thread"], default-features = false }
content_classifier_engine = { path = "../../../components/content-classifier/content_classifier_engine" }

libz-rs-sys = { version = "0.6", features = ["custom-prefix"], optional = true }
zlib-rs = { version = "0.6", features = ["avx512"], optional = true }

gecko-trace = { path = "../../../components/gecko-trace" }

sitecategories = { path = "../../../components/sitecategories" }

[target.'cfg(any(target_os = "android", target_os = "macos", target_os = "ios", all(target_os = "windows", not(target_arch = "aarch64"))))'.dependencies]
osclientcerts = { path = "../../../../security/manager/ssl/osclientcerts" }

[target.'cfg(not(target_os = "android"))'.dependencies]
gkrust-uniffi-components = { path = "../../../components/uniffi-bindgen-gecko-js/components/", features = ["xpcom"] }
uniffi-bindgen-gecko-js-test-fixtures = { path = "../../../components/uniffi-bindgen-gecko-js/test-fixtures/", optional = true }
viaduct = "0.1"
viaduct-necko = { path = "../../../../services/application-services/components/viaduct-necko" }
webext-storage = "0.1"

[target.'cfg(target_os = "windows")'.dependencies]
detect_win32k_conflicts = { path = "../../../xre/detect_win32k_conflicts" }
widget_windows = { path = "../../../../widget/windows/rust" }
shell_windows = { path = "../../../../browser/components/shell/rust/shell_windows", optional = true }

[features]
default = []
moz_memory = ["mozglue-static/moz_memory"]
cubeb-remoting = ["cubeb-sys", "audioipc2-client", "audioipc2-server"]
cubeb_coreaudio_rust = ["cubeb-sys", "cubeb-coreaudio"]
cubeb_pulse_rust = ["cubeb-sys", "cubeb-pulse"]
gecko_debug = ["geckoservo/gecko_debug", "nsstring/gecko_debug"]
gecko_refcount_logging = ["geckoservo/gecko_refcount_logging", "xpcom/gecko_refcount_logging"]
simd-accel = ["encoding_glue/simd-accel", "jsrust_shared/simd-accel"]
moz_places = ["bookmark_sync"]
spidermonkey_rust = []
gecko_profiler_parse_elf = ["profiler_helper/parse_elf"]
libfuzzer = ["authrs_bridge/fuzzing"]
webrtc = ["mdns_service"]
glean_disable_upload = ["fog_control/disable_upload"]
glean_with_gecko = ["fog_control/with_gecko", "jog/with_gecko"]
oxidized_breakpad = ["rust_minidump_writer_linux"]
crashreporter = ["crash_helper_client", "mozannotation_client"]
with_dbus = ["audio_thread_priority/with_dbus"]
thread_sanitizer = ["xpcom/thread_sanitizer"]
uniffi_fixtures = ["uniffi-bindgen-gecko-js-test-fixtures"]
webmidi_midir_impl = ["midir_impl"]
icu4x = ["jsrust_shared/icu4x"]
jxl_decoder = ["dep:jxl_decoder"]
libz-rs-sys = ["dep:libz-rs-sys", "dep:zlib-rs"]
# Set when we're building libxul (as opposed to building the unittests, for example)
for_xul = [
    # This makes it so `rusqlite` doesn't handle linking itself.  Instead, we'll link it to the
    # `libmozsqlite` that we distribute.
    "rusqlite/in_gecko"
]
webrender_debugger = ["webrender_bindings/debugger"]
shell_windows = ["dep:shell_windows"]

[lib]
path = "lib.rs"
test = false
doctest = false
bench = false
doc = false
harness = false

[package.metadata.cargo-udeps.ignore]
normal = ["moz_asserts"]
