Rust implementation of NextGraph, a Decentralized and local-first web 3.0 ecosystem https://nextgraph.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nextgraph-rs/ng-app
Niko PLP 342168a90b adding bootstrap and core info in wallet at creation time 1 year ago
..
.vscode ng-app uses the sdk 2 years ago
src adding bootstrap and core info in wallet at creation time 1 year ago
src-tauri add_user, list_users from CLI 1 year ago
.gitignore ng-app uses the sdk 2 years ago
README.md ClientInfo 1 year ago
dist-file.zip distfile zip 2 years ago
index.html ng-app uses the sdk 2 years ago
package.json ClientInfo 1 year ago
pnpm-lock.yaml ng-app uses the sdk 2 years ago
postcss.config.cjs ng-app uses the sdk 2 years ago
prepare-app-file.cjs serving app and .ng_bootstrap 2 years ago
svelte.config.js ng-app uses the sdk 2 years ago
tailwind.config.cjs ng-app uses the sdk 2 years ago
tsconfig.json ng-app uses the sdk 2 years ago
tsconfig.node.json ng-app uses the sdk 2 years ago
vite.config.ts pazzle assets 2 years ago

README.md

NextGraph apps (Linux, MacOS, Windows, Android, iOS, web)

NextGraph native apps use the Tauri framework.

All the apps are using an embedded WebView that renders a Svelte app.

Install

prerequisites: compile the local SDK

cd ../ng-sdk-js
wasm-pack build --target bundler
cd ../ng-app
cargo install tauri-cli --version "^2.0.0-alpha"
npm install -g pnpm
pnpm install

VS Code + Svelte + Tauri + rust-analyzer.

Web

Dev

pnpm webdev
// then open http://localhost:1421/

Prod

pnpm webbuild
// then the application is available in dist-web folder
// can be served with:
cd dist-web ; python3 -m http.server

in order to build a self-contained html file, useful for offline use, do:

// uncomment line 14 of src/App.svelte: import * as api from "ng-sdk-js";
pnpm filebuild
// single file is available in dist-file/index.html
// the assets folder can be discarded

Desktop

Install all prerequisites for your dev platform.

to run the dev env :

## on macos
cargo tauri dev
## on linux
cargo tauri dev --target x86_64-unknown-linux-gnu
## on win
cargo tauri dev --target x86_64-pc-windows-msvc

to build the production app installer :

MacOs

cargo tauri build
// the installer is then available in target/x86_64-apple-darwin/release/bundle/dmg/NextGraph_0.1.0_x64.dmg
// or if you just want the app, it is at target/x86_64-apple-darwin/release/bundle/macos/NextGraph.app

Linux (Ubuntu 22.04)

cargo tauri build --target x86_64-unknown-linux-gnu

Windows (7)

cargo tauri build --target x86_64-pc-windows-msvc

Android

rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

Until I find out how to do this properly, if you are compiling the android app from a macos station, you need to override an env var. this is due to reqwest needing SSL support, and on linux and android it compiles it from source. apparently the compiler (cc-rs) doesn't know that when cross compiling to android targets, the tool ranlib is called llvm-ranlib (and not [target]-ranlib)

export RANLIB=/Users/[user]/Library/Android/sdk/ndk/[yourNDKversion]/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ranlib

to launch the dev app :

cargo tauri android dev

to build the production app :

cargo tauri android build

to debug the Svelte app, use Chrome :

iOS

First, make sure Xcode is properly installed. then :

rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim

to launch the dev app :

cargo tauri ios dev

to build the production app :

cargo tauri ios build