GithubHelp home page GithubHelp logo

Comments (3)

adnanademovic avatar adnanademovic commented on June 19, 2024

rosrust_codegen is a direct dependency of rosrust. Its only responsibility is implementing the rosmsg_include! macro, since it's a procedural macro, and procedural macros need to be implemented in a crate of their own.

Though I will consider updating the README, the new README will probably just be "procedural macros for rosrust".

Thanks for the concern!

from rosrust.

tstellanova avatar tstellanova commented on June 19, 2024

Since rosrust_codegen is a procedural macro crate, consider:

  • Moving the source code for rosrust_codegen to its own repo instead of including within the rosrust repo
  • Make it possible to use the rosrust_codegen without rosrust. Currently attempting to do this (by forcing a dependency on just the rosrust_codegen directory) results in:
error[E0433]: failed to resolve: use of undeclared type or module `rosrust`
 --> src/lib.rs:8:5
  |
8 |     rosmsg_include!(sensor_msgs/Image,sensor_msgs/Imu,geometry_msgs/TransformStamped);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type or module `rosrust`

The functionality provided by rosrust_codegen to generate rust types from ROS messages seems very useful on its own.

from rosrust.

adnanademovic avatar adnanademovic commented on June 19, 2024

Again, rosrust_codegen is a key part of rosrust and the only reason it's a separate crate is technical limitations of the crates system.
Depending on rosrust_codegen alone does not make sense since the generated messages implement traits from rosrust.
It's all similar to how serde and serde_derive interact.

from rosrust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.