@ciao-lang/ts-ciao-interface
Version:
Simple Ciao interface for node.
21 lines • 6.16 kB
HTML
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#273f79"/><link rel="stylesheet" href="lpdoc.css" type="text/css"/><script type="text/javascript" src="lpdoc.js"></script><title>Bundles and workspaces — The Ciao System v1.22</title></head><body><div class="lpdoc-page fixleftbar"><a href="#" id="sidebar-toggle-button" class="lpdoc-navbutton"><span id="sidebar-button-arrow">☰</span></a><div id="sidebar" class="lpdoc-sidebar"><div style="height: 40px; margin-left: auto; margin-right: auto"><img src="ciao-logo_autofig.png" width=auto height=100%></div><div class="lpdoc-nav"><span class="lpdoc-on-right"><a class="lpdoc-navbutton" href="BasicLang.html">↑</a><a class="lpdoc-navbutton" href="modules.html">←</a><a class="lpdoc-navbutton" href="packages.html">→</a><a class="lpdoc-navbutton" href="ciaosearch.html">🔍</a></span><span><a href="ciaofulltoc.html">TOC</a></span></div><hr></hr><ul class="lpdoc-itemize-sectpath"><li><a href="ciao.html">The Ciao System</a> »<br/> </li><li><a href="BasicLang.html">PART II - The Ciao basic language</a> »<br/> </li><li><a href=""><strong>Bundles and workspaces</strong></a></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Bundles">Bundles</a></li><li><a href="#Workspaces">Workspaces</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Bundles and workspaces</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#bundles"></a>
<strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Jose F. Morales" href="ciaosearch.html#Jose F. Morales">Jose F. Morales</a>, <a class="lpdoc-idx-anchor" id="The Ciao Development Team" href="ciaosearch.html#The Ciao Development Team">The Ciao Development Team</a>.<p>
In the same way that modules can be seen as collections of predicates, Ciao <a class="lpdoc-idx-anchor" id="0" href="ciaosearch.html#bundle">bundle</a>s define collections of modules. The visibility of bundles is determined by <a class="lpdoc-idx-anchor" id="1" href="ciaosearch.html#workspace">workspace</a>s. A workspace is a directory that may contain bundles, each of them in a separate directory with the same name declared on its manifest. See <a href="builder_doc.html">Bundle management</a> for details about creating and managing bundles.<p><div id="Bundles"><h2>Bundles</h2> <p>Bundles are usually organized as follows:<p><pre class="lpdoc-codeblock">Manifest/ Metadata
cmds/ Modules implementing main/{0,1} (for CLI tools)
{src,lib,...}/ Source code (modules, packages, included files, etc.)
</pre> <p>Bundles include some <em>metadata</em> describing versions, dependencies, (relative) <a class="lpdoc-idx-anchor" id="2" href="ciaosearch.html#path alias">path alias</a>es, entry points for manuals and commands, additional pre-build, build, and installation rules, etc. This metadata is separated from the actual code into a single <tt>Manifest.pl</tt> file at the root of the bundle, or inside the <tt>Manifest/</tt> directory. A typical <tt>Manifest.pl</tt> file has the following form:<p><pre class="lpdoc-codeblock">:- bundle(<Name>).
version(<Version>).
depends([Dep1, ..., DepN]).
alias_paths([
<Alias1> = <RelPath1>,
...
<AliasN> = <RelPathN>
]).
lib(<RelPath>).
cmd(<CmdName>, [main=<RelPathMainMod>, ...]).
manual(<ManName>, [main=<RelPathDocCfg>, ...]).
</pre> <p>where: <ul> <li><tt>version/1</tt> specifies the bundle version. <li><tt>depends/1</tt> declares dependencies with other bundles. <li><tt>alias_paths/1</tt> declares <a class="lpdoc-idx-anchor" id="3" href="ciaosearch.html#path alias">path alias</a>es. <li>(multiple) <tt>lib/1</tt> declares directories containing compilable modules. <li>(multiple) <tt>cmd/2</tt> declares entry points for commands (executables). <li>(multiple) <tt>manual/2</tt> declares entry points for manuals. </ul> <p><strong>Versioning:</strong> Versions are specified as atoms (see <a class="lpdoc-idx-anchor" id="4" href="version_strings.html"><tt>version_strings</tt></a>) of the form <tt>'X.Y.Z'</tt>, where <tt>X</tt>, <tt>Y</tt>, and <tt>Z</tt> are non-negative integers, and an optional <tt>-Prerelease</tt> suffix. Omitted version numbers are assumed to be 0. Dependencies may include version constraints, e.g., <tt>core-[version>='1.15']</tt> (see <a class="lpdoc-idx-anchor" id="5" href="version_strings.html#version_compare/3"><tt>version_compare/3</tt></a> for the definition of the comparison).<p><div class="lpdoc-note"> Currently the system supports only one version of a bundle at the same time. If two versions need to coexist at the same time, the bundles must be renamed (e.g. <tt>bndv1</tt>, <tt>bndv2</tt>). </div> <p><div class="lpdoc-note"> <strong>Additional build rules:</strong> Although the Ciao compiler is incremental and performs the compilation on demand, some components may require configuration steps and pre-building. For example, this is often the case for bindings to foreign third-party libraries. Currently these rules must be written in a <em>lower-level</em> module <tt>Manifest/<bundle>.hooks.pl</tt>. </div> <p></div><div id="Workspaces"><h2>Workspaces</h2> <p>A workspace directory looks like: <pre class="lpdoc-codeblock">build/ (Generated automatically)
<bundle1>/
...
<bundleN>/
</pre> <p>Each workspace directory contains a <tt>build/</tt> directory with intermediate and final results of compilation (<tt>build/bin/</tt>) and documentation generation (<tt>build/doc/</tt>).<p><strong>Bundle catalogs:</strong> workspaces may contain directories holding bundles. Such directories must be marked with an empty <tt>BUNDLE_CATALOG</tt> file. In that case, bundles are visible only if they are marked with an empty <tt>ACTIVE</tt> file. This mecanism is useful to implement catalogs of bundles. </div><br/></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>