Skip to content

Commit c7ec5df

Browse files
committed
Fix renderer Cargo feature and fix links to docs.rs (#91)
* Fix renderer not working without the viewer feature.; Fix * Fix docs-rs links for model editing type aliases. Version and changelog
1 parent 5bae1f9 commit c7ec5df

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mujoco-rs"
3-
version = "2.0.0+mj-3.3.7"
3+
version = "2.0.1+mj-3.3.7"
44
edition = "2024"
55
license = "MIT OR Apache-2.0"
66
description = "A Rust wrapper around the MuJoCo C library, with a native simple viewer (re-)written in Rust."
@@ -19,7 +19,7 @@ all-features = true
1919

2020
[features]
2121
viewer = ["dep:bitflags", "dep:glutin", "dep:winit", "dep:glutin-winit"]
22-
renderer = ["dep:png", "dep:glutin", "dep:winit", "dep:glutin-winit"]
22+
renderer = ["dep:bitflags", "dep:glutin", "dep:winit", "dep:glutin-winit", "dep:png"]
2323
cpp-viewer = []
2424

2525
ffi-regenerate = ["dep:regex", "dep:bindgen"] # Generate the ffi bindings. Only used for updating the committed ``mujoco_c`` module.

docs/guide/source/changelog.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ This means that any incompatible changes increase the major version (**Y**.x.x).
1616
This also includes breaking changes that MuJoCo itself introduced, thus even an
1717
update of MuJoCo alone can increase the major version.
1818

19+
2.0.1 (MuJoCo 3.3.7)
20+
================================
21+
- Fix the ``renderer`` feature not enabling all the needed crates.
1922

2023
2.0.0 (MuJoCo 3.3.7)
2124
================================
@@ -24,8 +27,8 @@ update of MuJoCo alone can increase the major version.
2427
- Updated the MuJoCo version to 3.3.7.
2528
- :ref:`model_editing`:
2629

27-
- Items (:docs-rs:`~mujoco_rs::wrappers::mj_editing::<struct>MjsJoint`,
28-
:docs-rs:`~mujoco_rs::wrappers::mj_editing::<struct>MjsGeom`, etc.) are no longer wrapped and are instead
30+
- Items (:docs-rs:`~mujoco_rs::wrappers::mj_editing::<type>MjsJoint`,
31+
:docs-rs:`~mujoco_rs::wrappers::mj_editing::<type>MjsGeom`, etc.) are no longer wrapped and are instead
2932
just aliased types. Their attributes have been made private to users, so that tools like ``rust-analyzer``
3033
don't suggest both the getter name and the attribute name at once.
3134
As a result of this change, methods now return true references instead of the wrapper types.
@@ -64,7 +67,7 @@ update of MuJoCo alone can increase the major version.
6467
- Changed |mj_data| and other types to accept a generic type for the model,
6568
constrained to ``Deref<Target = MjModel>``.
6669
This enables use in environments such as `PyO3 <https://github.com/PyO3/pyo3>`_.
67-
- :docs-rs:`~mujoco_rs::wrappers::mj_editing::<struct>MjsMesh`: changed ``smoothnormal`` and ``needsdf`` to be treated as booleans.
70+
- :docs-rs:`~mujoco_rs::wrappers::mj_editing::<type>MjsMesh`: changed ``smoothnormal`` and ``needsdf`` to be treated as booleans.
6871
- |mj_data| methods:
6972

7073
- Renamed ``crb`` to :docs-rs:`~mujoco_rs::wrappers::mj_data::<struct>MjData::<method>crb_comp` due to ``crb``
@@ -118,7 +121,7 @@ update of MuJoCo alone can increase the major version.
118121
- :ref:`model_editing`:
119122

120123
- Added iterators to :docs-rs:`~mujoco_rs::wrappers::mj_editing::<struct>MjSpec`
121-
and :docs-rs:`~mujoco_rs::wrappers::mj_editing::<struct>MjsBody`.
124+
and :docs-rs:`~mujoco_rs::wrappers::mj_editing::<type>MjsBody`.
122125

123126

124127
1.4.2 (MuJoCo 3.3.5)

docs/guide/source/programming/model_editing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Model editing
77
.. |mj_data| replace:: :docs-rs:`~mujoco_rs::wrappers::mj_data::<struct>MjData`
88
.. |mj_model| replace:: :docs-rs:`~mujoco_rs::wrappers::mj_model::<struct>MjModel`
99
.. |mj_spec| replace:: :docs-rs:`~mujoco_rs::wrappers::mj_editing::<struct>MjSpec`
10-
.. |mjs_body| replace:: :docs-rs:`~mujoco_rs::wrappers::mj_editing::<struct>MjsBody`
10+
.. |mjs_body| replace:: :docs-rs:`~mujoco_rs::wrappers::mj_editing::<type>MjsBody`
1111

1212
The most general way to create an |mj_model| instance is by loading an XML file
1313
via :docs-rs:`~~mujoco_rs::wrappers::mj_model::<struct>MjModel::<method>from_xml`.
@@ -165,7 +165,7 @@ Iterators
165165
================
166166
Since MuJoCo-rs 1.5.0, it is possible to also iterate existing :docs-rs:`~mujoco_rs::wrappers::mj_editing::<struct>MjSpec`
167167
items (geoms, joints, etc.). Iterators exist on :docs-rs:`~mujoco_rs::wrappers::mj_editing::<struct>MjSpec`
168-
and :docs-rs:`~mujoco_rs::wrappers::mj_editing::<struct>MjsBody`.
168+
and :docs-rs:`~mujoco_rs::wrappers::mj_editing::<type>MjsBody`.
169169

170170
To iterate over :docs-rs:`~mujoco_rs::wrappers::mj_editing::<struct>MjSpec` items, call
171171
``[item_type]_iter`` for immutable iteration or ``[item_type]_iter_mut`` for mutable iteration,
@@ -179,7 +179,7 @@ with ``[item_type]`` replaced by geom, body, etc.
179179
}
180180
...
181181
182-
Iteration over :docs-rs:`~mujoco_rs::wrappers::mj_editing::<struct>MjsBody` items can be used in a similar way.
182+
Iteration over :docs-rs:`~mujoco_rs::wrappers::mj_editing::<type>MjsBody` items can be used in a similar way.
183183
The only difference is an additional boolean parameter, which enables recursive iteration when ``true``.
184184

185185
.. code-block:: rust

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
//! ## Features
3232
//! This crate has the following public features:
3333
//! - `viewer`, which enables the Rust-native viewer ([`viewer::MjViewer`]),
34-
//! - `cpp-viewer`, which additionally enables the MuJoCo's original viewer (C++ based) ([`cpp_viewer::MjViewerCpp`]),
34+
//! - `cpp-viewer`, which enables the MuJoCo's original viewer (C++ based) ([`cpp_viewer::MjViewerCpp`]),
3535
//! - `renderer`, which enables the image renderer ([`renderer::MjRenderer`]).
3636
//!
3737
//! ## Functions

0 commit comments

Comments
 (0)