Summer Boot (web2&web3, the decentralized web framework)

Overview

Summer Boot

Bors enabled FOSSA Status

The next generation decentralized web framework allows users to manage and share their own data. It will be a wide area and cross regional web framework.

Quick Start

use serde::Deserialize;
use summer_boot::{Request, Result};

#[derive(Debug, Deserialize)]
struct User {
    name: String,
    age: u16,
}

#[summer_boot::main]
async fn main() {
    let mut app = summer_boot::new();
    app.at("/test/api").post(test_api);
    app.listen("127.0.0.1:8080").await.unwrap();
}

async fn test_api(mut req: Request<()>) -> Result {
    let User { name, age } = req.body_json().await?;
    Ok(format!("Hello, {}!  {} years old", name, age).into())
}

License

Licensed under either of

FOSSA Status

Comments
  • Description of Web3 development

    Description of Web3 development

    Over the past two months, we have been gathering technical knowledge about web3. Unfortunately, there are very few rust demos available for Web3 reference. We have to spend a lot of time doing this, which delays the current optimization of web2. We think it is a bit unreasonable. We will temporarily remove crates that are not used in the next two months and then remove modules related to web3.

    We want to gather enough knowledge to complete the current summer boot web2 framework before doing Web3 work, when we will create a new warehouse for development, which is challenging work and will always be open for discussion.

    good first issue help wanted 
    opened by Jzow 1
  • Update serde_yaml requirement from 0.8 to 0.9

    Update serde_yaml requirement from 0.8 to 0.9

    Updates the requirements on serde_yaml to permit the latest version.

    Release notes

    Sourced from serde_yaml's releases.

    0.9.0

    API documentation: https://docs.rs/serde_yaml/0.9

    Highlights

    • The serde_yaml::Value enum gains a Tagged variant which represents the deserialization of YAML's !Tag syntax. Tagged scalars, sequences, and mappings are all supported.

    • An empty YAML input (or document containing only comments) will deserialize successfully to an empty map, empty sequence, or Serde struct as long as the struct has only optional fields. Previously this would error.

    • A new .apply_merge() method on Value implements YAML's << merge key convention.

    • The Debug representation of serde_yaml::Value has gotten vastly better (dtolnay/serde-yaml#287).

    • Deserialization of borrowed strings now works.

      #[derive(Deserialize, Debug)]
      struct Struct<'a> {
          borrowed: &'a str,
      }
      

      let yaml = "borrowed: 'kölcsönzött'\n"; let value: Struct = serde_yaml::from_str(yaml)?; println!("{:#?}", value);

    • Value's and Mapping's methods get and get_mut have been generalized to support a &str argument, as opposed to requiring you to allocate and construct a Value::String for indexing into another existing Value.

    • Mapping exposes more APIs that have become conventional on map data structures, such as .keys(), .values(), .into_keys(), .into_values(), .values_mut(), and .retain(|k, v| …).

    Breaking changes

    • Serialization no longer produces leading ---\n on the serialized output. You can prepend this yourself if your use case demands it.

    • Serialization of enum variants is now based on YAML's !Tag syntax, rather than JSON-style singleton maps.

      #[derive(Serialize, Deserialize)]
      enum Enum {
          Newtype(usize),
          Tuple(usize, usize, usize),
          Struct { x: f64, y: f64 },
      }
      
      - !Newtype 1
      - !Tuple [0, 0, 0]
      - !Struct {x: 1.0, y: 2.0}
      

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • CI Action Build error

    CI Action Build error

    The ci build log in the log seems to be that the configuration file cannot be loaded.

    error: test failed, to rerun pass '-p summer-boot-parent --lib'
    
    running 2 tests
    test tests::test_socket ... ok
    test tests::test_load_env_conf_mysql ... FAILED
    
    failures:
    
    ---- tests::test_load_env_conf_mysql stdout ----
    thread 'tests::test_load_env_conf_mysql' panicked at 'Error loading configuration file /work/rust_catalogue/summer-boot/summer-boot-tests/src/resources/app.yml, please check the configuration!', summer-boot-tests/src/lib.rs:40:51
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    
    
    failures:
        tests::test_load_env_conf_mysql
    
    test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
    
    Error: Process completed with exit code [101](https://github.com/Jzow/summer-boot/runs/6704014740?check_suite_focus=true#step:4:102).
    
    bug enhancement 
    opened by Jzow 1
  • Participating to a benchmark

    Participating to a benchmark

    Hi @Jzow,

    I reach in here following some discussion about tide.

    Perhaps, you could be interested in participating to https://github.com/the-benchmarker/web-frameworks.

    The idea of this project is to compare various of web frameworks.

    Currently, only raw performances will be checked, but in the future build time, resource consumption ... will be also checked.

    Regards,

    opened by waghanza 0
  • Parsing YML needs to be enhanced

    Parsing YML needs to be enhanced

    At present, we can complete TCP listening by taking the port, but we need to monitor the context_path for parsing

    1. Add context_path support fields
    2. Modify the read code of the loading configuration file and add the read context_path field information
    enhancement 
    opened by Jzow 7
Releases(v1.0.0)
  • v1.0.0(Jun 25, 2022)

    New features

    1. add http1 and tcp listener impl #10
    2. add read yml configuration file #13
    3. add github ci action build script #14
    4. add #[summer_boot::main] and #[summer_boot::auto_scan] macro #40 #48
    5. add auto read yml file #45

    Fix

    1. 去除todo导致的build问题 #30
    2. Fix read resource path error #49

    contributors

    @Jzow @Yangandmore @secretgao @JackMacArthur

    Source code(tar.gz)
    Source code(zip)
Owner
Summer
Summer Open Source Projects(Summer OS)
Summer
Making Token Exchange program with Solana(Rust), Web3, and Vue

Escrow program for Solana blockchain Tech stack Program (Smart Contract) Rust crates: solana-program, spl-token Solana CLI for test validator UI Types

Hoon Wee 3 May 10, 2022
A Web3.0 forum implemented based on Substrate

Substrate Node Template A fresh FRAME-based Substrate node, ready for hacking ?? Getting Started Follow the steps below to get started with the Node T

Daogang Tang 5 Mar 24, 2022
A Web3.0 forum implemented based on Substrate

Substrate Node Template A fresh FRAME-based Substrate node, ready for hacking ?? Getting Started Follow the steps below to get started with the Node T

Mike Tang 5 Mar 24, 2022
Ethereum JSON-RPC multi-transport client. Rust implementation of web3 library

Ethereum JSON-RPC multi-transport client. Rust implementation of web3 library. ENS address: rust-web3.eth

Tomasz Drwięga 1.2k Jan 8, 2023
CYFS:Next Generation Protocol Family to Build Web3

CYFS is the next-generation technology to build real Web3 by upgrading the basic protocol of Web (TCP/IP+DNS+HTTP). It has a subversive architectural design that everyone brings their own OOD (Owner Online Device) to form a truly decentralized network.

CYFS Core Dev Team 2k Jul 6, 2023
Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.

Building 1. Install rustc, cargo and rustfmt. $ curl https://sh.rustup.rs -sSf | sh $ source $HOME/.cargo/env $ rustup component add rustfmt When buil

Solana Foundation 9.8k Jan 3, 2023
Microunit is a decentralized unit orchestration framework.

Microunit is a decentralized unit orchestration framework.

Engula 13 Oct 10, 2021
Polkadex - An Orderbook-based Decentralized Exchange using the Substrate Blockchain Framework.

What is Polkadex? ?? Polkadex is a Open Source, Decentralized Exchange Platform made using Substrate Blockchain Framework that provides traders with t

Polkadex 243 Dec 16, 2022
Dank - The Internet Computer Decentralized Bank - A collection of Open Internet Services - Including the Cycles Token (XTC)

Dank - The Internet Computer Decentralized Bank Dank is a collection of Open Internet Services for users and developers on the Internet Computer. In t

Psychedelic 56 Nov 12, 2022
cashio is a decentralized stablecoin made for the people, by the people.

cashio is a decentralized stablecoin made for the people, by the people. We're in active development. For the latest updates, please join our c

Cashio App 42 Sep 29, 2022
Subsocial full node with Substrate/Polkadot pallets for decentralized communities: blogs, posts, comments, likes, reputation.

Subsocial Node by DappForce Subsocial is a set of Substrate pallets with web UI that allows anyone to launch their own decentralized censorship-resist

DappForce 74 Nov 24, 2022
The Decentralized and Scaled Blockchain

Massa: The Decentralized and Scaled Blockchain Massa is a truly decentralized blockchain controlled by thousands of people. With the breakthrough mult

null 1.2k Dec 31, 2022
Open source Rust implementation of the Witnet decentralized oracle protocol, including full node and wallet backend 👁️🦀

witnet-rust is an open source implementation of the Witnet Decentralized Oracle Network protocol written in Rust. Components witnet-rust implements ma

The Witnet Project 155 Nov 21, 2022
Nym provides strong network-level privacy against sophisticated end-to-end attackers, and anonymous transactions using blinded, re-randomizable, decentralized credentials.

The Nym Privacy Platform The platform is composed of multiple Rust crates. Top-level executable binary crates include: nym-mixnode - shuffles Sphinx p

Nym 653 Dec 26, 2022
Blue Terra is a decentralized protocol for the global democratization of stable and accessible property rights.

??️ The official Blue Terra KYC program. Blue Terra holders interact with this program to activate the leases embedded in their NFTs.

Blue Terra 1 Jan 31, 2022
Decentralized stablecoin on Juno Network.

⚡️ C O S M W A S M S T A B L E C O I N ⚡️ coming soon to junø network ?? Overview Ultra is a CosmWasm stablecoin protocol developed on JunoNetwork by

notional-labs 12 Dec 15, 2022
Demo: Connect Phala's Fat Contract to external storage services, both centralized (Amazon s3) and decentralized .

This demo shows how to connect Phala's Fat Contract to external storage services, both centralized (Amazon s3) and decentralized (Arweave/Filecoin thr

Christopher Fok 2 Aug 30, 2022
A Multi-chain Decentralized Exchange (DEX) built on CosmWasm for the WYND DAO.

WynDex A Multi-chain Decentralized Exchange (DEX) built on CosmWasm for the WYND DAO. Overview License The initial pool types were copied from astropo

null 7 Jan 31, 2023
Kryptokrona SDK in Rust for building decentralized private communication and payment systems.

Kryptokrona Rust SDK Kryptokrona is a decentralized blockchain from the Nordic based on CryptoNote, which forms the basis for Monero, among others. Cr

null 5 May 25, 2023