#contract #phat #bridge #phala #blockchain #pruntime #cluster

no-std phat_js

Provide a function to call the JSDelegate in a phat contract cluster

19 releases

0.3.0 Feb 27, 2024
0.3.0-dev.0 Feb 23, 2024
0.2.8 Dec 12, 2023
0.2.5 Nov 8, 2023
0.1.1 Jun 15, 2023

#2573 in Magic Beans

Download history 46/week @ 2024-04-08 53/week @ 2024-04-15 54/week @ 2024-04-22 22/week @ 2024-04-29 62/week @ 2024-05-06 20/week @ 2024-05-13 97/week @ 2024-05-20 25/week @ 2024-05-27 18/week @ 2024-06-03 29/week @ 2024-06-10 23/week @ 2024-06-17 13/week @ 2024-06-24 9/week @ 2024-07-01 15/week @ 2024-07-08 24/week @ 2024-07-15 7/week @ 2024-07-22

55 downloads per month
Used in 2 crates

MIT license

91KB
1K SLoC

Phala Blockchain

Build

Phala Network is the offchain computing protocol, powering the decentralized execution layer for AI agents.

Native Build

Dependencies

Expand
  • System dependencies

    • Ubuntu (tested with 22.04)
    apt install -y build-essential pkg-config libssl-dev protobuf-compiler
    
    • macOS
    brew install protobuf
    
    • See here for more protobuf installation options
  • Rust

    curl https://sh.rustup.rs -sSf | sh
    
  • Substrate dependencies:

    git submodule update --init
    sh ./scripts/init.sh
    
  • LLVM 14

    wget https://apt.llvm.org/llvm.sh
    chmod +x llvm.sh
    ./llvm.sh 14
    

Build the blockchain and bridge

Make sure you have Rust and LLVM-10 installed.

Note for Mac users: you also need llvm and binutils from Homebrew or MacPort, and to add their binaries to your $PATH

Run git submodule update --init to fetch submodules before build if you haven't add option --recursive when clone code.

cargo build --release

The build script enforces LLVM-10 or newer is used. LLVM-10 is needed because of the wasm port of rust crypto library, ring. We have to compile the C code into wasm while keeping the compatibility with the current rustc.

Run

Please refer to the run scripts

Sub-pages

  • RPC: RPC documentations
  • Test: How to test the components

External Resources

Dependencies

~9–13MB
~229K SLoC