Skip to content

Commit ab05b01

Browse files
authored
docs: Add resources for nanobind-bazel v2.5.0 changes (#935)
Bumps the version number in MODULE.bazel, and mentions the additional keyword arguments supported in `nanobind_stubgen`.
1 parent d51c070 commit ab05b01

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

docs/api_bazel.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,29 @@ rule.
5656
name,
5757
module,
5858
output_file = None,
59+
output_directory = None,
5960
imports = [],
6061
pattern_file = None,
6162
marker_file = None,
6263
include_private_members = False,
63-
exclude_docstrings = False):
64+
exclude_docstrings = False,
65+
recursive = False):
6466
6567
It generates a `py_binary <https://bazel.build/reference/be/
6668
python#py_binary>`__ rule with a corresponding runfiles distribution,
6769
which invokes nanobind's builtin stubgen script, outputs a stub file and,
68-
optionally, a typing marker file into the build
69-
output directory (commonly called "bindir" in Bazel terms).
70+
optionally, a typing marker file into ``output_directory`` (defaults to
71+
the build output directory, commonly called "bindir" in Bazel terms).
7072

7173
All arguments (except the name, which is used only to refer to the target
7274
in Bazel) correspond directly to nanobind's stubgen command line interface,
7375
which is described in more detail in the :ref:`typing documentation <stubs>`.
7476

7577
*New in nanobind-bazel version 2.1.0.*
7678

79+
*New in nanobind-bazel v2.5.0: Added the "output_directory" and "recursive"
80+
keyword arguments.*
81+
7782
To build a C++ library with nanobind as a dependency, use the
7883
``nanobind_library`` rule.
7984

docs/bazel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ in your MODULE.bazel file:
2727
# Place this in your MODULE.bazel file.
2828
# The major version of nanobind-bazel is equal to the version
2929
# of the internally used nanobind.
30-
# In this case, we are building bindings with nanobind v2.4.0.
31-
bazel_dep(name = "nanobind_bazel", version = "2.4.0")
30+
# In this case, we are building bindings with nanobind v2.5.0.
31+
bazel_dep(name = "nanobind_bazel", version = "2.5.0")
3232
3333
To instead use a development version from GitHub, you can declare the
3434
dependency as a ``git_override()`` in your MODULE.bazel:

0 commit comments

Comments
 (0)