Cargo.toml
author Masayuki Nakano <masayuki@d-toybox.com>
Wed, 03 Oct 2018 09:21:47 +0000
changeset 497850 fea8e039767a88ebfb73b1f0d43d1f87ee7394e1
parent 497124 537457dc2f47fa9436c5abb6b27977ae9727e059
child 503016 26815a566707e4223602f2ae3d87ac0ad5caa22f
permissions -rw-r--r--
Bug 1343955 - part 2: Implement _guessCodeFromKeyName() in EventUtils.js with C++ and make it accessible with nsITextInputProcessor for EventUtils.js r=smaug We need to port synthesizeKey() of EventUtils.js to FuzzingFunctions. So, its helper function, _guessCodeFromKeyName() in EventUtils.js needs to be accessible from FuzzingFunctions. Therefore, we need to reimplement it with C++ and make it accessible via nsITextInputProcessor for EventUtils.js for making easier to maintain. This patch moves _guessCodeFromKeyName() into TextInputProcessor and WidgetKeyboardEvent. Non-printable key part of _guessCodeFromKeyName() is moved to WidgetKeyboardEvent::ComputeCodeNameIndexFromKeyNameIndex() because of not depending on active keyboard layout. On the other hand, printable key part needs to assume that active keyboard layout is en-US keyboard layout. Therefore, it's moved to TextInputProcessor::GuessCodeValueOfPrintableKeyInUSEnglishKeyboardLayout() because any Core code shouldn't refer it as utility method for keeping that we're i18n-aware. Differential Revision: https://phabricator.services.mozilla.com/D5514

[workspace]

# These are the "root" crates, which we build and test as top-level targets.
# Their transitive dependencies and dev-dependencies are included automatically
# and do not need to be listed here. Their external dependencies are vendored
# into `third_party/rust` by `mach vendor rust`.
members = [
  "js/src",
  "js/src/rust",
  "js/src/wasm/cranelift",
  "js/rust",
  "js/src/frontend/binsource", # Code generator.
  "testing/geckodriver",
  "toolkit/crashreporter/rust",
  "toolkit/library/gtest/rust",
  "toolkit/library/rust/",
]

# Excluded crates may be built as dependencies, but won't be considered members
# of the workspace and their dev-dependencies won't be included.
exclude = [
  # Exclude third-party code vendored into mozilla-central.
  "gfx/webrender",
  "gfx/webrender_api",
  "gfx/webrender_bindings",
  "servo",
  "third_party/rust",

  # Excluded because this is a standalone tool for developers and not intended
  # to be built as part of mozilla-central and is not shipped to users.
  "gfx/wrench",

  # Excluded because these crates have their own Cargo workspaces so they can't
  # be included in the top-level one.
  "media/audioipc",
  "media/cubeb-rs",

  # Excluded because they are used only as dependencies, not top-level targets,
  # so we don't need to vendor their dev-dependencies.
  "dom/webauthn/u2f-hid-rs",
  "media/mp4parse-rust/mp4parse",
  "media/mp4parse-rust/mp4parse_capi",
  "media/mp4parse-rust/mp4parse_fallible",
]

# Explicitly specify what our profiles use.  The opt-level setting here is
# a total fiction; see the setup of MOZ_RUST_DEFAULT_FLAGS for what the
# opt-level setting will be as a result of various other configure flags.
[profile.dev]
opt-level = 1
rpath = false
lto = false
debug-assertions = true
panic = "abort"

[profile.release]
opt-level = 2
rpath = false
debug-assertions = false
panic = "abort"
codegen-units = 1

[patch.crates-io]
libudev-sys = { path = "dom/webauthn/libudev-sys" }
serde_derive = { git = "https://github.com/servo/serde", branch = "deserialize_from_enums8" }