Update some dependencies (#2134)

* Update some dependencies

* Update to action v2

* Fix for v2
This commit is contained in:
James Lindsay 2024-12-12 18:28:49 +00:00 committed by GitHub
parent d97b02506e
commit fc0cf604df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 1831 additions and 1131 deletions

View file

@ -109,23 +109,23 @@ jobs:
uses: actions/checkout@v3
- name: 🔒 Check crate security advisories for root workspace
uses: EmbarkStudios/cargo-deny-action@v1
uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check advisories
- name: 🔒 Check crate security advisories for /libraries/rawkit
uses: EmbarkStudios/cargo-deny-action@v1
uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check advisories
manifest-path: libraries/rawkit/Cargo.toml
- name: 📜 Check crate license compatibility for root workspace
uses: EmbarkStudios/cargo-deny-action@v1
uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check bans licenses sources
- name: 📜 Check crate license compatibility for /libraries/rawkit
uses: EmbarkStudios/cargo-deny-action@v1
uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check bans licenses sources
manifest-path: libraries/rawkit/Cargo.toml

View file

@ -51,5 +51,6 @@
"files.insertFinalNewline": true,
"files.associations": {
"*.graphite": "json"
}
},
"rust-analyzer.checkOnSave": false
}

632
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -51,7 +51,7 @@ ctor = "0.2"
convert_case = "0.6"
derivative = "2.2"
tempfile = "3.6"
thiserror = "1.0"
thiserror = "2"
anyhow = "1.0"
proc-macro2 = "1"
quote = "1.0"
@ -59,32 +59,32 @@ axum = "0.7"
chrono = "0.4"
ron = "0.8"
fastnoise-lite = "1.1"
spirv-std = { git = "https://github.com/GraphiteEditor/rust-gpu.git" }
wgpu-types = "22"
wgpu = { git = "https://github.com/gfx-rs/wgpu.git", features = ["strict_asserts"] } # TODO switch back to stable when a release is made
spirv-std = { git = "https://github.com/Rust-GPU/rust-gpu.git" }
wgpu-types = "23"
wgpu = "23"
once_cell = "1.13" # Remove when `core::cell::LazyCell` (<https://doc.rust-lang.org/core/cell/struct.LazyCell.html>) is stabilized in Rust 1.80 and we bump our MSRV
wasm-bindgen = "=0.2.95" # NOTICE: ensure this stays in sync with the `wasm-bindgen-cli` version in `website/content/volunteer/guide/getting-started/_index.md`. We pin this version because wasm-bindgen upgrades may break various things.
wasm-bindgen = "=0.2.99" # NOTICE: ensure this stays in sync with the `wasm-bindgen-cli` version in `website/content/volunteer/guide/getting-started/_index.md`. We pin this version because wasm-bindgen upgrades may break various things.
wasm-bindgen-futures = "0.4"
js-sys = "=0.3.72"
web-sys = "=0.3.72"
js-sys = "=0.3.76"
web-sys = "=0.3.76"
winit = "0.29"
url = "2.5"
tokio = { version = "1.29", features = ["fs", "io-std"] }
vello = { git = "https://github.com/0hypercube/vello", branch = "latest-wgpu" } # TODO switch back to stable when a release is made
resvg = "0.42"
usvg = "0.42"
vello = { git = "https://github.com/linebender/vello.git", rev = "3275ec8" } # TODO switch back to stable when a release is made
resvg = "0.44"
usvg = "0.44"
rand = { version = "0.8", default-features = false }
rand_chacha = "0.3"
glam = { version = "0.28", default-features = false, features = ["serde"] }
glam = { version = "0.29", default-features = false, features = ["serde"] }
base64 = "0.22"
image = { version = "0.25", default-features = false, features = ["png"] }
rustybuzz = "0.17"
rustybuzz = "0.20"
spirv = "0.3"
fern = { version = "0.6", features = ["colored"] }
num_enum = "0.7"
num-derive = "0.4"
num-traits = { version = "0.2", default-features = false, features = ["i128"] }
specta = { git = "https://github.com/oscartbeaumont/specta.git", features = [
specta = { git = "https://github.com/0hypercube/specta.git", features = [
"glam",
"derive",
# "typescript",

View file

@ -9,6 +9,7 @@
# The values provided in this template are the default values that will be used
# when any section or field is not specified in your own configuration
[graph]
# If 1 or more target triples (and optionally, target_features) are specified,
# only the specified targets will be checked when running `cargo deny check`.
# This means, if a particular package is only ever used as a target specific
@ -27,6 +28,10 @@ targets = [
#{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
]
# Tauri produces too many nonsense warnings.
exclude = ["tauri", "tauri-build"]
# This section is considered when running `cargo deny check advisories`
# More documentation for the advisories section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
@ -35,20 +40,11 @@ targets = [
db-path = "~/.cargo/advisory-db"
# The url(s) of the advisory databases to use
db-urls = ["https://github.com/rustsec/advisory-db"]
# The lint level for security vulnerabilities
vulnerability = "deny"
# The lint level for unmaintained crates
unmaintained = "warn"
# The lint level for crates that have been yanked from their source registry
yanked = "warn"
# The lint level for crates with security notices. Note that as of
# 2019-12-17 there are no security notice advisories in
# https://github.com/rustsec/advisory-db
notice = "warn"
# A list of advisory IDs to ignore. Note that ignored advisories will still
# output a note when they are encountered.
ignore = [
#"RUSTSEC-0000-0000",
"RUSTSEC-2024-0370", # I don't care about unmaintained proc-macro-error
"RUSTSEC-2024-0388", # I don't care about unmaintained derivative
]
# Threshold for security vulnerabilities, any vulnerability with a CVSS score
# lower than the range specified will be ignored. Note that ignored advisories
@ -64,8 +60,6 @@ ignore = [
# More documentation for the licenses section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
[licenses]
# The lint level for crates which do not have a detectable license
unlicensed = "deny"
# List of explicitly allowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
@ -79,34 +73,12 @@ allow = [
"BSL-1.0",
"CC0-1.0",
"ISC",
"MIT-0",
"MIT",
"MPL-2.0",
"OpenSSL",
"Unicode-3.0",
"Unicode-DFS-2016",
"Zlib",
]
# List of explicitly disallowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
deny = [
#"Nokia",
]
# Lint level for licenses considered copyleft
copyleft = "deny"
# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
# * both - The license will be approved if it is both OSI-approved *AND* FSF
# * either - The license will be approved if it is either OSI-approved *OR* FSF
# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
# * neither - This predicate is ignored and the default lint level is used
allow-osi-fsf-free = "neither"
# Lint level used when no other predicates are matched
# 1. License isn't in the allow or deny lists
# 2. License isn't copyleft
# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
default = "deny"
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the
# canonical license text of a valid SPDX license file.
@ -156,7 +128,8 @@ registries = [
# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
[bans]
# Lint level for when multiple versions of the same crate are detected
multiple-versions = "warn"
multiple-versions = "allow"
# Lint level for when a crate version requirement is `*`
wildcards = "allow"
# The graph highlighting used when creating dotgraphs for crates
@ -210,7 +183,7 @@ allow-git = []
[sources.allow-org]
# 1 or more github.com organizations to allow git sources for
github = ["GraphiteEditor"]
github = ["linebender", "Rust-GPU", "0hypercube"]
# 1 or more gitlab.com organizations to allow git sources for
#gitlab = [""]
# 1 or more bitbucket.org organizations to allow git sources for

View file

@ -40,7 +40,7 @@ pub enum Message {
/// Provides an impl of `specta::Type` for `MessageDiscriminant`, the struct created by `impl_message`.
/// Specta isn't integrated with `impl_message`, so a remote impl must be provided using this struct.
impl specta::Type for MessageDiscriminant {
fn inline(_type_map: &mut specta::TypeMap, _generics: specta::Generics) -> specta::DataType {
fn inline(_type_map: &mut specta::TypeCollection, _generics: specta::Generics) -> specta::DataType {
specta::DataType::Any
}
}

View file

@ -15,7 +15,7 @@ documentation = "https://graphite.rs/libraries/bezier-rs/"
[dependencies]
# Required dependencies
glam = { version = "0.28", features = ["serde"] }
glam = { workspace = true, features = ["serde"] }
# Optional local dependencies
dyn-any = { version = "0.3.0", path = "../dyn-any", optional = true }

View file

@ -29,7 +29,7 @@ dyn-any-derive = { path = "derive", optional = true }
# Optional dependencies
log = { version = "0.4", optional = true }
glam = { version = "0.28", optional = true, default-features = false }
glam = { version = "0.29", optional = true, default-features = false }
reqwest = { version = "0.12", optional = true, default-features = false }
[package.metadata.docs.rs]

View file

@ -24,14 +24,14 @@ parsing = []
default = ["parsing"]
[dependencies]
glam = "0.28.0"
glam = "0.29.0"
regex = "1.10.6"
slotmap = "1.0.7"
[dev-dependencies]
glob = "0.3"
svg = "0.13"
resvg = "0.42"
svg = "0.18"
resvg = "0.44"
image = "0.24"
# Required dependencies

File diff suppressed because it is too large Load diff

View file

@ -525,7 +525,7 @@ impl GraphicElementRendered for VectorData {
match self.style.fill() {
Fill::Solid(color) => {
let fill = peniko::Brush::Solid(peniko::Color::rgba(color.r() as f64, color.g() as f64, color.b() as f64, color.a() as f64));
let fill = peniko::Brush::Solid(peniko::Color::new([color.r(), color.g(), color.b(), color.a()]));
scene.fill(peniko::Fill::NonZero, kurbo::Affine::new(element_transform.to_cols_array()), &fill, None, &path);
}
Fill::Gradient(gradient) => {
@ -533,7 +533,7 @@ impl GraphicElementRendered for VectorData {
for &(offset, color) in &gradient.stops.0 {
stops.push(peniko::ColorStop {
offset: offset as f32,
color: peniko::Color::rgba(color.r() as f64, color.g() as f64, color.b() as f64, color.a() as f64),
color: peniko::color::DynamicColor::from_alpha_color(peniko::Color::new([color.r(), color.g(), color.b(), color.a()])),
});
}
// Compute bounding box of the shape to determine the gradient start and end points
@ -576,7 +576,7 @@ impl GraphicElementRendered for VectorData {
if let Some(stroke) = self.style.stroke() {
let color = match stroke.color {
Some(color) => peniko::Color::rgba(color.r() as f64, color.g() as f64, color.b() as f64, color.a() as f64),
Some(color) => peniko::Color::new([color.r(), color.g(), color.b(), color.a()]),
None => peniko::Color::TRANSPARENT,
};
use crate::vector::style::{LineCap, LineJoin};
@ -701,7 +701,7 @@ impl GraphicElementRendered for Artboard {
use vello::peniko;
// Render background
let color = peniko::Color::rgba(self.background.r() as f64, self.background.g() as f64, self.background.b() as f64, self.background.a() as f64);
let color = peniko::Color::new([self.background.r(), self.background.g(), self.background.b(), self.background.a()]);
let [a, b] = [self.location.as_dvec2(), self.location.as_dvec2() + self.dimensions.as_dvec2()];
let rect = kurbo::Rect::new(a.x.min(b.x), a.y.min(b.y), a.x.max(b.x), a.y.max(b.y));
let blend_mode = peniko::BlendMode::new(peniko::Mix::Clip, peniko::Compose::SrcOver);

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,7 @@ convert_case = { workspace = true }
indoc = "2.0.5"
proc-macro-crate = "3.1.0"
proc-macro-error = "1.0"
proc-macro-error2 = "2"
[dev-dependencies]
graphene-core = { workspace = true }

View file

@ -2,7 +2,7 @@
use proc_macro::TokenStream;
use proc_macro2::Span;
use proc_macro_error::proc_macro_error;
use proc_macro_error2::proc_macro_error;
use quote::{format_ident, quote, ToTokens};
use syn::{
parse_macro_input, punctuated::Punctuated, token::Comma, AngleBracketedGenericArguments, AssocType, FnArg, GenericArgument, GenericParam, Ident, ItemFn, Lifetime, Pat, PatIdent, PathArguments,

View file

@ -1,6 +1,6 @@
use crate::parsing::{Implementation, ParsedField, ParsedNodeFn};
use proc_macro_error::emit_error;
use proc_macro_error2::emit_error;
use quote::quote;
use syn::{spanned::Spanned, GenericParam, Type};

View file

@ -156,7 +156,7 @@ impl WgpuExecutor {
let render_params = RenderParams {
// We are using an explicit opaque color here to eliminate the alpha premulitplication step
// which would be required to support a transparent webgpu canvas
base_color: vello::peniko::Color::rgb8(0x22, 0x22, 0x22),
base_color: vello::peniko::Color::from_rgba8(0x22, 0x22, 0x22, 0xff),
width,
height,
antialiasing_method: AaConfig::Msaa8,

View file

@ -21,7 +21,7 @@ Next, install the dependencies required for development builds:
```sh
cargo install cargo-watch
cargo install wasm-pack
cargo install -f wasm-bindgen-cli@0.2.95
cargo install -f wasm-bindgen-cli@0.2.99
```
Regarding the last one: you'll likely get faster build times if you manually install that specific version of `wasm-bindgen-cli`. It is supposed to be installed automatically but a version mismatch causes it to reinstall every single recompilation. It may need to be manually updated periodically to match the version of the `wasm-bindgen` dependency in [`Cargo.toml`](https://github.com/GraphiteEditor/Graphite/blob/master/Cargo.toml).