not really known
Go to file
dr-frmr f0ebfe2683
Merge pull request #73 from uqbar-dao/dr/http-refactor-2
Refactor http server and client to be clean, performant, good API
2023-11-25 22:29:03 -05:00
.github/workflows Update main.yml 2023-11-01 17:13:06 -04:00
modules clippy cleanup, mark chess as nonfunctional at the moment 2023-11-25 22:26:53 -05:00
src Merge branch 'main' into dr/http-refactor-2 2023-11-25 22:28:46 -05:00
wit WIP: homepage, proxy, qns_indexer, terminal are working 2023-11-06 17:11:31 -05:00
.env.example fs: read cache (#49) 2023-11-17 13:18:35 -03:00
.gitignore Merge branch 'main' into jf/invite 2023-10-25 11:56:52 -04:00
.gitmodules added register as a git submodule, building it in build.rs 2023-10-03 15:31:51 -04:00
build.rs cleanup: run cargo clippy --fix 2023-11-13 14:59:17 -05:00
Cargo.lock fs: read cache (#49) 2023-11-17 13:18:35 -03:00
Cargo.toml Merge branch 'main' into dr/http-refactor-2 2023-11-25 22:28:46 -05:00
README.md add keepalive and close connections better 2023-11-08 16:29:59 -05:00
rust-toolchain.toml working on mac! 2023-11-01 17:09:47 -04:00
wasi_snapshot_preview1.wasm WIP: homepage, proxy, qns_indexer, terminal are working 2023-11-06 17:11:31 -05:00

Last updated: 11/01/23

Setup

Building components

# Clone the repo.

git clone git@github.com:uqbar-dao/uqbar.git


# Get some stuff so we can build wasm.

cd uqbar
cargo install wasm-tools
rustup install nightly
rustup target add wasm32-wasi
rustup target add wasm32-wasi --toolchain nightly
cargo install cargo-wasi

# Initialize submodules, in particular the register app

git submodule update --init --recursive
# Build the register app
cd src/register && ./build_all.sh && cd ../..

# Build the runtime, along with a number of booted-at-startup WASM modules including terminal and key_value
# OPTIONAL: --release flag

cargo +nightly build --release

Boot

Get an eth-sepolia-rpc API key and pass that as an argument. You can get one for free at alchemy.com.

Make sure not to use the same home directory for two nodes at once! You can use any name for the home directory: here we just use home.

cargo +nightly run --release home --rpc wss://eth-sepolia.g.alchemy.com/v2/<your-api-key>

On boot you will be prompted to navigate to localhost:8080. Make sure your ETH wallet is connected to the Sepolia test network. Login should be straightforward, just submit the transactions and follow the flow. If you want to register a new ID you will either need Sepolia testnet tokens or an invite code.

Terminal syntax

  • CTRL+C or CTRL+D to shutdown node

  • CTRL+V to toggle verbose mode, which is on by default

  • CTRL+J to toggle debug mode

  • CTRL+S to step through events in debug mode

  • CTRL+A to jump to beginning of input

  • CTRL+E to jump to end of input

  • UpArrow/DownArrow or CTRL+P/CTRL+N to move up and down through command history

  • CTRL+R to search history, CTRL+R again to toggle through search results, CTRL+G to cancel search

  • !message <name> <app> <json>: send a card with a JSON value to another node or yourself. can be our, which will be interpreted as our node's username.

  • !hi <name> <string>: send a text message to another node's command line.

  • <name> is either the name of a node or our, which will fill in the present node name

  • more to come

Example usage

Download and install an app:

!message our main:app_store:uqbar {"Download": {"package": {"package_name": "<pkg>", "publisher_node": "<node>"}, "install_from": "<node>"}}
!message our main:app_store:uqbar {"Install": {"package_name": "<pkg>", "publisher_node": "<node>"}}