Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit c2f2c14

Browse files
committed
Add more crates
Signed-off-by: Quanyi Ma <eli@patch.sh>
1 parent 2541607 commit c2f2c14

File tree

619 files changed

+132303
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

619 files changed

+132303
-2
lines changed

BUCK

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ cargo.rust_binary(
99
# rustc-std-workspace-core
1010
"//third-party/rust/crates/rustc-std-workspace-core/1.0.1:rustc-std-workspace-core",
1111

12+
# lexopt
13+
"//third-party/rust/crates/lexopt/0.3.0:lexopt",
14+
15+
# anstyle
16+
# Example: `buck2 run //third-party/rust/crates/anstyle/1.0.10:dump-style`
17+
"//third-party/rust/crates/anstyle/1.0.10:anstyle",
18+
"//third-party/rust/crates/anstyle/1.0.10:dump-style",
19+
1220
# zstd-sys
1321
"//third-party/rust/crates/zstd-sys/2.0.13+zstd.1.5.6:zstd-sys",
1422
"//third-party/rust/crates/zstd-sys/2.0.14+zstd.1.5.7:zstd-sys",

third-party/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ For now, I am trying to generate `BUCK` with `Cargo.toml` with Claude, and the p
8484

8585
* BUCK 文件中的注释使用英文;
8686
* 交互过程使用中文;
87-
* 使用 `load("@prelude//rust:cargo_package.bzl", "cargo")`;
87+
* 使用 `load("@prelude//toolchains:rust.bzl", "system_rust_toolchain")`;
8888
* BUCK 文件中没有 `version``licenses` 字段;
8989
* BUCK 文件中 `edition` 字段固定使用 `2021`
9090
* 如果有依赖存在,请使用 `//third-party/rust/crates/<crate_name>/<crate_version>:<crate_name>` 来替换;
@@ -100,7 +100,6 @@ def get_rust_features():
100100
* 请在基础模板下进行修改:
101101
```
102102
load("@prelude//toolchains:rust.bzl", "system_rust_toolchain")
103-
load("@prelude//toolchains:cxx.bzl", "system_cxx_toolchain")
104103
105104
rust_library(
106105
name = "",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"git": {
3+
"sha1": "fb498f918087557f48dd34b81f3bf4081fe6e961"
4+
},
5+
"path_in_vcs": ""
6+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
allow-print-in-tests = true
2+
allow-expect-in-tests = true
3+
allow-unwrap-in-tests = true
4+
allow-dbg-in-tests = true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: check-yaml
6+
stages: [commit]
7+
- id: check-json
8+
stages: [commit]
9+
- id: check-toml
10+
stages: [commit]
11+
- id: check-merge-conflict
12+
stages: [commit]
13+
- id: check-case-conflict
14+
stages: [commit]
15+
- id: detect-private-key
16+
stages: [commit]
17+
- repo: https://github.com/crate-ci/typos
18+
rev: v1.16.20
19+
hooks:
20+
- id: typos
21+
stages: [commit]
22+
- repo: https://github.com/crate-ci/committed
23+
rev: v1.0.20
24+
hooks:
25+
- id: committed
26+
stages: [commit-msg]
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/).
6+
7+
<!-- next-header -->
8+
## [Unreleased] - ReleaseDate
9+
10+
## [0.11.4] - 2024-06-15
11+
12+
### Fixes
13+
14+
- Annotations for `\r\n` are now correctly handled [#131](https://github.com/rust-lang/annotate-snippets-rs/pull/131)
15+
16+
## [0.11.3] - 2024-06-06
17+
18+
### Fixes
19+
20+
- Dropped MSRV to 1.65
21+
22+
## [0.11.2] - 2024-04-27
23+
24+
### Added
25+
26+
- All public types now implement `Debug` [#119](https://github.com/rust-lang/annotate-snippets-rs/pull/119)
27+
28+
## [0.11.1] - 2024-03-21
29+
30+
### Fixes
31+
32+
- Switch `fold` to use rustc's logic: always show first and last line of folded section and detect if its worth folding
33+
- When `fold`ing the start of a `source`, don't show anything, like we do for the end of the `source`
34+
- Render an underline for an empty span on `Annotation`s
35+
36+
## [0.11.0] - 2024-03-15
37+
38+
### Breaking Changes
39+
40+
- Switched from char spans to byte spans [#90](https://github.com/rust-lang/annotate-snippets-rs/pull/90/commits/b65b8cabcd34da9fed88490a7a1cd8085777706a)
41+
- Renamed `AnnotationType` to `Level` [#94](https://github.com/rust-lang/annotate-snippets-rs/pull/94/commits/b49f9471d920c7f561fa61970039b0ba44e448ac)
42+
- Renamed `SourceAnnotation` to `Annotation` [#94](https://github.com/rust-lang/annotate-snippets-rs/pull/94/commits/bbf9c5fe27e83652433151cbfc7d6cafc02a8c47)
43+
- Renamed `Snippet` to `Message` [#94](https://github.com/rust-lang/annotate-snippets-rs/pull/94/commits/105da760b6e1bd4cfce4c642ac679ecf6011f511)
44+
- Renamed `Slice` to `Snippet` [#94](https://github.com/rust-lang/annotate-snippets-rs/pull/94/commits/1c18950300cf8b93d92d89e9797ed0bae02c0a37)
45+
- `Message`, `Snippet`, `Annotation` and `Level` can only be built with a builder pattern [#91](https://github.com/rust-lang/annotate-snippets-rs/pull/91) and [#94](https://github.com/rust-lang/annotate-snippets-rs/pull/94)
46+
- `Annotation` labels are now optional [#94](https://github.com/rust-lang/annotate-snippets-rs/pull/94/commits/c821084068a1acd2688b6c8d0b3423e143d359e2)
47+
- `Annotation` now takes in `Range<usize>` instead of `(usize, usize)` [#90](https://github.com/rust-lang/annotate-snippets-rs/pull/90/commits/c3bd0c3a63f983f5f2b4793a099972b1f6e97a9f)
48+
- `Margin` is now an internal detail, only `term_width` is exposed [#105](https://github.com/rust-lang/annotate-snippets-rs/pull/105)
49+
- `footer` was generalized to be a `Message` [#98](https://github.com/rust-lang/annotate-snippets-rs/pull/98)
50+
51+
### Added
52+
- `term_width` was added to `Renderer` to control the rendering width [#105](https://github.com/rust-lang/annotate-snippets-rs/pull/105)
53+
- defaults to 140 when not set
54+
55+
### Fixed
56+
- `Margin`s are now calculated per `Snippet`, rather than for the entire `Message` [#105](https://github.com/rust-lang/annotate-snippets-rs/pull/105)
57+
- `Annotation`s can be created without labels
58+
59+
### Features
60+
- `footer` was expanded to allow annotating sources by accepting `Message` [#98](https://github.com/rust-lang/annotate-snippets-rs/pull/98)
61+
62+
## [0.10.2] - 2024-02-29
63+
64+
### Added
65+
66+
- Added `testing-colors` feature to remove platform-specific colors when testing
67+
[#82](https://github.com/rust-lang/annotate-snippets-rs/pull/82)
68+
69+
## [0.10.1] - 2024-01-04
70+
71+
### Fixed
72+
73+
- Match `rustc`'s colors [#73](https://github.com/rust-lang/annotate-snippets-rs/pull/73)
74+
- Allow highlighting one past the end of `source` [#74](https://github.com/rust-lang/annotate-snippets-rs/pull/74)
75+
76+
### Compatibility
77+
78+
- Set the minimum supported Rust version to `1.73.0` [#71](https://github.com/rust-lang/annotate-snippets-rs/pull/71)
79+
80+
## [0.10.0] - December 12, 2023
81+
82+
### Added
83+
84+
- `Renderer` is now used for displaying a `Snippet` [#67](https://github.com/rust-lang/annotate-snippets-rs/pull/67/commits/9076cbf66336e5137b47dc7a52df2999b6c82598)
85+
- `Renderer` also controls the color scheme and formatting of the snippet
86+
87+
### Changed
88+
89+
- Moved everything in the `snippet` to be in the crate root [#67](https://github.com/rust-lang/annotate-snippets-rs/pull/67/commits/a1007ddf2fc6f76e960a4fc01207228e64e9fae7)
90+
91+
### Breaking Changes
92+
93+
- `Renderer` now controls the color scheme and formatting of `Snippet`s [#67](https://github.com/rust-lang/annotate-snippets-rs/pull/67/commits/d0c65b26493d60f86a82c5919ef736b35808c23a)
94+
- Removed the `Style` and `Stylesheet` traits, as color is controlled by `Renderer` [#67](https://github.com/rust-lang/annotate-snippets-rs/pull/67/commits/4affdfb50ea0670d85e52737c082c03f89ae8ada)
95+
- Replaced [`yansi-term`](https://crates.io/crates/yansi-term) with [`anstyle`](https://crates.io/crates/anstyle) [#67](https://github.com/rust-lang/annotate-snippets-rs/pull/67/commits/dfd4e87d6f31ec50d29af26d7310cff5e66ca978)
96+
- `anstyle` is designed primarily to exist in public APIs for interoperability
97+
- `anstyle` is re-exported under `annotate_snippets::renderer`
98+
- Removed the `color` feature in favor of `Renderer::plain()` [#67](https://github.com/rust-lang/annotate-snippets-rs/pull/67/commits/dfd4e87d6f31ec50d29af26d7310cff5e66ca978)
99+
- Moved `Margin` to `renderer` module [#67](https://github.com/rust-lang/annotate-snippets-rs/pull/67/commits/79f657ea252c3c0ce55fa69894ee520f8820b4bf)
100+
- Made the `display_list` module private [#67](https://github.com/rust-lang/annotate-snippets-rs/pull/67/commits/da45f4858af3ec4c0d792ecc40225e27fdd2bac8)
101+
102+
### Compatibility
103+
104+
- Changed the edition to `2021` [#61](https://github.com/rust-lang/annotate-snippets-rs/pull/61)
105+
- Set the minimum supported Rust version to `1.70.0` [#61](https://github.com/rust-lang/annotate-snippets-rs/pull/61)
106+
107+
## [0.9.2] - October 30, 2023
108+
109+
- Remove parsing of __ in title strings, fixes (#53)
110+
- Origin line number is not correct when using a slice with fold: true (#52)
111+
112+
## [0.9.1] - September 4, 2021
113+
114+
- Fix character split when strip code. (#37)
115+
- Fix off by one error in multiline highlighting. (#42)
116+
- Fix display of annotation for double width characters. (#46)
117+
118+
## [0.9.0] - June 28, 2020
119+
120+
- Add strip code to the left and right of long lines. (#36)
121+
122+
## [0.8.0] - April 14, 2020
123+
124+
- Replace `ansi_term` with `yansi-term` for improved performance. (#30)
125+
- Turn `Snippet` and `Slice` to work on borrowed slices, rather than Strings. (#32)
126+
- Fix `\r\n` end of lines. (#29)
127+
128+
## [0.7.0] - March 30, 2020
129+
130+
- Refactor API to use `fmt::Display` (#27)
131+
- Fix SourceAnnotation range (#27)
132+
- Fix column numbers (#22)
133+
- Derive `PartialEq` for `AnnotationType` (#19)
134+
- Update `ansi_term` to 0.12.
135+
136+
## [0.6.1] - July 23, 2019
137+
138+
- Fix too many anonymized line numbers (#5)
139+
140+
## [0.6.0] - June 26, 2019
141+
142+
- Add an option to anonymize line numbers (#3)
143+
- Transition the crate to rust-lang org.
144+
- Update the syntax to Rust 2018 idioms. (#4)
145+
146+
<!-- next-url -->
147+
[Unreleased]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.11.4...HEAD
148+
[0.11.4]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.11.3...0.11.4
149+
[0.11.3]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.11.2...0.11.3
150+
[0.11.2]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.11.1...0.11.2
151+
[0.11.1]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.11.0...0.11.1
152+
[0.11.0]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.10.2...0.11.0
153+
[0.10.2]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.10.1...0.10.2
154+
[0.10.1]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.10.0...0.10.1
155+
[0.10.0]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.9.2...0.10.0
156+
[0.9.2]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.9.1...0.9.2
157+
[0.9.1]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.9.0...0.9.1
158+
[0.9.0]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.8.0...0.9.0
159+
[0.8.0]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.7.0...0.8.0
160+
[0.7.0]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.6.1...0.7.0
161+
[0.6.1]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.6.0...0.6.1
162+
[0.6.0]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.5.0...0.6.0
163+
[0.5.0]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.1.0...0.5.0
164+
[0.1.0]: https://github.com/rust-lang/annotate-snippets-rs/compare/6015d08d7d10151c126c6a70c14f234c0c01b50e...0.1.0

0 commit comments

Comments
 (0)