Using Maidsafe libraries for my app outside the "ecosystem"

First of all, give shout-out to everyone who has contributed to the project, it’s awesome.
I’m willing to contribute to the maidsafe universe.

I’d like to ask about the feasibility of developing a native (rust or cpp) decentralized application that uses the maidsafe technology but without using the browser. How possible is that? Where can I start? Are there similar existing applications?

Tl;dr: looking for help/guidance (an API) to use maidsafe for decentralization but does not rely on the browser.



At present, there are a few options for an external program to use SAFE: (please correct me if wrong)

  • A program that uses SAFE as a storage zone (e.g. SAFE-FS)
  • A program that scrapes/processes data posted to SAFE (e.g. from a forum or dedicated safe site) … lots of options

A program running decentralized inside safe is still over the horizon, but there are options for client-run safe-javascript to provide a custom experience to users while leveraging the network.

Check for more insights, and dive into the demo programs (email-on-safe, etc.)

You are maybe a little early to get good help for this.

The focus is on the web apps at the moment.

Later on the apis will be available for nearly any programming language with wrappers including “C” which will suit a lot of languages. With the all important documentation.

If you search on api then you should see some discussions that could help you


Hey @TheJaaba, I am doing this currently. (The decentralization part is code under work, not for sharing yet).

What you do is that you pick the libraries with available FFI bindings, and then you code a wrapper in the language of your choice. So, currently you can interact with the data storage of SAFENet.

When crust has FFI bindings you could also create an overlay network. But you can do that anyway, with WebRtc for example. (There’s no out of the box solution for a decentralized app story though, meaning that there’s no multisig available in SAFENet yet, and implementing a secure consensus system in your overlay network is quite an undertaking.)

The easiest thing is to let users have a client application that works for them on their machine, i.e. there is no distributed logic processing. (You can look at my SAFEEventStore implementation for an example)
That way you can have constant client side processing of data stored on SAFENet. The user can then access this through a desktop interface, or if you prefer web tech for UI, you can code a regular web app - or even better: a SAFE web app - which calls your desktop application (i.e. on an http endpoint on localhost). This way you can have a background process without the need to keep a tab open in the browser (which would be needed to have js run that same logic).

So, with a SAFE web app UI, the site can be accessed from anywhere, and you could upload the installer to SAFENetwork, and the website tries to connect to the application locally, if it is not there it prompts to download the latest installer, and then you can install and run, and the website then can connect. This latest part is not solved or done, it’s just an idea I’ve had :slight_smile:


Depends what you mean by decentralised app, ie what you want it to do, and what languages you prefer. You can write web apps now, also desktop apps easily using nodejs. It is feasible to use other languages, but not so easily because the language bindings to SAFE API are limited just now, but being expanded I believe. All these options rely on the SAFE browser for account creation and authentication.

If you want to do away with the browser for authentication, and authenticate yourself, things are significantly more complicated, but you can do this. You will though have to dig deeper into the network protocols or at least the rust libraries themselves rather than the APIs published so far because those rely on browser authenticator.

I think that’s a fair summary.


Hi !

You can actually do a lot outside of the web api. I have been playing with rust last summer and managed to make some demo stuff.
Your main issue is that you will have hard time to find up to date documentation about this right now.

The best entry point today may be :

Reading the code should get you trough the first steps, there is some nice commenting.

Your other entry would be :
Many skilled and helpful people there to help you sort things out !


Wow, thanks all for the reactivity.
@happybeing that’s actually pretty close to what I was asking for. My app is more or less a desktop messaging app that aims to be decentralized. What I mean by decentralized is not some kind of distributed logic, but rather the mesh topology that maidsafe creating and routing the messages through nodes.
I’ll dig into the routing create for that matter, is there any pointer you can give me to start?
Thanks a lot.

1 Like

One of the MaidSafe example apps was email, and I think a couple of community created Web apps were for messaging, so they might give you some ideas on ways to use the API for messaging.

The SAFE API doesn’t yet support notifications, so messaging is currently done by writing to a mutable data, and the recipient checking that (polling). When notifications are supported you will have more options but that hasn’t been worked out yet.

1 Like