Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/manual.org
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,13 @@ See [[https://bazel.build/external/overview#bzlmod][the Bzlmod documentation]]
for background information. Then you can use the ~elisp_library~,
~elisp_cc_module~, ~elisp_binary~, and ~elisp_test~ rules. See the rule
documentation below and the examples in the ~examples~ directory for details.
Note that the C++ code used by ~rules_elisp~ requires at least C++17, but Bazel
still compiles with C++11 by default. See
[[https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#how-to-i-set-the-c-dialect-used-to-build-abseil][the
Abseil FAQ]] how to correctly change the C++ standard for your project.

#+INCLUDE: elisp/elisp_library.org

#+INCLUDE: elisp/elisp_cc_module.org

#+INCLUDE: elisp/elisp_binary.org

#+INCLUDE: elisp/elisp_test.org

* Load path management
Expand Down Expand Up @@ -658,6 +657,7 @@ toolchains of type ~@rules_elisp//elisp:toolchain_type~; see
are created using the `elisp_toolchain` rule.

#+INCLUDE: elisp/toolchains/elisp_toolchain.org

#+INCLUDE: elisp/toolchains/elisp_emacs_binary.org

* Indices
Expand Down
8 changes: 4 additions & 4 deletions elisp/elisp_library.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2025 Google LLC
# Copyright 2020-2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -78,8 +78,8 @@ To add a load path entry for the current package, specify `.` here.""",
},
doc = """Byte-compiles Emacs Lisp source files and makes the compiled output
available to dependencies. All sources are byte-compiled.
`elisp_library`, `elisp_binary`, and `elisp_test` rules depending on this binary
can then use `load` or `require` to load them.
`elisp_library`, `elisp_binary`, and `elisp_test` rules depending on this
library can then use `load` or `require` to load them.

By default, libraries need to be loaded using a filename relative to the
repository root, i.e., <var>package</var>/<var>file</var>. If you want to add
Expand All @@ -92,7 +92,7 @@ ensure that files get only loaded in their byte-compiled form.

The source files in `srcs` can also list shared objects. The rule treats them
as Emacs modules and doesn’t try to byte-compile them. You can use
e.g. `cc_binary` with `linkshared = True` to create shared objects.""",
e.g. `cc_binary` with `linkshared = True` to create shared objects.""",
provides = [EmacsLispInfo],
toolchains = [Label("//elisp:toolchain_type")],
implementation = _elisp_library_impl,
Expand Down
2 changes: 1 addition & 1 deletion elisp/elisp_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ you don’t control.""",
"skip_tags": attr.string_list(
doc = """List of test tags to skip. This attribute contains a list
of tag names; if a test is tagged with one of the tags from this list, it is
skipped. This can be useful to e.g. skip tests that are flaky or only work in
skipped. This can be useful to e.g. skip tests that are flaky or only work in
interactive mode. Use the `:tags` keyword argument to `ert-deftest` to tag
tests.""",
),
Expand Down
16 changes: 8 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ <h2 class="chapter" id="Usage-1"><span>3 Usage<a class="copiable-link" href="#Us
for background information. Then you can use the <code class="code">elisp_library</code>,
<code class="code">elisp_cc_module</code>, <code class="code">elisp_binary</code>, and <code class="code">elisp_test</code> rules. See the rule
documentation below and the examples in the <code class="code">examples</code> directory for details.
Note that the C++ code used by <code class="code">rules_elisp</code> requires at least C++17, but Bazel
still compiles with C++11 by default. See
<a class="uref" href="https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#how-to-i-set-the-c-dialect-used-to-build-abseil">the
Abseil FAQ</a> how to correctly change the C++ standard for your project.
</p>
<dl class="first-deffn def-block">
<dt class="deffn def-line" id="index-elisp_005flibrary"><span class="category-def">Rule: </span><span><strong class="def-name">elisp_library</strong> <var class="def-var-arguments">(name, [fatal_warnings], srcs, [outs], [data], [load_path], [deps])</var><a class="copiable-link" href="#index-elisp_005flibrary"> &para;</a></span></dt>
Expand All @@ -139,8 +135,8 @@ <h2 class="chapter" id="Usage-1"><span>3 Usage<a class="copiable-link" href="#Us

<p>Byte-compiles Emacs Lisp source files and makes the compiled output
available to dependencies. All sources are byte-compiled.
<code class="code">elisp_library</code>, <code class="code">elisp_binary</code>, and <code class="code">elisp_test</code> rules depending on this binary
can then use <code class="code">load</code> or <code class="code">require</code> to load them.
<code class="code">elisp_library</code>, <code class="code">elisp_binary</code>, and <code class="code">elisp_test</code> rules depending on this
library can then use <code class="code">load</code> or <code class="code">require</code> to load them.
</p>
<p>By default, libraries need to be loaded using a filename relative to the
repository root, i.e., <var class="var">package</var>/​<var class="var">file</var>. If you want to add
Expand All @@ -153,7 +149,7 @@ <h2 class="chapter" id="Usage-1"><span>3 Usage<a class="copiable-link" href="#Us
</p>
<p>The source files in <code class="code">srcs</code> can also list shared objects. The rule treats them
as Emacs modules and doesn’t try to byte-compile them. You can use
e.g. <code class="code">cc_binary</code> with <code class="code">linkshared = True</code> to create shared objects.
e.g. <code class="code">cc_binary</code> with <code class="code">linkshared = True</code> to create shared objects.
</p>

<p>The <code class="code">elisp_library</code> rule supports the following attributes:
Expand Down Expand Up @@ -190,6 +186,7 @@ <h2 class="chapter" id="Usage-1"><span>3 Usage<a class="copiable-link" href="#Us
</p></dd>
</dl>
</dd></dl>

<dl class="first-deffn def-block">
<dt class="deffn def-line" id="index-elisp_005fcc_005fmodule"><span class="category-def">Rule: </span><span><strong class="def-name">elisp_cc_module</strong> <var class="def-var-arguments">(name, [srcs], [deps], [data], [copts], [linkopts], [local_defines])</var><a class="copiable-link" href="#index-elisp_005fcc_005fmodule"> &para;</a></span></dt>
<dd>
Expand Down Expand Up @@ -262,6 +259,7 @@ <h2 class="chapter" id="Usage-1"><span>3 Usage<a class="copiable-link" href="#Us
</p></dd>
</dl>
</dd></dl>

<dl class="first-deffn def-block">
<dt class="deffn def-line" id="index-elisp_005fbinary"><span class="category-def">Rule: </span><span><strong class="def-name">elisp_binary</strong> <var class="def-var-arguments">(name, [fatal_warnings], src, [data], [deps], [interactive], [input_args], [output_args])</var><a class="copiable-link" href="#index-elisp_005fbinary"> &para;</a></span></dt>
<dd>
Expand Down Expand Up @@ -323,6 +321,7 @@ <h2 class="chapter" id="Usage-1"><span>3 Usage<a class="copiable-link" href="#Us
</p></dd>
</dl>
</dd></dl>

<dl class="first-deffn def-block">
<dt class="deffn def-line" id="index-elisp_005ftest"><span class="category-def">Rule: </span><span><strong class="def-name">elisp_test</strong> <var class="def-var-arguments">(name, [fatal_warnings], srcs, [data], [deps], [skip_tests], [skip_tags])</var><a class="copiable-link" href="#index-elisp_005ftest"> &para;</a></span></dt>
<dd>
Expand Down Expand Up @@ -391,7 +390,7 @@ <h2 class="chapter" id="Usage-1"><span>3 Usage<a class="copiable-link" href="#Us
<dt><code class="code">skip_tags</code></dt>
<dd><p>List of test tags to skip. This attribute contains a list
of tag names; if a test is tagged with one of the tags from this list, it is
skipped. This can be useful to e.g. skip tests that are flaky or only work in
skipped. This can be useful to e.g. skip tests that are flaky or only work in
interactive mode. Use the <code class="code">:tags</code> keyword argument to <code class="code">ert-deftest</code> to tag
tests. List of strings; optional; default: <code class="code">[]</code>.
</p></dd>
Expand Down Expand Up @@ -1320,6 +1319,7 @@ <h2 class="chapter" id="Starlark-infrastructure-1"><span>9 Starlark infrastructu
</p></dd>
</dl>
</dd></dl>

<dl class="first-deffn def-block">
<dt class="deffn def-line" id="index-elisp_005femacs_005fbinary"><span class="category-def">Rule: </span><span><strong class="def-name">elisp_emacs_binary</strong> <var class="def-var-arguments">(name, [mode], srcs, readme, [module_header], [builtin_features], [dump_mode])</var><a class="copiable-link" href="#index-elisp_005femacs_005fbinary"> &para;</a></span></dt>
<dd>
Expand Down
Loading