Coder Social home page Coder Social logo

debanjanbasu / veilid Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 7.7 MB

License: Mozilla Public License 2.0

Earthly 0.24% Batchfile 0.08% Shell 2.36% Python 3.93% Rust 77.14% Cap'n Proto 0.56% CMake 0.41% Java 0.04% C 0.07% Swift 0.21% Kotlin 0.02% Dart 13.43% Ruby 0.13% Objective-C 0.01% C++ 0.55% HTML 0.05% TypeScript 0.75%

veilid's Introduction

Welcome to Veilid

From Orbit

The first matter to address is the question "What is Veilid?" The highest-level description is that Veilid is a peer-to-peer network for easily sharing various kinds of data.

Veilid is designed with a social dimension in mind, so that each user can have their personal content stored on the network, but also can share that content with other people of their choosing, or with the entire world if they want.

The primary purpose of the Veilid network is to provide the infrastructure for a specific kind of shared data: social media in various forms. That includes light-weight content such as Twitter's tweets or Mastodon's toots, medium-weight content like images and songs, and heavy-weight content like videos. Meta-content such as personal feeds, replies, private messages, and so forth are also intended to run atop Veilid.

Run a Node

The easiest way to help grow the Veilid network is to run your own node. Every user of Veilid is a node, but some nodes help the network more than others. These network support nodes are heavier than the node a user would establish on their phone in the form of a chat or social media application. A cloud based virtual private server (VPS), such as Digital Ocean Droplets or AWS EC2, with high bandwidth, processing resources, and up time availability is crucial for building the fast, secure, and private routing that Veilid is built to provide.

To run such a node, establish a Debian or Fedora based VPS and install the veilid-server service. To make this process simple we are hosting package manager repositories for .deb and .rpm packages. See the installing guide for more information.

Building on Veilid

If you want to start using Veilid for your own app, take a look at the Developer Book.

A basic example using veilid-core and tokio might look like this.

use std::sync::Arc;
use veilid_core::VeilidUpdate::{AppMessage, Network};
use veilid_core::{VeilidConfigBlockStore, VeilidConfigInner, VeilidConfigProtectedStore, VeilidConfigTableStore, VeilidUpdate};

#[tokio::main]
async fn main() {
    let update_callback = Arc::new(move |update: VeilidUpdate| {
        match update {
            AppMessage(msg) => {
                println!("Message: {}", String::from_utf8_lossy(msg.message().into()));
            }
            Network(msg) => {
                println!("Network: Peers {:}, bytes/sec [{} up] [{} down]", msg.peers.iter().count(), msg.bps_up, msg.bps_down)
            }
            _ => {
                println!("{:?}", update)
            }
        };
    });

    let config = VeilidConfigInner {
        program_name: "Example Veilid".into(),
        namespace: "veilid-example".into(),
        protected_store: VeilidConfigProtectedStore {
            // avoid prompting for password, don't do this in production
            always_use_insecure_storage: true,
            directory: "./.veilid/block_store".into(),
            ..Default::default()
        },
        block_store: VeilidConfigBlockStore {
            directory: "./.veilid/block_store".into(),
            ..Default::default()
        },
        table_store: VeilidConfigTableStore {
            directory: "./.veilid/table_store".into(),
            ..Default::default()
        },
        ..Default::default()
    };

    let veilid = veilid_core::api_startup_config(update_callback, config).await.unwrap();
    println!("Node ID: {}", veilid.config().unwrap().get_veilid_state().config.network.routing_table.node_id);
    veilid.attach().await.unwrap();
    // Until CTRL+C is pressed, keep running
    tokio::signal::ctrl_c().await.unwrap();
    veilid.shutdown().await;
}

Development

If you're inclined to get involved in code and non-code development, please check out the contributing guide. We're striving for this project to be developed in the open and by people for people. Specific areas in which we are looking for help include:

  • Rust
  • Flutter/Dart
  • Python
  • Gitlab DevOps and CI/CD
  • Documentation
  • Security reviews
  • Linux packaging

veilid's People

Contributors

superteece avatar coyote240 avatar drprofesq avatar salvatoret avatar debanjanbasu avatar bekavalentine avatar elektrischermoench avatar kyanha avatar a1ecbr0wn avatar inanna-malick avatar zeddee avatar banjofox avatar solace-10 avatar stillonearth avatar fxchip avatar jasonribble avatar feamcor avatar derrickoswald avatar bbigras avatar naisanzaa avatar gloof11 avatar ramrunner avatar dependabot[bot] avatar nategraf avatar trent-waddington avatar gaykitty avatar kjubybot avatar sajattack avatar ineiti avatar seestem avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.