Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: alacritty/vte
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.13.0
Choose a base ref
...
head repository: alacritty/vte
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 16 commits
  • 19 files changed
  • 7 contributors

Commits on Jan 25, 2024

  1. Copy the full SHA
    ed51aa1 View commit details

Commits on Apr 1, 2024

  1. Add SCP control support

    Modern usage of this control function comes from the BiDi draft
    proposal:
    
    https://terminal-wg.pages.freedesktop.org/bidi/recommendation/escape-sequences.html
    
    The draft slightly extends the definition in ECMA-48.
    
    Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
    MoSal authored Apr 1, 2024
    Copy the full SHA
    a971e86 View commit details

Commits on Jun 8, 2024

  1. Bump crate versions missing license files

    This patch bumps utf8parse/vte_generate_state_changes versions to
    release the change which included the license files into the crates.io
    package.
    
    Closes #113.
    chrisduerr authored Jun 8, 2024
    Copy the full SHA
    ebc4a4d View commit details

Commits on Dec 28, 2024

  1. Improve attrs_from_sgr_parameters performance

    Instead of collecting all the data into the vector just dispatch it
    right away avoiding allocations.
    kchibisov authored Dec 28, 2024
    Copy the full SHA
    40af639 View commit details

Commits on Jan 2, 2025

  1. Bump version to 0.13.1

    chrisduerr authored Jan 2, 2025
    Copy the full SHA
    89c12df View commit details

Commits on Jan 9, 2025

  1. Switch parser to multi-byte processing

    This patch overhauls the `Parser::advance` API to operate on byte slices
    instead of individual bytes, which allows for additional performance
    optimizations.
    
    VTE does not support C1 escapes and C0 escapes always start with an
    escape character. This makes it possible to simplify processing if a
    byte stream is determined to not contain any escapes. The `memchr` crate
    provides a battle-tested implementation for SIMD-accelerated byte
    searches, which is why this implementation makes use of it.
    
    VTE also only supports UTF8 characters in the ground state, which means
    that the new non-escape parsing path is able to rely completely on STD's
    `str::from_utf8` since `memchr` gives us the full length of the plain
    text character buffer. This allows us to completely remove `utf8parse`
    and all related code.
    
    We also make use of `memchr` in the synchronized escape handling in
    `ansi.rs`, since it relies heavily on scanning large amounts of text for
    the extension/termination escape sequences.
    chrisduerr authored Jan 9, 2025
    Copy the full SHA
    7321a44 View commit details
  2. Bump version to 0.14.0

    chrisduerr authored Jan 9, 2025
    Copy the full SHA
    4d9f129 View commit details
  3. Copy the full SHA
    ff21c30 View commit details

Commits on Jan 12, 2025

  1. Fix crash when valid char was split

    If the valid character was split across reads of partial utf8 and
    got terminated by invalid byte, we should print it and advance, instead
    of trying to discard it entirely.
    kchibisov authored Jan 12, 2025
    Copy the full SHA
    c18ef22 View commit details
  2. Rewrite table based state change to match based

    The table based state change was too complex to make guesses why it's
    getting slow and too fragile, as in modifying the amount of
    states/actions were slowing down, even though, they were not used.
    
    Rewrite the state + action change exactly how it's in [1] with respect
    to our modifications/C1, etc. The new implementation is generally faster
    than the previous one and is easier for compiler to reason about and
    generate more efficient structures.
    
    Also, the structure got way simpler to follow, since it matches the
    spec pretty much exactly.
    
    [1] - https://vt100.net/emu/dec_ansi_parser
    kchibisov authored Jan 12, 2025
    Copy the full SHA
    b3fba56 View commit details
  3. Bump version to 0.14.1

    chrisduerr authored Jan 12, 2025
    Copy the full SHA
    425fc59 View commit details

Commits on Jan 17, 2025

  1. Copy the full SHA
    9c45ce6 View commit details

Commits on Jan 27, 2025

  1. Replace no_std with std feature

    The `no_std` feature has been broken since version `0.14`, since it did
    not disable the `std` feature of `memchr`.
    
    To fall more in line with the general ecosystem standards, this crate
    changes the `no_std` feature into an `std` feature. Since `vte` should
    be significantly faster with this feature, it has also been enabled by
    default (previously `no_std` was default).
    
    This is a breaking change, even if we ignore `no_std` consumers which
    aren't able to compile 0.14, since intermediate dependencies relying on
    the `no_std` feature will have to remove it from the manifest.
    chrisduerr authored Jan 27, 2025
    Copy the full SHA
    35dd9e2 View commit details

Commits on Jan 28, 2025

  1. Disable default-features for memchr

    Fixes an issue with std not being disabled when building
    vte without std feature.
    rafalmiel authored Jan 28, 2025
    Copy the full SHA
    85894d4 View commit details

Commits on Feb 2, 2025

  1. Bump version to 0.15.0

    chrisduerr authored Feb 2, 2025
    Copy the full SHA
    3b3da71 View commit details

Commits on Apr 8, 2025

  1. Copy the full SHA
    ca3dd62 View commit details
Showing with 1,288 additions and 1,782 deletions.
  1. +4 −0 .builds/linux.yml
  2. +21 −0 CHANGELOG.md
  3. +12 −13 Cargo.toml
  4. +1 −5 examples/parselog.rs
  5. +5 −1 rustfmt.toml
  6. +377 −171 src/ansi.rs
  7. +0 −111 src/definitions.rs
  8. +865 −426 src/lib.rs
  9. +3 −2 src/params.rs
  10. +0 −171 src/table.rs
  11. +0 −15 utf8parse/Cargo.toml
  12. +0 −176 utf8parse/LICENSE-APACHE
  13. +0 −25 utf8parse/LICENSE-MIT
  14. +0 −132 utf8parse/src/lib.rs
  15. +0 −100 utf8parse/src/types.rs
  16. +0 −212 utf8parse/tests/UTF-8-demo.txt
  17. +0 −31 utf8parse/tests/utf-8-demo.rs
  18. +0 −15 vte_generate_state_changes/Cargo.toml
  19. +0 −176 vte_generate_state_changes/src/lib.rs
4 changes: 4 additions & 0 deletions .builds/linux.yml
Original file line number Diff line number Diff line change
@@ -23,3 +23,7 @@ tasks:
$HOME/.cargo/bin/rustup toolchain install --profile minimal $msrv
rm Cargo.lock
$HOME/.cargo/bin/cargo +$msrv test
- rustdoc: |
$HOME/.cargo/bin/rustup toolchain install nightly -c rust-docs
cd vte
RUSTDOCFLAGS="--cfg docsrs -Dwarnings" $HOME/.cargo/bin/cargo +nightly doc --all-features --no-deps
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
CHANGELOG
=========

## 0.15.0

- Support `CSI ? 5 W` to reset tabs stops to every 8th column
- Replaced `no_std` with a new `std` feature
- Changed default features to include `std`

## 0.14.1

- Crash when partial advance buffer stopped inside some grapheme boundaries

## 0.14.0

- `Parser::advance` now takes byte slices, instead of individual bytes
- `Parser::advance_until_terminated` allows premature termination,
by checking for `Perform::terminated` after each dispatch

## 0.13.1

- Add SCP control support
- Improve SGR performance

## 0.13.0

- Reexport `cursor_icon` crate in `ansi`
25 changes: 12 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -8,26 +8,25 @@ categories = ["parsing", "no-std"]
exclude = ["/.travis.yml"]
readme = "README.md"
license = "Apache-2.0 OR MIT"
version = "0.13.0"
version = "0.15.0"
name = "vte"
edition = "2021"
rust-version = "1.62.1"

[features]
ansi = ["log", "cursor-icon", "bitflags"]
default = ["std"]
std = ["memchr/std"]
serde = ["dep:serde"]

[dependencies]
arrayvec = { version = "0.7.2", default-features = false, optional = true }
arrayvec = { version = "0.7.2", default-features = false }
bitflags = { version = "2.3.3", default-features = false, optional = true }
cursor-icon = { version = "1.0.0", default-features = false, optional = true }
log = { version = "0.4.17", optional = true }
memchr = { version = "2.7.4", default-features = false }
serde = { version = "1.0.160", features = ["derive"], optional = true }
utf8parse = { version = "0.2.0", path = "utf8parse" }
vte_generate_state_changes = { version = "0.1.0", path = "vte_generate_state_changes" }

[features]
ansi = ["log", "cursor-icon", "bitflags"]
default = ["no_std"]
nightly = ["utf8parse/nightly"]
no_std = ["arrayvec"]
serde = ["dep:serde"]

[workspace]
members = ["utf8parse", "vte_generate_state_changes"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 1 addition & 5 deletions examples/parselog.rs
Original file line number Diff line number Diff line change
@@ -61,11 +61,7 @@ fn main() {
loop {
match handle.read(&mut buf) {
Ok(0) => break,
Ok(n) => {
for byte in &buf[..n] {
statemachine.advance(&mut performer, *byte);
}
},
Ok(n) => statemachine.advance(&mut performer, &buf[..n]),
Err(err) => {
println!("err: {}", err);
break;
6 changes: 5 additions & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
format_code_in_doc_comments = true
group_imports = "StdExternalCrate"
match_block_trailing_comma = true
condense_wildcard_suffixes = true
use_field_init_shorthand = true
normalize_doc_attributes = true
overflow_delimited_expr = true
imports_granularity = "Module"
format_macro_matchers = true
use_small_heuristics = "Max"
hex_literal_case = "Upper"
normalize_comments = true
reorder_impl_items = true
use_try_shorthand = true
newline_style = "Unix"
format_strings = true
wrap_comments = true
comment_width = 100
Loading