Succes in registering with rust :)

I have been working on this recently, and the code changed a lot. At the time of pasting I had not versioned anything so this is unfortunately lost !

I am trying to put together a rust library so it can be used as a crate in other projects.
I still need to figure out some licencing choices, and do a bit of cleanup, then my intention is to publish it on github so people can use it and make it better eventually . Now keep in mind this is dirty code , totally unsupported and mainly a way for me to get to learn rust and the safe network mechanics ! I am not an experienced coder.

Publishing this should happen within a few days.

2 Likes

Wow, okay that’s great news glad to hear about it; I’m sure I’ll be able to piece together somethings in the mean time.

And hook up with your crate afterwards. Yah I can imagine itll be tough to go through it right now in the middle of implementation.

Anyway awesome!! @nice

1 Like

@dallyshalla and everyone interested, I pushed an initial state of the library :smiley:

This should be compiled as a library and will allow you to talk to the launcher with rust. I included an example as “main.rs” to be built as an executable - I suppose it should go to “examples”, I’ll figure it out later.

again, please remind that this is an exercise for me, mainly a way to learn to use rust and understand how things work in the Safe Network. The code may appear ugly, may not work at all or be outdated, may very well explode your computer and burn the house, spouse may go with the neighbor…

I hope this can be used as a base to build interesting projects, and that people will fork it and make it better.

Constructive comments and advice will be very much welcome !

6 Likes

Hey nice,

Please do not put a “*” in cargo.toml. People will hate you for it. Please use versions instead. You can find the version number in crates.io.

I can compile it although I cannot run the example. I’m debugging it.

@anon81773980 nothing is wrong with the library, though that’s for sure:

@nice much appreciated again.

3 Likes

Hmm I am missing dependencies on my OS machine. I think there should be a list of dependencies that needs to be installed on readme.md

do you have a launcher running at the same time? I just cloned directly and tried it

  1. without the launcher and the error messages
  2. with launcher and the authorization request

mmm I thought Cargo.toml would do the job.

Sure, I will try to fix this at some point ! Thank you for pointing this out.[quote=“anon81773980, post:24, topic:8129”]

I can compile it although I cannot run the example. I’m debugging it.
[/quote]

I am working on it right now - The one I had pushed works only once. I wrote a version that makes some cleaning before it quits.

I am working on dns right now, hitting quite some errors…

Thank you @anon81773980 , @dallyshalla for the input !

1 Like

No, that’s not what I’m saying. I’m saying the OS dependencies. such as libsodium, etc.

Sure, I will try to fix this at some point ! Thank you for pointing this out.

By using star, it will always pull latest version. When you build something on a older version, it will break.

I just noticed that I am using sslv3, and the openssl cargo dependencies 0.6.7 does not support sslv3.

@dallyshalla

Yeah, I tried that. Everything checks out except the SSLv3. It has to deal with openssl, and it’s version.

1 Like

ssl always giving problems sincerely, a real PAIN IN THE PPP

but anyway, @anon81773980 I see @nice modified the Cargo.toml with hardcoded versions, did you try again?

do a cargo clean, and a git pull

Yeah, I am still getting same errors.

note: /run/media/Andromedia/git/rsafe/target/debug/deps/libopenssl-4082d291dfec4f37.rlib(openssl-4082d291dfec4f37.0.o): In function openssl::ssl::SslMethod::to_raw': /home/grizmo/.multirust/toolchains/stable/cargo/registry/src/github.com-88ac128001ac3a9a/openssl-0.6.7/src/ssl/mod.rs:135: undefined reference to SSLv3_method’
/run/media/Andromedia/git/rsafe/target/debug/deps/libopenssl-4082d291dfec4f37.rlib(openssl-4082d291dfec4f37.0.o): In function openssl::ssl::SslMethod::from_raw': /home/grizmo/.multirust/toolchains/stable/cargo/registry/src/github.com-88ac128001ac3a9a/openssl-0.6.7/src/ssl/mod.rs:153: undefined reference to SSLv3_method’
collect2: error: ld returned 1 exit status

error: aborting due to previous error
Could not compile rsafe.

By looking at the request crate, it uses openssl 6.7. That is possibility why I can’t get it working?

It seems indeed that 0.6.7 is the problem :
undefined reference to `SSLv3_method' · Issue #305 · sfackler/rust-openssl · GitHub

Now I don’t manage to find how to force request to use 0.7.0 or higher, which seems to fix the issue

This error I am not familiar with, I had similar problem where there were 2 versions being imported ssl 0.7.0 and ssl 0.6.7 so I just used a lower version of hyper that uses 0.6.7

this seems different; but it could be a potential solution to get it to build right away for @anon81773980 a little swamped atm

maybe asking the developer of request to set hisopenssl dependencies to >0.7.0

1 Like

Alright. I fixed the issue!

I pulled the request. Update the cargo.toml to the latest update. Fixed the compile error.

I requested a new pull in rust-request on github. Meanwhile, here’s my fork version.

https://github.com/Grizmoblust/rust-request/tree/sslv3

1 Like

Nice going @anon81773980!!

1 Like