Implements LibreOffice extension providing Rust language binding for UNO API
using opaque pointer FFI architecture with type-safe handles.
Extension Features:
- User-controlled execution via "Rust UNO → Example" menu
- Optional installation/removal through LibreOffice extension system
- Complete Writer document manipulation example
Technical Implementation:
- Generated Rust wrappers for all UNO types via rustmaker
- C++ extern "C" bridges with proper UNO integration
- Type-safe opaque handles (XTextDocumentHandle, etc.)
- Extension architecture following LibreOffice standards
- Menu integration via Addons.xcu and ProtocolHandler.xcu
Architecture:
- Rust RAII Wrappers ↔ C++ extern "C" Bridges ↔ LibreOffice UNO
- Extension packaging with rust_uno-example.oxt
- Integrated build system with CustomTarget and Library makefiles
Build Commands:
./configure --enable-rust-uno
Extension Structure:
- rust_uno/example/ - Extension source files
- workdir/Extension/rust_uno-example.oxt - Packaged extension
- Automatic installation during LibreOffice build
Runtime Validation:
Successfully demonstrates complete UNO integration:
- Desktop service creation and XComponentLoader interface
- Writer document loading via loadComponentFromURL
- Text manipulation through XTextDocument and XSimpleText
- Proper interface querying and method invocation
GSoC 2025: Rust UNO Language Binding
Change-Id: I5cecb8ebd05aab396f444488c0ee2a9d483a9f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186425
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>