Rust Bindings for the Skia Graphics Library
This release updates the Rust bindings to align with Skia's milestone 124 in #957 (Release Notes):
Furthermore:
vk::ImageInfo
image
and alloc
fields private and adds accessors because of a safety issue, reported by @Greatness7 in #953.SKIA_DEBUG=1
.Full Changelog: https://github.com/rust-skia/rust-skia/compare/0.72.0...0.73.0
This release updates the Rust bindings to align with Skia's milestone 123 in #938 (Release Notes):
And also:
SKIA_DEBUG=1
.This release updates the Rust bindings to align with Skia's milestone 122 in #925 (Release Notes):
Furthermore:
SkCanvas::drawAtlas
, noted by @triniwiz in #926.io::Write
, requested by @giacomocariello in #584.With milestone 122 the default font manager were removed from Skia. To keep it easier to access preinstalled system fonts, we tried to reproduce the behavior of pre 122 milestone releases here: https://github.com/rust-skia/rust-skia/blob/65d69e3427e3a085d1020564b7f92e362d9fe50d/skia-bindings/src/bindings.cpp#L1546-L1603. The replacement code got tested on the major desktop platforms and therefore may not work on other platforms like Android oder iOS. If you experience incompatibilities with typefaces and fonts compared to 0.70.0
(milestone 121), please drop us a note.
This is release updates the Rust bindings to align with Skia's milestone 121 in #902 (Release Notes):
Furthermore:
winapi
, wio
to windows-rs
, contributed by @namse, reported in #893Typeface::from_data
deprecation warning, contributed by @warrd.wrap_backend_render_target
, contributed by @FledgeXu.framebufferOnly
for CAMetalLayer
, contributed by @FledgeXu.textlayout
and use system libraries, reported in #913 by @aimixsakaaarch64-unknown-linux-gnu
qa and release CI jobs, reported by @zhengcan, @ctrlcctrlv, and @Subject38Notable and breaking changes:
Codec::Decoder
trait that was introduced a while back was replaced by codecs::Decoder
that actually encapsulates the underlying Skia type. This made it possible to create the wrapper Codec::from_stream
. Details can be found in #902.winapi
to windows-rs
introduces a number of incompatibilities for projects that use the d3d
feature. Take a look at the changes of skia-safe/examples/d3d-window
and skia-org
in #894 to get an overview what's needed to update your application.TextEncoding
was removed from functions that support text in different encodings. For more details how text encoding is derived directly from the text, take a look at the implementations of the EncodedText
trait in #912.curl
command line tool is now a prerequisite. This is currently experimental. So if you run into troubles, don't forget to open an issue or even better dive into #901.aarch64-unknown-linux-gnu
binaries are untested yet, so feedback is highly appreciated.And then you should all take a look at @coderedart's ideas for building a lighter version of Skia bindings for Rust that are based on SkiaSharp's C bindings. Focusing on reducing build time and dependencies, the project progressed tremendously over the last few days. For an overview of what's behind that all, head over to https://github.com/rust-skia/rust-skia/discussions/897#discussioncomment-8135116.
Thank you for your contributions!
This is release updates the Rust bindings to align with Skia's milestone 120 in #865 (Release Notes):
And additionally:
DirectContext
was panicking, which got fixed in #867 by removing the deprecated resource_cache_limits
function.Canvas::draw_shadow()
so that it accepts a shared instead of a exclusive Canvas
reference in #876. And after going through all impl Canvas
items, a few more functions were adjusted accordingly in #878.SkData::MakeFromFileName
misses a wrapper in #879, which got added in #881.color
parameter of the displacement_map
should be an Option
, which was fixed in #885.Thank you for the contributions!
This release updates Skia to milestone 119 in #843 (Release Notes):
And more:
SKIA_USE_SYSTEM_LIBRARIES
was used on Linux in #852.has_foreground
and has_background
functions to the TextStyle
type, which were reported missing by @romanzes in #856.Within the update to Milestone 119 in #843, there were some notable changes:
GR_METAL_SDK_VERSION
preprocessor variable was set to the wrong value which may have caused unintended side effects.core/color_filter.rs
core/color_type.rs
, core/shader.rs
, core/pdf_document.rs
, effects/image_filters.rs
, gpu/context_options.rs
, and modules/paragraph/paragraph.rs
.This release updates Skia to Milestone 118 in #834 (Release Notes) and fixes two soundness bugs at the expense of some porting work:
Paragraph
(enabled with the feature textlayout
). The type was initially intended to be thread safe, but while reading the related C++ code, I've found it isn't and posted a bug report which hasn't been attended to for years, so I've decided to represent that fact in Rust. Therefore, if you were crossing thread boundaries with a Paragraph value, you need to rethink your design.&mut Canvas
references may point to the same address, I've decided in #816 to expose Canvas
through a shared reference and leave the interior mutability to the C++ part. This makes it safe to use from Rust, but may also turn out to be confusing, because Canvas
does use internal state, but also acts as a simple facade for the thing it renders to. The consequence is some - albeit simple - porting work, namely converting all &mut Canvas
usages to &Canvas
. This is something we won't roll back after the adoption of this release, so if there are objections or other ideas on how to tackle this, now is the time.Also:
util/shadow_utils.rs
.textlayout
was enabled. Thank you, @Kethku, for reminding me of this long standing issue.This is a hotfix release that updates Skia (#842) which in turn fixes a critical vulnerability in the libwebp library. This CVE affects all prior skia-safe and skia-bindings releases if one of the webp features were enabled.
For more details, take a look at issue #841 . And thank you a lot @marc2332 for the report.
This is a small maintenance release that fixes a build problem on Windows when the environment variable VCINSTALLDIR
ends in a backslash character. Thankfully contributed by @tronical in #835.
This release fixes a problem with downloading the prebuilt binaries or - if they are not available - sources. Thankfully reported by @tronical in https://github.com/rust-skia/rust-skia/issues/720#issuecomment-1715288397