From nobody Mon Feb 9 17:24:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1646668862; cv=none; d=zohomail.com; s=zohoarc; b=T25VG7K5nUB0p5y8y2z+7zrnf1VlLd8OCeV5kNjwBtPeHWAUr+HRDw5FiZh3OxuPotISULfLwIWjCduxxbrzWacrAumxi+9QEvuOhKWHKnwEX5IJUGodJyfm42Sv8DTlx5IDxgS1hJcMt11wrs5cwSPfBA0sUTFoUT9NDf/KLBI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646668862; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5gnSHRQvJeUaQICy2Us+YIdeGQqMVRNmOyf34b1WRZU=; b=kNNsHLj5mWaiqAilUGUlqmJYxGfnvBJkQYu5fCCoNfeLoGX4uv6RmTDeUa/XpmR5KjOX/JxOJWyHSkckSOlpEfQ0fWrC7ETKgcpnU+FFMOvgJ0/0c1+7hzWOKi31q/jHYrtDzTcTvuYa+rjQ+dACCPvxs+Qlq/vap6xm40jcCsA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1646668862767211.39504542685768; Mon, 7 Mar 2022 08:01:02 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-246-B85R1cX_M-60AthkMarvAA-1; Mon, 07 Mar 2022 11:00:23 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C951106656E; Mon, 7 Mar 2022 16:00:04 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3241040CFD06; Mon, 7 Mar 2022 16:00:04 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B99CF1931BEA; Mon, 7 Mar 2022 16:00:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 280BD19305AE for ; Mon, 7 Mar 2022 16:00:03 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B3B3082764; Mon, 7 Mar 2022 16:00:02 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 11DAF82768 for ; Mon, 7 Mar 2022 16:00:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646668862; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5gnSHRQvJeUaQICy2Us+YIdeGQqMVRNmOyf34b1WRZU=; b=gffMMGSGl4O4etAYfVnPHhTBVcleo0SeUWHSKFG85RfeB95u6yQjH7z4WBG9HSXXnqRWO6 3rFY7C8xLQA29WAeX/ZPsk/yk0dldj/RCKM/VmzZysBB/1UoM28+MhRZsnOqcPJaf9/q77 CjX1NwXm16+qyVGqrqRmD0exPJEGYEQ= X-MC-Unique: B85R1cX_M-60AthkMarvAA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 05/17] docs: Convert 'strategy' to rST Date: Mon, 7 Mar 2022 16:59:25 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1646668889863100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- docs/meson.build | 2 +- docs/strategy.html.in | 133 ------------------------------------------ docs/strategy.rst | 105 +++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+), 134 deletions(-) delete mode 100644 docs/strategy.html.in create mode 100644 docs/strategy.rst diff --git a/docs/meson.build b/docs/meson.build index afed104014..a719c268f6 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -66,7 +66,6 @@ docs_html_in_files =3D [ 'remote', 'securityprocess', 'storage', - 'strategy', 'support', 'testapi', 'testsuites', @@ -110,6 +109,7 @@ docs_rst_files =3D [ 'pci-addresses', 'platforms', 'programming-languages', + 'strategy', 'styleguide', 'submitting-patches', ] diff --git a/docs/strategy.html.in b/docs/strategy.html.in deleted file mode 100644 index 70b706b6de..0000000000 --- a/docs/strategy.html.in +++ /dev/null @@ -1,133 +0,0 @@ - - - - -

Project Strategy

- -

- This document attempts to outline the libvirt project strategy for - the near future. Think of this as a high level vision or to-do list - setting the direction for the project and its developers to take. -

- -

Language consolidation

- -

- At time of writing libvirt uses the following languages: -

- -
-
C
-
The core libvirt library, daemons, and helper tools are all writ= ten - in the C language.
-
Python
-
Various supporting build/test scripts are written in Python, with - compatibility for Python 3.
-
Perl
-
Various supporting build/test scripts are written in Perl. It is - also used for many syntax-check inline rules
-
Shell
-
Shell is used for some simple build/test scripts. At runtime - libvirt avoids shell except when using SSH tunnels to a remote - host
-
XSLT
-
The website uses XSLT for its templating system. The API - documentation is also autogenerated from an XML description - using XSLT
-
HTML
-
The website documentation is all written in plain HTML. Some HTML - is also auto-generated for API documentation
-
Meson
-
The core build system uses the new Meson build system
-
make
-
The syntax-check uses make recipes
-
awk/sed
-
A number of the syntax-check inline rules involve use of awk/sed - scripts
-
POD
-
The command line manual pages are typically written in Perl's POD - format, and converted to troff
-
- -

- The wide range of languages used present a knowledge burden for - developers involved in libvirt, especially when there are multiple - languages all used in the same problem spaces. This is most notable - in the build system which uses a combination of Meson, shell, awk, - sed, Perl and Python, with debugging requiring - understanding of the interactions between many languages. The - popularity of Perl has declined, while Python has become - more popular. This directly influences the amount and quality of - contributions that can be expected for programs written in the - respective languages. -

-

- The C language has served libvirt well over the years, but its age s= hows - giving rise to limitations which negatively impact the project in te= rms - of code quality, reliability, and efficiency of development. Most no= tably - its lack of memory safety means that many code bugs become trivially - exploitable security flaws or denial of service. The lack of a high - level portable runtime results in a lot of effort being spent to - ensure cross platform portability. The modern languages Rust and Go - provide viable options for low level systems programming, in a way t= hat - is not practical with other common languages such as Python and Java. - There is thus a desire to make use of either Rust or Go, or a combin= ation - of both, to incrementally replace existing use of C, and also for - greenfield development. -

-

- With this in mind the libvirt project has set a vision for language - usage in the future: -

- -
-
C
-
Large parts of the core libvirt library, daemons, and helper too= ls - will continue to make use in the C language. Integration of other - languages will be an incremental, targeted process where they can - bring the greatest benefit.
-
Rust / Go
-
Parts of the core libvirt library, daemons and helper tools are = to - leverage Rust or Go or both to replace C.
-
Meson
-
The core build system is to be written in Meson.
-
Python
-
Various supporting build/test scripts are written in Python 3 - compatible mode only.
-
reStructuredText
-
The website and command man pages are to be written in RST, using - Sphinx as the engine to convert to end user formats like HTML, tro= ff, - etc
-
- -

- Some notable points from the above. Whether the core library / daemo= ns - will use Rust or Go internally is still to be decided based on more - detailed evaluation to identify the best fit. The need to link and e= mbed - this functionality in other processes has complex interactions both = at a - technical and non-technical level. For standalone helper tools, eith= er - language is viable, but there are fewer concerns around interactions= with - other in-process code from 3rd parties. Thus a different decision ma= y be - made for daemons/libraries vs tools. Any rewrite proposed for existi= ng - functionality will have to weigh up the benefits of the new code, - against the risk of introducing regressions with respect to the prev= ious - code. -

- -

- Using the RST format for documentation allows for the use of XSLT to= be - eliminated from the build process. RST and the Sphinx toolkit are wi= dely - used, as seen by the huge repository of content on - Read The Docs. - The ability to embed raw HTML in the RST docs will greatly facilitat= e its - adoption, avoiding the need for a big bang conversion of existing co= ntent. - Given the desire to eliminate Perl usage, replacing the use of POD - documentation for manual pages is an obvious followup task. RST is t= he - obvious choice to achieve alignment with the website, allowing the m= an - pages to be easily published online with other docs. It is further - anticipated that the current API docs generator which uses XSLT to - convert the XML API description would be converted to something which - generates RST using Python instead of XSLT. -

- - diff --git a/docs/strategy.rst b/docs/strategy.rst new file mode 100644 index 0000000000..093764b645 --- /dev/null +++ b/docs/strategy.rst @@ -0,0 +1,105 @@ +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +Project Strategy +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +This document attempts to outline the libvirt project strategy for the near +future. Think of this as a high level vision or to-do list setting the dir= ection +for the project and its developers to take. + +Language consolidation +---------------------- + +At time of writing libvirt uses the following languages: + +C + The core libvirt library, daemons, and helper tools are all written in = the C + language. +Python + Various supporting build/test scripts are written in Python, with + compatibility for Python 3. +Perl + Various supporting build/test scripts are written in Perl. It is also u= sed + for many syntax-check inline rules +Shell + Shell is used for some simple build/test scripts. At runtime libvirt av= oids + shell except when using SSH tunnels to a remote host +XSLT + The website uses XSLT for its templating system. The API documentation = is + also autogenerated from an XML description using XSLT +HTML + The website documentation is all written in plain HTML. Some HTML is al= so + auto-generated for API documentation +Meson + The core build system uses the new Meson build system +make + The syntax-check uses make recipes +awk/sed + A number of the syntax-check inline rules involve use of awk/sed scripts +POD + The command line manual pages are typically written in Perl's POD forma= t, and + converted to troff + +The wide range of languages used present a knowledge burden for developers +involved in libvirt, especially when there are multiple languages all used= in +the same problem spaces. This is most notable in the build system which us= es a +combination of Meson, shell, awk, sed, Perl and Python, with debugging req= uiring +understanding of the interactions between many languages. The popularity o= f Perl +has declined, while Python has become more popular. This directly influenc= es the +amount and quality of contributions that can be expected for programs writ= ten in +the respective languages. + +The C language has served libvirt well over the years, but its age shows g= iving +rise to limitations which negatively impact the project in terms of code +quality, reliability, and efficiency of development. Most notably its lack= of +memory safety means that many code bugs become trivially exploitable secur= ity +flaws or denial of service. The lack of a high level portable runtime resu= lts in +a lot of effort being spent to ensure cross platform portability. The mode= rn +languages Rust and Go provide viable options for low level systems program= ming, +in a way that is not practical with other common languages such as Python = and +Java. There is thus a desire to make use of either Rust or Go, or a combin= ation +of both, to incrementally replace existing use of C, and also for greenfie= ld +development. + +With this in mind the libvirt project has set a vision for language usage = in the +future: + +C + Large parts of the core libvirt library, daemons, and helper tools will + continue to make use in the C language. Integration of other languages = will + be an incremental, targeted process where they can bring the greatest + benefit. +Rust / Go + Parts of the core libvirt library, daemons and helper tools are to leve= rage + Rust or Go or both to replace C. +Meson + The core build system is to be written in Meson. +Python + Various supporting build/test scripts are written in Python 3 compatibl= e mode + only. +reStructuredText + The website and command man pages are to be written in RST, using Sphin= x as + the engine to convert to end user formats like HTML, troff, etc + +Some notable points from the above. Whether the core library / daemons wil= l use +Rust or Go internally is still to be decided based on more detailed evalua= tion +to identify the best fit. The need to link and embed this functionality in= other +processes has complex interactions both at a technical and non-technical l= evel. +For standalone helper tools, either language is viable, but there are fewer +concerns around interactions with other in-process code from 3rd parties. = Thus a +different decision may be made for daemons/libraries vs tools. Any rewrite +proposed for existing functionality will have to weigh up the benefits of = the +new code, against the risk of introducing regressions with respect to the +previous code. + +Using the RST format for documentation allows for the use of XSLT to be +eliminated from the build process. RST and the Sphinx toolkit are widely u= sed, +as seen by the huge repository of content on `Read The +Docs `__. The ability to embed raw HTML in the R= ST +docs will greatly facilitate its adoption, avoiding the need for a big bang +conversion of existing content. Given the desire to eliminate Perl usage, +replacing the use of POD documentation for manual pages is an obvious foll= owup +task. RST is the obvious choice to achieve alignment with the website, all= owing +the man pages to be easily published online with other docs. It is further +anticipated that the current API docs generator which uses XSLT to convert= the +XML API description would be converted to something which generates RST us= ing +Python instead of XSLT. --=20 2.35.1