Files
odfstudio/rust_uno/Module_rust_uno.mk
Mohamed Ali 3d75577640 Rust Bindings: Add extension-based UNO integration with FFI architecture
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>
2025-09-11 21:39:08 +02:00

23 lines
642 B
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Module_Module,rust_uno))
ifeq ($(ENABLE_RUST_UNO),TRUE)
$(eval $(call gb_Module_add_targets,rust_uno, \
CustomTarget_cargo \
CustomTarget_rustmaker \
Extension_rust_uno-example \
Library_rust_uno-cpp \
Library_rust_uno-example \
))
endif
# vim: set noet sw=4 ts=4: