Rust Skia Versions Save

Rust Bindings for the Skia Graphics Library

0.73.0

1 month ago

This release updates the Rust bindings to align with Skia's milestone 124 in #957 (Release Notes):

Furthermore:

  • #955 makes vk::ImageInfo image and alloc fields private and adds accessors because of a safety issue, reported by @Greatness7 in #953.
  • #954 simplifies the d3d-window example, contributed by @Greatness7.
  • #967 fixes failing testcases with SKIA_DEBUG=1.
  • #966 fixes SVG text rendering, which got broken in 0.70.0, reported by @triniwiz in #960.

Full Changelog: https://github.com/rust-skia/rust-skia/compare/0.72.0...0.73.0

0.72.0

2 months ago

This release updates the Rust bindings to align with Skia's milestone 123 in #938 (Release Notes):

And also:

  • #943 unescapes ninja definitions, fixing a build problem with SKIA_DEBUG=1.
  • #944 makes the use of FreeType explicit. This prevents a warning when GN was set up.
  • #945 adds a skia-org example that loads a custom font. Inspired by @LFernandoMB in #942.
  • 0f8314e6981b9d92133afb15eff4164ba8ea79a1 makes the DirectWrite font manager the default on Windows, fixing a problem with variable fonts, reported by @marc2332 and @geom3trik in #948.

0.71.0

3 months ago

This release updates the Rust bindings to align with Skia's milestone 122 in #925 (Release Notes):

Furthermore:

  • #929 wraps SkCanvas::drawAtlas, noted by @triniwiz in #926.
  • #934 supports rendering PDFs to any Rust type that implements 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.

0.70.0

4 months ago

This is release updates the Rust bindings to align with Skia's milestone 121 in #902 (Release Notes):

Furthermore:

  • #894 Change winapi, wio to windows-rs, contributed by @namse, reported in #893
  • #907 Typo in Typeface::from_data deprecation warning, contributed by @warrd.
  • #912 Improve the safety of functions that expect text in different encodings, reported in #886 by @Caellian.
  • #918 Added some missing comments to wrap_backend_render_target, contributed by @FledgeXu.
  • #919 Disable framebufferOnly for CAMetalLayer, contributed by @FledgeXu.
  • #901 switch from ureq to curl for downloading binaries, contributed by @coderedart, as suggested in #897.
  • #916 Fix builds that enable textlayout and use system libraries, reported in #913 by @aimixsaka
  • #757 Add aarch64-unknown-linux-gnu qa and release CI jobs, reported by @zhengcan, @ctrlcctrlv, and @Subject38

Notable and breaking changes:

  • The 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.
  • The switch from 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.
  • The parameter 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.
  • For downloading binaries and sources, the 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.
  • The new 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!

0.69.0

5 months ago

This is release updates the Rust bindings to align with Skia's milestone 120 in #865 (Release Notes):

And additionally:

  • @ynuwenhof reported in #866 that debug formatting of DirectContext was panicking, which got fixed in #867 by removing the deprecated resource_cache_limits function.
  • #871 updates the examples to use winit version 0.29.
  • @romanzes reported in #872 that an embedded SVG fails to render and fixed the problem in #873 by preserving the base64 padding for SVG embeddings.
  • @syrel changed 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.
  • @Caellian noticed that SkData::MakeFromFileName misses a wrapper in #879, which got added in #881.
  • @akowi-sknobloch reported in #884 that the color parameter of the displacement_map should be an Option, which was fixed in #885.

Thank you for the contributions!

0.68.0

6 months ago

This release updates Skia to milestone 119 in #843 (Release Notes):

And more:

  • @hack3ric improved support for RISC-V architectures in #851 and #854 and fixed a problem in which dependencies were not synchronized when SKIA_USE_SYSTEM_LIBRARIES was used on Linux in #852.
  • @tfemby added documentation to the skia-bindings readme to explain how to use prebuilt binaries in an offline environment #853.
  • #857 added has_foreground and has_background functions to the TextStyle type, which were reported missing by @romanzes in #856.
  • @tronical improved cross-compilation support for the FreeType library in #848.

Within the update to Milestone 119 in #843, there were some notable changes:

  • The minimum platform version for iOS was increases from 10.0 to 12.0.
  • macOS and iOS Metal GPU compilation got improved: Previously, the internal GR_METAL_SDK_VERSION preprocessor variable was set to the wrong value which may have caused unintended side effects.
  • More documentation was added to 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.

0.67.0

7 months ago

This release updates Skia to Milestone 118 in #834 (Release Notes) and fixes two soundness bugs at the expense of some porting work:

  • #836 removes the Send and Sync traits from 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.
  • In a response to #814 from @ennis, in which it was proven that two &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:

  • In #837 @Kethku contributed missing flags to util/shadow_utils.rs.
  • Reported by @syrel in #657, #838 fixed a probing problem with Python when the feature textlayout was enabled. Thank you, @Kethku, for reminding me of this long standing issue.

0.66.3

7 months ago

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.

0.66.2

8 months ago

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.

0.66.1

8 months ago

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