Bump dependencies (#4523)
4
.github/workflows/ci.yml
vendored
@ -53,7 +53,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@1.74.0
|
||||
- uses: dtolnay/rust-toolchain@1.77.0
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo check --workspace
|
||||
|
||||
@ -64,7 +64,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: nightly-2023-09-13
|
||||
toolchain: nightly-2024-06-01
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo install --locked cargo-fuzz@0.12.0
|
||||
- run: cd tests/fuzz && cargo fuzz build --dev
|
||||
|
855
Cargo.lock
generated
14
Cargo.toml
@ -5,7 +5,7 @@ resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.11.0"
|
||||
rust-version = "1.74" # also change in ci.yml
|
||||
rust-version = "1.77" # also change in ci.yml
|
||||
authors = ["The Typst Project Developers"]
|
||||
edition = "2021"
|
||||
homepage = "https://typst.app"
|
||||
@ -49,7 +49,7 @@ flate2 = "1"
|
||||
fontdb = { version = "0.18", default-features = false }
|
||||
fs_extra = "1.3"
|
||||
hayagriva = "0.5.3"
|
||||
heck = "0.4"
|
||||
heck = "0.5"
|
||||
hypher = "0.1.4"
|
||||
icu_properties = { version = "1.4", features = ["serde"] }
|
||||
icu_provider = { version = "1.4", features = ["sync"] }
|
||||
@ -57,7 +57,7 @@ icu_provider_adapters = "1.4"
|
||||
icu_provider_blob = "1.4"
|
||||
icu_segmenter = { version = "1.4", features = ["serde"] }
|
||||
if_chain = "1"
|
||||
image = { version = "0.24", default-features = false, features = ["png", "jpeg", "gif"] }
|
||||
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "gif"] }
|
||||
indexmap = { version = "2", features = ["serde"] }
|
||||
kamadak-exif = "0.5"
|
||||
kurbo = "0.11"
|
||||
@ -109,7 +109,7 @@ time = { version = "0.3.20", features = ["formatting", "macros", "parsing"] }
|
||||
tiny-skia = "0.11"
|
||||
toml = { version = "0.8", default-features = false, features = ["parse", "display"] }
|
||||
ttf-parser = "0.21.0"
|
||||
two-face = { version = "0.3.0", default-features = false, features = ["syntect-fancy"] }
|
||||
two-face = { version = "0.4.0", default-features = false, features = ["syntect-fancy"] }
|
||||
typed-arena = "2"
|
||||
unicode-bidi = "0.3.13"
|
||||
unicode-ident = "1.0"
|
||||
@ -121,13 +121,13 @@ unscanny = "0.1"
|
||||
ureq = { version = "2", default-features = false, features = ["native-tls", "gzip", "json"] }
|
||||
usvg = { version = "0.42", default-features = false, features = ["text"] }
|
||||
walkdir = "2"
|
||||
wasmi = "0.31.0"
|
||||
wasmi = "0.34.0"
|
||||
xmlparser = "0.13.5"
|
||||
xmlwriter = "0.1.0"
|
||||
xmp-writer = "0.2"
|
||||
xz2 = "0.1"
|
||||
xz2 = { version = "0.1", features = ["static"] }
|
||||
yaml-front-matter = "0.1"
|
||||
zip = { version = "0.6", default-features = false, features = ["deflate"] }
|
||||
zip = { version = "2", default-features = false, features = ["deflate"] }
|
||||
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 2
|
||||
|
@ -53,7 +53,7 @@ tar = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
toml = { workspace = true }
|
||||
ureq = { workspace = true }
|
||||
xz2 = { workspace = true, optional = true, features = ["static"] }
|
||||
xz2 = { workspace = true, optional = true }
|
||||
zip = { workspace = true, optional = true }
|
||||
|
||||
# Explicitly depend on OpenSSL if applicable, so that we can add the
|
||||
|
@ -234,12 +234,12 @@ impl Plugin {
|
||||
let ty = func.ty(store.as_context());
|
||||
|
||||
// Check function signature.
|
||||
if ty.params().iter().any(|&v| v != wasmi::core::ValueType::I32) {
|
||||
if ty.params().iter().any(|&v| v != wasmi::core::ValType::I32) {
|
||||
bail!(
|
||||
"plugin function `{name}` has a parameter that is not a 32-bit integer"
|
||||
);
|
||||
}
|
||||
if ty.results() != [wasmi::core::ValueType::I32] {
|
||||
if ty.results() != [wasmi::core::ValType::I32] {
|
||||
bail!("plugin function `{name}` does not return exactly one 32-bit integer");
|
||||
}
|
||||
|
||||
@ -257,14 +257,14 @@ impl Plugin {
|
||||
// Collect the lengths of the argument buffers.
|
||||
let lengths = args
|
||||
.iter()
|
||||
.map(|a| wasmi::Value::I32(a.len() as i32))
|
||||
.map(|a| wasmi::Val::I32(a.len() as i32))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
// Store the input data.
|
||||
store.data_mut().args = args;
|
||||
|
||||
// Call the function.
|
||||
let mut code = wasmi::Value::I32(-1);
|
||||
let mut code = wasmi::Val::I32(-1);
|
||||
func.call(store.as_context_mut(), &lengths, std::slice::from_mut(&mut code))
|
||||
.map_err(|err| eco_format!("plugin panicked: {err}"))?;
|
||||
if let Some(MemoryError { offset, length, write }) =
|
||||
@ -281,8 +281,8 @@ impl Plugin {
|
||||
|
||||
// Parse the functions return value.
|
||||
match code {
|
||||
wasmi::Value::I32(0) => {}
|
||||
wasmi::Value::I32(1) => match std::str::from_utf8(&output) {
|
||||
wasmi::Val::I32(0) => {}
|
||||
wasmi::Val::I32(1) => match std::str::from_utf8(&output) {
|
||||
Ok(message) => bail!("plugin errored with: {message}"),
|
||||
Err(_) => {
|
||||
bail!("plugin errored, but did not return a valid error message")
|
||||
|
@ -30,11 +30,11 @@ impl RasterImage {
|
||||
/// Decode a raster image.
|
||||
#[comemo::memoize]
|
||||
pub fn new(data: Bytes, format: RasterFormat) -> StrResult<RasterImage> {
|
||||
fn decode_with<'a, T: ImageDecoder<'a>>(
|
||||
fn decode_with<T: ImageDecoder>(
|
||||
decoder: ImageResult<T>,
|
||||
) -> ImageResult<(image::DynamicImage, Option<Vec<u8>>)> {
|
||||
let mut decoder = decoder?;
|
||||
let icc = decoder.icc_profile().filter(|icc| !icc.is_empty());
|
||||
let icc = decoder.icc_profile().ok().flatten().filter(|icc| !icc.is_empty());
|
||||
decoder.set_limits(Limits::default())?;
|
||||
let dynamic = image::DynamicImage::from_decoder(decoder)?;
|
||||
Ok((dynamic, icc))
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |