-
Notifications
You must be signed in to change notification settings - Fork 869
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
speedreader: port to kuchikiki 0.8.2
We renamed our fork of the kuchiki tree-handling crate since upstream is unmaintained. It's easier to build against released crates now that we're vendoring, so move to the new publication crate name. This also addresses a `cargo audit` warning about the unmaintained dependency. Note however that we're still using a brave-specific fork from git here, so the crate itself is still installed from DEPS. This adds a new transitive dependency on `indexmap`, which is used to roundtrip html attributes with stable ordering so unit tests don't need trivial updates whenever we touch something. This dependency is already available in upstream chromium. kuchikiki 0.8.2 specifies newer versions of its other dependencies but seems to still work when built against the old releases, so those are left to another commit.
- Loading branch information
Showing
19 changed files
with
85 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
components/speedreader/rust/lib/src/readability/src/statistics.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright 2023 The Chromium Authors | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//build/rust/cargo_crate.gni") | ||
|
||
cargo_crate("lib") { | ||
crate_name = "kuchikiki" | ||
epoch = "0.8" | ||
crate_type = "rlib" | ||
crate_root = "crate/src/lib.rs" | ||
sources = [ | ||
"//brave/third_party/rust/kuchikiki/v0_8/crate/examples/find_matches.rs", | ||
"//brave/third_party/rust/kuchikiki/v0_8/crate/examples/stack-overflow.rs", | ||
"//brave/third_party/rust/kuchikiki/v0_8/crate/src/attributes.rs", | ||
"//brave/third_party/rust/kuchikiki/v0_8/crate/src/cell_extras.rs", | ||
"//brave/third_party/rust/kuchikiki/v0_8/crate/src/iter.rs", | ||
"//brave/third_party/rust/kuchikiki/v0_8/crate/src/lib.rs", | ||
"//brave/third_party/rust/kuchikiki/v0_8/crate/src/node_data_ref.rs", | ||
"//brave/third_party/rust/kuchikiki/v0_8/crate/src/parser.rs", | ||
"//brave/third_party/rust/kuchikiki/v0_8/crate/src/select.rs", | ||
"//brave/third_party/rust/kuchikiki/v0_8/crate/src/serializer.rs", | ||
"//brave/third_party/rust/kuchikiki/v0_8/crate/src/tests.rs", | ||
"//brave/third_party/rust/kuchikiki/v0_8/crate/src/tree.rs", | ||
] | ||
inputs = [ "//brave/third_party/rust/kuchikiki/v0_8/crate/README.md" ] | ||
|
||
# Unit tests skipped. Generate with --with-tests to include them. | ||
build_native_rust_unit_tests = false | ||
edition = "2018" | ||
cargo_pkg_version = "0.8.2" | ||
cargo_pkg_authors = "Simon Sapin <simon.sapin@exyr.org>" | ||
cargo_pkg_name = "kuchikiki" | ||
cargo_pkg_description = "(口利き) HTML tree manipulation library" | ||
library_configs -= [ "//build/config/compiler:chromium_code" ] | ||
library_configs += [ "//build/config/compiler:no_chromium_code" ] | ||
executable_configs -= [ "//build/config/compiler:chromium_code" ] | ||
executable_configs += [ "//build/config/compiler:no_chromium_code" ] | ||
deps = [ | ||
"//brave/third_party/rust/cssparser/v0_27:lib", | ||
"//brave/third_party/rust/html5ever/v0_25:lib", | ||
"//third_party/rust/indexmap/v1:lib", | ||
"//brave/third_party/rust/matches/v0_1:lib", | ||
"//brave/third_party/rust/selectors/v0_22:lib", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters