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

Errors while compiling #6

Open
mercurial-moon opened this issue Aug 16, 2024 · 3 comments
Open

Errors while compiling #6

mercurial-moon opened this issue Aug 16, 2024 · 3 comments

Comments

@mercurial-moon
Copy link

Hi I saw your post from reddit (3yrs old)
https://www.reddit.com/r/rust/comments/qprg9f/rnet_call_into_rust_from_net/

In that post a user had posted a pipeline for using rnet https://github.com/gulbanana/rust-rnet-demo
so I downloaded his repo and update the version numbers in cargo.toml file

[package]
name = "rust-dotnet-bindgen-demo"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
linkme = "0.3.28"
rnet = "0.3.1"

and tried running a debug build in VS2022.
However I'm getting errors popping up like under

1>error[E0433]: failed to resolve: could not find private in linkme
1> --> src\lib.rs:11:5
1> |
1>11 | #[net]
1> | ^^^^^^ could not find private in linkme
1> |
1> = note: this error originates in the attribute macro ::rnet::hidden::linkme::distributed_slice (in Nightly builds, run with -Z macro-backtrace for more info)
1>
1>error[E0433]: failed to resolve: could not find private in linkme
1> --> src\lib.rs:17:1
1> |
1>17 | #[net]
1> | ^^^^^^ could not find private in linkme
1> |
1> = note: this error originates in the attribute macro ::rnet::hidden::linkme::distributed_slice (in Nightly builds, run with -Z macro-backtrace for more info)

I'm not that well versed in rust to identify the source of these errors, do you think this could be some configuration error in rgen?

@Diggsey
Copy link
Owner

Diggsey commented Aug 16, 2024

so I downloaded his repo and update the version numbers in cargo.toml file

If you update linkme to 0.3.x then it won't be compatible with the version used in rnet which is currently 0.2.x, and it looks like that might be the cause of the error message you are seeing.

I'd be happy to accept a PR updating rnet to linkme 0.3.x.

@mercurial-moon
Copy link
Author

Hi,
I changed the linkme version to 0.2.5 but some how when i do cargo build it uses version 0.2.10

I still get errors
error[E0554]: #![feature] may not be used on the stable release channel

I researched a bit more on this and found that I need the rust nightly build for this instead of stable build, not sure if this is correct though.

@mercurial-moon
Copy link
Author

Ok so i did

rustup install nightly

and then

rustup default nightly

it compiles successfully with a couple of warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants