Diggsey / rnet

Apache License 2.0
79 stars 5 forks source link

Errors while compiling #6

Open mercurial-moon opened 3 weeks ago

mercurial-moon commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

Ok so i did

rustup install nightly

and then

rustup default nightly

it compiles successfully with a couple of warnings.