A fix to better support rust-analyzer and type support.

This probably generates a large file to compile, so we need to look into that when we need to
This commit is contained in:
Kristofer Bengtsson 2020-03-27 18:25:49 +01:00
parent 4d1d223ece
commit f83541a24c
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
[package]
name = "r2r"
version = "0.0.1"
version = "0.0.2"
authors = ["Martin Dahl <martin.dahl@gmail.com>"]
description = "Minimal ros2 bindings."
license = "Apache-2.0/MIT"

View File

@ -26,8 +26,8 @@ fn main() {
);
println!("cargo:rustc-link-lib=dylib={}__rosidl_generator_c", module);
modules.push_str(&format!("pub mod {};\n", module));
modules.push_str(&format!(r#"pub mod {module}{{include!(concat!(env!("OUT_DIR"), "/{module}.rs"));}}{lf}"#, module=module, lf="\n"));
//modules.push_str(&format!("pub mod {};\n", module));
let mut codegen = String::new();
for (prefix, msgs) in prefixes {