New year, new release!
Hi everyone! Happy new year!
With this new year comes a new gtk-rs release! As usual, a lot of improvements have been made. Let’s check them out!
One important change: the minimum supported rust version is now 1.56.
Minimum and latest supported versions of the underlying C libraries §
The minimum supported versions of the underlying C libraries have not changed compared to last release but support for newer versions was added:
- GLib/GObject/GIO: minimum 2.48, latest 2.72
- Pango/PangoCairo: minimum 1.38, latest 1.52
- gdk-pixbuf: minimum 2.32, latest 2.42
- cairo: minimum 1.14, latest 1.16
- graphene: minimum 1.10
- ATK: minimum 2.18, latest 2.38
- GTK3: minimum 3.18, latest, 3.24.9
- GTK4: minimum 4.0, latest 4.6
Changes to derive macro names §
All derive and attribute macros are named more consistently now. Instead of e.g. glib::GBoxed, the new name is just glib::Boxed and misses the additional G, which would be redundant namespacing.
GLib Variant API improvements and derive macro §
The glib::Variant API was improved a lot in this release. Variant is a type that allows to store structured data built from basic types in a way that can be serialized into binary data efficiently.
A lot of API that was missing in previous releases was added, including API for efficient conversion from/to slices of basic types, strings and other container types. The existing conversion APIs were optimized and cleaned up.
To make it easier to handle custom structs (and soon enums), a derive macro was added that allows to directly convert between a custom Rust type and a Variant and back.
use glib::prelude::*;
#[derive(Debug, PartialEq, Eq, glib::Variant)]
struct Foo {
some_string: String,
some_int: i32,
}
let v = Foo { some_string: String::from("bar"), some_int: 1 };
let var = v.to_variant();
assert_eq!(var.get::<Foo>(), Some(v));
By using the derive macro, structured data can be handled automatically instead of manually accessing each of the individual parts of the data. This can be helpful for sending structured data over DBus via the gio DBus API, or for dealing with gio::Settings or for more complex states/values used in gio::Action.
Stack allocated types and reducing heap allocations §
Various types that are usually stack-allocated in C were previously heap-allocated in the Rust bindings. With this release, these values are also stack-allocated when used from Rust unless explicitly heap-allocated, e.g. by explicitly placing them into a Box.
Examples for this are all the graphene types (vectors, matrices, etc), which should make calculations considerably more efficient, types like gdk::Rectangle and gdk::RGBA, and gtk::TreeIter.
Overall this brings performance of applications using the Rust bindings even closer to the same code in C.
Main context API improvements §
When spawning non-Send futures or closures, or attaching the main context channel to the glib::MainContext, it is not necessary anymore to have the main context acquired before. This was a common cause of confusion and this constraint was relaxed now. Instead it is only required that that thread default main context is not owned by a different thread yet, and if ownership is moved to a different thread at some point then it will panic at runtime.
Additionally the API for pushing a main context as the thread default was refactored to reduce the risk of misusage. Instead of returning a guard value, it can only be used via a closure now to ensure proper nesting of thread default main contexts.
let ctx = glib::MainContext::new();
ctx.with_thread_default(|| {
// do something with `ctx` being the thread default main context.
}).expect("Main context already owned by another thread");
GLib string builder §
glib::String was renamed to glib::GStringBuilder to avoid confusion with glib::GString and to make it clearer that this is meant for building NUL-terminated C strings.
In addition the API was simplified considerably:
- All APIs that allowed to create invalid UTF-8 were removed, leaving only safe APIs to build UTF-8 strings.
GStringBuilderdirectly dereferences into&str, so all&strAPI can be used on it.GStringBuilderimplements thestd::fmt::Writetrait, which allows making use of variousstdRust API. For examplewrite!(&mut builder, "some format string {}", some_value)can be used directly to write formatted strings into the string builder.
Multiple improvements on glib::ObjectExt §
ObjectExt::propertynow return the type T directly instead of aglib::Valueand panics in case the property is not readable or the wrong type is provided.ObjectExt::set_propertynow panics in case the property is not writeable or doesn’t existsObjectExt::emit_by_nameexpects you to pass in the type T for the returned value by the signal. If the signal doesn’t return anything, you can usesome_obj.emit_by_name::<()>("some_signal", &[]);and also panics if the signal doesn’t exists.
Before:
object.property("some_property").unwrap().get::<T>().unwrap();
object.set_property("some_property", &some_value).unwrap();
// signal that returns nothing
object.emit_by_name("some_signal").unwrap();
// signal that returns T
let some_value = object.emit_by_name("some_signal").unwrap().unwrap().get::<T>().unwrap();
After:
object.property::<T>("some_property");
object.set_property("some_property", &some_value);
object.emit_by_name::<()>("some_signal");
let some_value = object.emit_by_name::<T>("some_signal");
A ObjectExt::try_* variant exists if you want the old behaviour. As most of the application code unwraps the returned results, this should be one of the slight but nice improvements of the overall API.
Bindings wrapper types memory representation optimization §
All heap-allocated bindings types do now have a memory representation that is equivalent to the underlying raw C pointer. In addition to reducing memory usage compared to before, this also allows for other optimizations and e.g allows to borrow values from C storage in a few places instead of creating copies or increasing their reference count (e.g. in glib::PtrSlice).
GLib collection types §
While not used widely yet, a new glib::collections module was added that provides more efficient access to slices, pointer slices and linked lists allocated from C. This is similar to the older glib::GString type, which represents an UTF-8 encoded, NUL-terminated C string allocated with the GLib allocator.
Previously (and still for most API), these were converted from/to native Rust types at the FFI boundary, which often caused unnecessary re-allocations and memory copies. In the next release we’re trying to move even more API to these new collection types for further performance improvements, and for only doing conversions between Rust and C types when actually necessary.
Cancelling futures spawned on the GLib main context §
Spawning futures on the main context now returns the source id. This allows to get access to the underlying glib::Source and to cancel the future before completion.
Cancelling the future by this, or by other API that drops it (e.g. by selecting on two futures and only processing the first that resolves), will cancel all asynchronous operations performed by them at the next opportunity.
Dynamic signal connections §
A new glib::closure and glib::closure_local was added that allows to create a glib::Closure from a Rust closure while automatically unpacking argument glib::Values to their native Rust types and packing the return value.
While this doesn’t sound too exciting, it makes connecting to signals that have no static bindings more convenient.
Before:
obj.connect(
"notify", false,
|args| {
let _obj = args[0].get::<glib::Object>().unwrap();
let pspec = args[1].get::<glib::ParamSpec>().unwrap();
println!("property notify: {}", pspec.name());
});
After:
obj.connect_closure(
"notify", false,
glib::closure_local!(|_obj: glib::Object, pspec: glib::ParamSpec| {
println!("property notify: {}", pspec.name());
}));
The macros support the same syntax as the glib::clone macro for creating strong/weak references, plus a watch feature that automatically disconnects the closure once the watched object disappears.
Object subclassing improvements §
glib::ParamSpecOverride has now two helper constructors to create an override of a class property or an interface property. For example, overriding the hadjustment property of the gtk::Scrollable interface can be done with ParamSpecOverride::for_interface::<gtk::Scrollable>("hadjustment").
Passing Cairo image surfaces to other threads and getting owned access to its data §
Cairo image surfaces can now be converted to an owned value that behaves like an &mut [u8] and that can be safely sent to different threads. This allows both sending Cairo image surfaces to other threads safely as well as their underlying data, e.g. to fill an image surface from a compressed image via the image crate or saving the contents of an image surface to compressed data from a different thread.
let surface = cairo::ImageSurface::create(cairo::Format:ARgb32, 320, 240).except("Failed to allocate memory");
// Use Cairo API on the `surface`.
// [...]
let data = surface.take_data().expect("Not the unique owner of the surface");
// Send `data` to another thread or otherwise treat it as a `&mut [u8]`.
// [...]
let surface = data.into_inner();
// Use the `surface` with Cairo APIs again.
This solves one of the common problems when using Cairo in multi-threaded applications.
GIO bindings improvements §
The gio bindings saw many additions and improvements. Among other things it is now possible to implement the gio::Initable interface, the gio::IOExtension API is now available, and the gio::Task bindings have been reworked to address soundness issues. More improvements to the gio::Task bindings are necessary for them to become nice to use from Rust.
Gdkwayland §
In this release, we generated the bindings for gdkwayland. You can now use the brand new gdkwayland crate!
GTK3 child properties §
The GTK3 bindings had API added for generically setting and getting child properties.
This allows to access child properties for which no static bindings are available and performs all checks at runtime instead of at compile time. The API works the same as the API for setting and getting object properties.
gtk4-rs and BuilderScope §
The most important feature that landed on this release is a Rust BuilderScope implementation thanks to one of the awesome contributions of @jf2048. This will allow applications to set callbacks/functions names in the UI file and define those in your Rust code. This only works with the CompositeTemplate macro. See the documentations for how to make use of this new feature.
We also added:
- Trust upstream return nullability: in other words, gtk4 crates trust the nullable annotations provided in the
GIRfile which replaces a bunch of returned Option and returns only T nowadays. Please open an issue if you find any regressions. - GTK 4.6 support, use
v4_6feature to unlock the new APIs. - Functions that return a
glib::Valuehave now a corresponding function that gets you inner valueTdirectly. Note those will panic if you provide the wrong type. GtkExpressionhelpers to make their usage nicer from Rust:let button = gtk::Button::new(); button.set_label("Label property"); let label_expression = button.property_expression("label");- A bunch of fixed issues, documentation improvements and new book chapters!
Other crates §
Other than the classic gtk-rs crates, we have also worked on ensuring the ones in https://gitlab.gnome.org/World/Rust and the broader ecosystem received an update:
- gstreamer-rs: release 0.18
- libadwaita-rs: release 0.1 following up the release of the first stable version 1.0
- sourceview5-rs: updated to 0.4, with subclassing support
- libshumate-rs: released an alpha for the GTK4 Map widgetery library
- sourceview4-rs/libhandy-rs/libdazzle-rs/gspell-rs/poppler-rs
- libflatpak-rs: first release of the libflatpak bindings
- Relm4: release 0.4, with many new features and improvements
Changes §
For the interested ones, here is the list of the merged pull requests:
- uri: re-export URI parsing utilities: part 1 and part 2
- Fix some typo and warnings
- glib: Fix invalid types let
from_variantpanic part 1 and part 2 - Fix some typo and warnings
- Remove unwanted warnings from the clone macro: part 1 and part 2
- Make stronger guarantees on
ToValue - Add cairo::Result type alias
- Replace unneeded doc comments with comments
- glib: Re-export main context acquire guard: part 1 and part 2
- cairo: silence self_named_constructor
- glib: ignore unref return value
- gio: Added basic
Initableimplementation - add pango_attr_font_desc_new
- Merge README files and crate documentation
Variant,VariantDict: Add more type lookup methods- Add possibility to inspect pango attribute types and downcast them
- Add function to consume raw data of
ImageSurface - glib/variant: Expose
g_variant_get_normal_form() - glib/variant: add fallible child-value getter
- variant: Use
into_owned() - variant: Add more APIs to access typed children
- variant: Add a
bytes()method. - variant: Add an API to iterate over
as - glib: add manual bindings for collation utils: part 1 and part 2
- variant: Expose
g\_variant\_byteswap() - gio: Fix behavior of
SettingsBindFlags::INVERT\_BOOLEAN - Remove the
linksannotations - glib: adapt to signed vs. unsigned libc::c_char to fix non-x86 builds
- Implement
to_glib_full()forVariantType - gio: Generating binding for
g-signalsignal ofDBusProxy - Ignore
find_with_equal_funcforListStoreuntil a suitable API is provided by the C library - gio: Don’t leak
transfer nonereturn values in ActionMap/ActionGrou… - gio: fix gtask example
- bind gtask run in thread
- cairo: Fix up reference counting in
Surface::map_to_image(): part 1 and part 2 - Add more default object implementations
- Regenerate with
impl Traitinstead of named types - Implement
FromGlibPtrBorrowforglib::Valueandglib::SendValue - docs: Fix the examples for variants
- glib: Merge variants of
wrapper!as much as possible - Use bool instead of
gbooleaningraphenefor FFI - Remove unused dependencies
- Add support for inline-allocated Boxed types and various graphene fixups
- glib: Don’t take internal value out of the
Valuestruct but instead ofinto_raw() - cairo: remove target_os = “ios”
- Remove iOS target from
quartz_surfacein Cairo - Include the LICENSE file in the published crates
- glib: Implement TimeSpan as a wrapper type with some convenience API
- Declare minimum supported Rust version in Cargo.toml
- Main context fixups
- glib: Provide default implementations for
IsSubclassablemethods - Allow to change visibility in
glib::wrappermacro - Add missing pango attrs and cleanup
glyph* - Various Pango fixes
- Make parameters to
gio::ListStore::splice()more generic - glib: impl
FromGlibContainerAsVecfor*const $ffi_nameand forBoxedInline - Minor cleanup as preparation for edition 2021
- pango: implement
DerefMutforAttribute - Upgrade to edition 2021
- glib: add simpler variants of
ParamSpec::new_override - Generate nullable paths
- glib: Add documentation to all undocumented
Object/ObjectExtand related functions - glib: Fix bug in main context channel test that caused it to deadlock
- object: fix documentation typo
- gio: Add various
gio::Filemissing functions - gio: add manual bindings for
GIOExtension - Change
Noneconstants as associated constants - glib: Assert that the memory allocated by GLib for the private instance data is aligned correctly
- pango: Add missing
Matrixmethods - glib: add a
Value::get_owned - gio: Make progress callback in
File::copy_asyncoptional - glib: Remove
glib::Stringbindings - Remove
Into<&str>trait bounds and directly use&str - glib: Add support for
BTreeMapinVariant - Add ObjectExt helpers
- glib: make error
message()public - glib: Lots of
Variant/VariantTypeimprovements - glib-macros: Add a
Varianttrait derive macro - Some more
VariantAPI additions - glib: Fix
Derefimpls forFixedSizeVariantArray - glib: Mark wrapper structs for
Shared/Object/Boxed/Typeas#\[repr(transparent)\] - macros: implement
FromGlibNone/Fullfor shared boxed types - glib: Implement
Send/Sync/PartialOrd/Ord/HashonGPtrSlice/GSlice - glib: Re-use paramspec names instead of creating a new NUL-terminated…
- glib: Simplify enum/flags class implementation
- pango: take a generic attr in
AttrListmethods - macros: make
ParentTypeoptional - Add wrapper type around
GList/GSListand various container cleanups/improvements - Remove
glib::Arraybindings and makeglib::ByteArraybindings safer (plus micro-optimization) - gio: don’t expose task module
- gdk-pixbuf: generate missing auto bindings
- Add gclosure macro
- Simplify
IsImplementableimplementations - Add
GStringBuilderand generate Variant type signatures with only safe code - glib: Add doc alias for
g_error_new()toglib::Error::new() - glib: Implement
Send/SyncforList/SListif the items implement the corresponding trait - Rename ffi crates on Cargo.toml instead of inside source code
- glib: Implement
FromValuefor references of object/shared/boxed types - glib: Fix missing indirection in previous commit and add tests
- glib: Use plain FFI functions instead of a GClosure for the property binding transform functions
- glib: Validate signal class handler return value and arguments when chaining up
- glib: Mark
g_get_user_special_dir()return value asnullable - Rename various constructors for consistency
- glib: Fix
FromValueimplementations for&Boxed,&Sharedand&Object - glib: Add API for non-destructive iteration over a
List/SList - glib: Add new trait for allowing to unwrap the return value of
Closure::emit()directly instead of working withglib::Value - macros: Update macro syntax for
enum,flags,boxedandvariant - glib: return a
ParamSpecfor override methods - glib: add missing doc-aliases to
Type - Generate missing const doc aliases
- glib: make
spawn\*()return theSourceId - glib/gir: ignore
g_clear_error - glib: Fix accumulator trampoline in signals defined from Rust
- glib: specify it’s a
Variantstruct and not a derive macro - graphene: add getters/setters for
Size/Point/Point3D - glib: add
ObjectSubclassIsExttrait withimpl_method - pango: allow for the modifying
GlyphInfoandGlyphGeometry - glib: Implement
ValueTypeOptionalfor shared/boxed/object types inglib::wrapper - glib: add
AnyGObject - gio: impl
std::iter::Extendforgio::ListStore - gio: Implement
ExtendonListStoreforAsRef<Object> - glib: Implement
ToValueonsignal::Inhibit - gio: add
ListModel::snapshotand implementIntoIteratorforListModel - glib-macros: Use absolute paths in proc macros
- glib: Add a helper trait for getting an object from a wrapper or subclass
- Use impl_() in tests/examples instead of from_instance()
- glib: Rename
impl_toimp - gio: mark
content_type_guessparameter as filename - glib: Add Object::NONE const
- glib: ignore various unneeded functions
- glib: manually implement
ParamSpec::is_valid_name - gio: Make
Taskbinding sound and support generics in thewrapper!macro - glib: Reduce allocations in
g_logbindings - gio: require
Sendalso for the source object - gio: mark creating
Taskas unsafe and add public documentation - gio: generate
SimpleProxyResolver - gio: generate missing errors
- glib: Correctly validate signal argument types in
emit_with_details()variants - glib: Don’t query signals twice when connecting
- glib: Handle zero
Quarks correctly - glib: implement
From<Infallible>for error types - cairo: Implement
Send+SyncforImageSurfaceDataandImageSurfaceDataOwned - cairo: Allow converting
ImageSurfaceDataOwnedback into anImageSurface
- Bump minimum required version to 1.53.0
- gtk: Acquire and leak main context in
gtk::init() - gtk: Make
Clipboard::request_imagepixbuf anOption - gdk: Don’t require
&mut selfforEventgetters - gtk: Add test for
gtk::init()and portTEST_THREAD_WORKERfrom gtk4 - gtk: Make
ButtonImpldepend onBinImpl - gtk: Nullable callback param
- gtk: Add more default object implementations
- Add support for inline-allocated Boxed types
- gdk: Fix
RGBA::parse()signature and implementFromStr - Mark simple structs as
BoxedInline - Simplify various
IsSubclassableimplementations - examples: fix pango attributes per gtk-rs-core changes
- Update to 2021 Rust Edition
- gtk: Add missing methods on
TreeViewColumn - gtk: Rename
Window::focusintoWindows::focused_widget - gdk: remove unsafe marker for
Atom::value - gtk: panic if gtk wasn’t init at
class_init - gdk: add helpers for checking which display is being used
- examples: Don’t silently ignore errors when property bindings can’t be established
- gdk: bind
WaylandWindowmanually - gtk: implement subclassing for
Scrolledwindow - Replace
Noneconstants as associated constants - Update per
ObjectExtchanges - examples: update per pango::AttrList simplification
- gdkwayland: Add missing wayland types and create new gdkwayland crate
- gdk: add setters to
RGBA - gtk: Fix usage of
pthread_main_np()return value - gtk3-macros: make the doc example building
- Simplify imports in doc example
- Generate missing doc aliases for consts
- gtk: manually implement
gtk_print_operation_get_error - gtk/builder: manually implement several methods (custom return codes)
- Rename
impl_toimp - gtk: manually implement
Container::(get|set)_property
- book: Fix explanation in gobject memory management
- book: Improve
todo_applisting - Fixed small typo in Virtual methods example README
- book: Use weak reference in
gobject_memory_management - book: Rename listing app-id to org.gtk-rs
- book: Finish up remainder of app-id
- book: Mention that expressions only go in one direction
- book: Add “Actions & Menus” chapter
- book: Add headings to existing chapters
- book: Fix action name in book listing
- gtk: Add more manual default implementations
- book: Add
Varianttogobject_valueschapter - gdk: expose
EventKind - gsk: rename
Renderertrait - gdk: fix
ToplevelSize::bounds - Add support for inline-allocated
Boxedtypes - book: Fix meson build instruction
- book: Fix shortcut in todo listing
- gtk: Fixed a typo in the README.md
- gtk/gsk: remove C convenience functions
- book: Add chapter about todo_app_2
- gtk: make
*_set_sort_funcusegtk::Ordering - examples: Add an example for a widget that scales its child
- wayland: Update to wayland-client 0.29
- simplify
IsSubclassableimplementations - gtk: don’t deref a null ptr on
EntryBuffer - gtk: take the closure on last param for
ClosureExpression - gtk: manually implement
FileChooser::add_choice - gtk-macros:
CompositeTemplate: support setting internal-child to true - book: Fix videos
- gtk: drop unneeded builders
- gtk: manually implement
PrintSettings::set_page_ranges - gtk: ignore
StringList::take - gdk: drop automatic
device_tool getterforDevice - gdk: bind
Event::get_device_tool - book: Use
splicein lists listings - gtk: manually implement
Shortcut::with_arguments - gtk: Implement missing
Eventfunctions - book/examples: Use dash instead of underline for properties
- gtk: manually implement more functions
- gtk: manually implement
CellLayout::set_attributes - gtk: manually implement
accelerator_parse_with_keycode - gtk: free memory on
Dropforset_qdatauses - gdk: add helpers for checking which display is being used
- book: Add docs for
BuilderandMenu - book: Mention string list in lists chapter
- gsk: drop manual
FromGlibContainerAsVecimplementation forColorStop - book: Simplify
spliceusage - gtk: Implement
FromIterator/ExtendforStringList - gdk-x11: generate missing functions
- book: Fix todo_app_2 chapter
- Replace
Noneconstants as associated constants - book: Add cross-platform installation instructions
- gdk: remove
MemoryFormat::NFormats - book: Fix book link
- Improves variants for getters that returns
glib::Value - gtk: Add
SymbolicPaintable - gtk: Use
impl IntoIterator<Item = Expression>inClosureExpressionparams - gtk: Allow slices on
ClosureExpression’s params - gtk: Add
PropExprandChainExpras convenience traits to chainGtkExpressions - Remove unnecessary clone
- book: Use the new expressions API
- drop
instance_initperIsImplementablechanges - gdk: Add setters to
RGBAand missing builder methods - gtk: Reduce number of allocations in
accelerator_parse_with_keycode - gtk: backport macos fix for the main thread
- gsk: drop empty functions module
- docs: add very brief info for each subclass module
- gsk: fix
Renderertrait name - gtk: manually implement
gtk_print_operation_get_error - gdkx11: manually implement
xeventsignal - gtk: manually implement callback getters
- gtk: re-implement missing
TextBufferfunctions - book: Add chapter about CSS
- book: Move icon section from css to actions
- gdkx11: don’t mark safe functions as unsafe
- gdkx11: fixes
- gdkx11: Allow chaining expressions with
Closureobjects - gtk: Add method to create a “this” expression from
GObjecttypes - book: Fix code snippets and some formatting in
gobject_memory_management - book: Extend action chapter to mention
PropertyAction - examples: Update to glium 0.31
- gdk: add associative constants for keys
- book: Use
imp()everywhere instead offrom_instance(),impl_() - book: Fix broken
set_statelink - gtk: string list: implement
Default - gdk: trust nullability annotations
- gtk: Rework AccessibleExtManual
- gdk/gtk/gsk: manually implement
Debugfor shared types - gtk: use
ToVariantforActionable::set_action_target - gtk: provide gdk backend information to dependencies
- gdk: add sanity checks for
Texture::download - gdk: Implement
Send+SyncforTexture - gtk: Automatically generate
ParamSpecExpression - examples: Add a custom model example
- book: Use the predefined action “window.close”
- book: Fix error message for
activate_action - examples: Add composite template callback macro
- examples: Add example of a Rotation Bin widget
All this was possible thanks to the gtk-rs/gir project as well:
- Fix doc condition for warning
- docs: disable language warning for various languages
- docs: don’t generate for properties with getter/setter
- book: Replace
shellwithconsolecodeblocks - Remove the
linksannotations - Do not generate
Defaultimplementation forOption<> - codegen/flags: Put doc attribute on struct instead of macro calls
- Update system-deps version in generated crates
- Config for nullable callback param
- Fix parameter setting by applying it to the
rust_parametersfield as well - Add default impls for all objects
- Use
impl Traitinstead of generic type names with trait bound - Update to system-deps 5
- build: Emit rerun-if-changed for branch file on
ref:HEAD - Handle nullability configuration for async function return values
- Always output git short revisions with 12 characters
- Remove type version heuristics
- Handle objects correctly where a supertype has a newer version than the type itself
- Special case C
_Boolby treating it like a Rust bool instead of gboolean - Implement support for inline allocated
Boxedtypes - book: Fix references to the
girs_dirconfig option - book: Remove suggestions to add
extern crateimports - book: Add a section on fixing missing macros
- book: Fix sys crate import to use the ‘ffi’ convention.
- Add
use glib::translate::*for generating the equal special function - Switch to 2021 edition
- analysis: mark
to_strfunctions as renamed - codegen: generate deprecated cfg attribute for Default trait
- Fix support for nullable paths /
OsStrings - codegen: generate
NONEconstants as associated constants - codegen: simplify properties getters/setters
- codegen: fix a logic issue in
version_condition_no_doc - codegen: don’t assume child props are gtk only
- codegen: don’t re-export builder types on crate root
- codegen: generate builders inside a builders module
- Correctly generate opaque types
- codegen: don’t generate a functions mod if it’s empty
- codegen: don’t generate empty impl blocks
- codegen: stop renaming crates inside sys generated code
- Remove “auto” folder when regenarating non-sys crate
- Update to system-deps 6
- Move auto folder removal into gir directly
- Only use
remove_dir_allif there is a folder to remove - Mark gi-docgen as optional
- gir: fix per
emit_by_namechange - Add
#\[must\_use\]to the autogenerated builder types - codegen/function: assert sane GError behavior
- docs: work around glib::Variant case
- docs: allow documenting global functions in traits
- sys: stop importing
time_t - docs: allow to set
doc_struct_namefor global functions - codegen: trim extra
_asyncin future variants - writer: check return code as
gboolean - docs: avoid generating docs for unneeded properties getters/setters
- parser: ignore private records
- support fundamental types
- analysis: don’t take a slice of copy types by ref
- analysis: fix logic code in slice of copy types
- Allow tweaking visibility
- codegen/special_functions: Add missing space between
pubandfn - Generate
#[must_use]where needed - codegen: go through the safe bindings for child properties
Thanks to all of our contributors for their (awesome!) work on this release:
- @A6GibKm
- @AaronErhardt
- @alatiera
- @alcarney
- @arcnmx
- @ArekPiekarz
- @atheriel
- @bbb651
- @bilelmoussaoui
- @bvinc
- @cgwalters
- @decathorpe
- @elmarco
- @euclio
- @federicomenaquintero
- @fengalin
- @GuillaumeGomez
- @Gymxo
- @hbina
- @Hofer-Julian
- @ids1024
- @jackpot51
- @jf2048
- @keltrycroft
- @lehmanju
- @lucab
- @MarijnS95
- @MGlolenstine
- @nagisa
- @pbor
- @philn
- @piegamesde
- @ranfdev
- @RealKC
- @remilauzier
- @sdroege
- @SeaDve
- @sophie-h
- @tronta
- @Ungedummt
- @vhdirk
- @xanathar