Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify importing flatdata-rs #150

Closed
boxdot opened this issue Aug 22, 2019 · 3 comments · Fixed by #217
Closed

Simplify importing flatdata-rs #150

boxdot opened this issue Aug 22, 2019 · 3 comments · Fixed by #217
Labels

Comments

@boxdot
Copy link
Collaborator

boxdot commented Aug 22, 2019

At the moment, to import flatdata in rust, we need to write:

#[macro_use]
extern crate flatdata
  • We should try to remove this requirement.
  • Also, nightly compiler fails due to missing flatdata_intersperse macro.
@boxdot boxdot added the rust label Aug 22, 2019
@gferon
Copy link
Contributor

gferon commented Aug 29, 2019

For the second point, see: rust-lang/rust#63888. It's fixed in nightly but not yet in beta.

@VeaaC
Copy link
Collaborator

VeaaC commented Apr 22, 2020

Is this still an issue? @boxdot ?

@boxdot
Copy link
Collaborator Author

boxdot commented Dec 10, 2020

Yes, minimal example:

#[macro_use]
extern crate flatdata;

include!(concat!(env!("OUT_DIR"), "/graph.rs"));

fn main() {
    println!("Hello, world!");
}

Looks like there is also a bug in the docs which tell to do:

#![allow(dead_code)]
include!(concat!(env!("OUT_DIR"), "/graph.rs"));

but the dead code annotation actually does not work.

VeaaC added a commit to VeaaC/flatdata that referenced this issue Nov 19, 2021
VeaaC added a commit to VeaaC/flatdata that referenced this issue Nov 19, 2021
VeaaC added a commit that referenced this issue Nov 26, 2021
* Make it easier to use flatdata-rs generated code

Fixes #150

Signed-off-by: Christian Vetter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants