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