Are there any example apps ready for viewing?

Hello Everyone, am a software developer eager to contribute to the project. However i learn best on reviewing existing codes of similar work i intended to do. Presently i don’t see any example apps present since this link is broken says page not found. http://maidsafe.net/maidsafe-examples/en/

Can any one point me to any work that is available on apps using safe network implementation?

1 Like

If you clone the github repositories (the ones tagged as “Rust”) you’ll find sample code inside each project, both in the form of tests in the source files themselves (use “cargo test” to execute it) and examples, in the src/examples sub directory of each project. Build with “cargo build --example <example name>”.

If you look on the forum (try development or tutorials categories), there are topics explaining how to build at least three of these projects (CRUST, routing and self_encryption) but if you get stuck just ask. I think self_encryption is a good one too start with. Good luck!

2 Likes

Thanks @happybeing thanks for point me in the right direction was in the process of cloning the repos. Its nice to know were to find the examples.

1 Like

Have fun with maidsafe_client too.

cargo run --example rest_api

Account Creation
================

------------ Enter Keyword ---------------
Agent_Whyte

------------ Enter Password --------------
M0n4co

--------- Enter PIN (4 Digits) -----------
1872

Trying to create an account …
Account Created Successfully !!

Auto Account Login
==================

Trying to log into the created account using supplied credentials …
Account Login Successful !!

-- Preparing storage ----

------ (Tip) Start by creating a container and then store blob, modify blob within the container --------------------

----------Choose an Operation----------------

  1. Create Container
  2. List Containers
  3. Get Root Container Versions
  4. Delete Container
  5. List Blobs from container
  6. Create Blob
  7. Update Blob
  8. Get blob content
  9. Get blob content by version
  10. Delete blob
  11. Copy blob
    ------ Enter a number --------------------
    1

------Enter Container name--------
jamjar

Created Container - jamjar

----------Choose an Operation----------------

  1. Create Container
  2. List Containers
  3. Get Root Container Versions
  4. Delete Container
  5. List Blobs from container
  6. Create Blob
  7. Update Blob
  8. Get blob content
  9. Get blob content by version
  10. Delete blob
  11. Copy blob
    ------ Enter a number --------------------

Enter a valid number

----------Choose an Operation----------------

  1. Create Container
  2. List Containers
  3. Get Root Container Versions
  4. Delete Container
  5. List Blobs from container
  6. Create Blob
  7. Update Blob
  8. Get blob content
  9. Get blob content by version
  10. Delete blob
  11. Copy blob
    ------ Enter a number --------------------
    1

------Enter Container name--------
ginger bottle
Created Container - ginger bottle

----------Choose an Operation----------------

  1. Create Container
  2. List Containers
  3. Get Root Container Versions
  4. Delete Container
  5. List Blobs from container
  6. Create Blob
  7. Update Blob
  8. Get blob content
  9. Get blob content by version
  10. Delete blob
  11. Copy blob
    ------ Enter a number --------------------
    2

List of containers
Created On Name
========================= ==========
“13-06-2015 16:47 UTC” jamjar

 "13-06-2015 16:47 UTC" 	 ginger bottle

----------Choose an Operation----------------

  1. Create Container
  2. List Containers
  3. Get Root Container Versions
  4. Delete Container
  5. List Blobs from container
  6. Create Blob
  7. Update Blob
  8. Get blob content
  9. Get blob content by version
  10. Delete blob
  11. Copy blob
    ------ Enter a number --------------------
    3

List of container versions
No. Version Id
=== ==========
1 "16116115178…95129189173"
2 "226862240…249219750"
3 “524416678…85206247172”

----------Choose an Operation----------------

  1. Create Container
  2. List Containers
  3. Get Root Container Versions
  4. Delete Container
  5. List Blobs from container
  6. Create Blob
  7. Update Blob
  8. Get blob content
  9. Get blob content by version
  10. Delete blob
  11. Copy blob
    ------ Enter a number --------------------
    6

------Enter Container name--------
jamjar
------Enter text to be saved as a file--------
lots of rhubarb jam
------Enter Blob name--------
Granny’s best
Blob created

----------Choose an Operation----------------

  1. Create Container
  2. List Containers
  3. Get Root Container Versions
  4. Delete Container
  5. List Blobs from container
  6. Create Blob
  7. Update Blob
  8. Get blob content
  9. Get blob content by version
  10. Delete blob
  11. Copy blob
    ------ Enter a number --------------------
    5

------Enter Container name--------
jamjar
List of Blobs
Modified On Name
========================= ===========
“13-06-2015 16:49 UTC” Granny’s best

----------Choose an Operation----------------

  1. Create Container
  2. List Containers
  3. Get Root Container Versions
  4. Delete Container
  5. List Blobs from container
  6. Create Blob
  7. Update Blob
  8. Get blob content
  9. Get blob content by version
  10. Delete blob
  11. Copy blob
    ------ Enter a number --------------------
    8

------Enter Container name--------
jamjar
------Enter Blob name--------
Granny’s best
Content Read:
lots of rhubarb jam

----------Choose an Operation----------------

  1. Create Container
  2. List Containers
  3. Get Root Container Versions
  4. Delete Container
  5. List Blobs from container
  6. Create Blob
  7. Update Blob
  8. Get blob content
  9. Get blob content by version
  10. Delete blob
  11. Copy blob
    ------ Enter a number --------------------
5 Likes

@Southside am working on windows 8.1 and tried to do cargo run --example rest_api and ran into the following error. Thought of opening up an issue but let me ask here first. Presently am cargo run and cargo test stop at compiling crust v0.0.63. Is there a way of changing the required version of crust cause its not included in the dependencies. Can’t figure out where its coming from.

For now you need to use the nightly version of rust. Then you will be fine.

2 Likes

@dirvine thanks just installled the nightly version and this is the error i get on the maid safe client when i do cargo run --example rest_api also the test fails with same error.

The error is linked to Maidsafe_types when you add --verbose shows that the compiling fails at the types. So i went ahead and cloned the repo on my machine and ran cargo test --release and got this error

@dirvine is there any installed software requirement i am missing? Bare my coding environment is on windows 8.1, installed rust nightly and gcc both for 64bit machine.

Ah yes you will need libsodium installed and able to be found in your path. It’s a c lib but very well written and secure by a top crypto team. (well it wraps NaCl which is). There should be instructions, but it was last minute on Friday. Can you follow the instructions from another crate (self_encrypt for now) to get that part done. You can also raise an issue in client github issues, then you are contributing, I will tomorrow if you don’t get to it.

Sorry - all of my testing has been on linux Ubuntu 14.04 and 15.04. I just got a new(ish) box to run my Centos7 server on so the old box could get Win 7 or 8, I might have a shot at it later today. But I have no real recent experience with gcc on windows , MingW etc so it could be a while before I can give any meaningful feedback.
@dirvine should I be using win32 or POSIX threads? told you I was pretty much in the dark here…

Yea me and windows split in '94 and I have never used it, the guys will chime in though. Have to say their recent Open Sourcing is very encouraging, they could really make the terminal posix compliant and if that happens then life will be simpler. If they opened up the stack for c compatibility then they will get a ton of devs working there to. Interesting days in those large corporates now.

1 Like

Installed the libsodium and solved errors for the repos.

Thank you all for the help so far. Been able to play around with self_encryption, routing and crust. However, still not able to get maidsafe_client to work @dirvine filed a report hopefully will get it to work for me this week.

I ran tests for all other rust repos and whereby several tests passed. I can safely say i hard a successful second day learning on the safe network. Next step familiarize myself more with rust package and existing code as well as read on the whitepapers to better understand more on end goal. :smile:

1 Like

Thx for that, @Krishna_Kumar has already updated the README now.