Skip to content

SDK for developing Beam Confidential DeFi Applications (still work in progress)

Notifications You must be signed in to change notification settings

BeamMW/shader-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get started

  • Install shader-sdk, on Windows you should run these commands in Developer Command Prompt for VS
git clone https://github.com/BeamMW/shader-sdk.git
cd shader-sdk

On Linux and MacOS

./shade init

On Windows

shade init
  • Create envoronment valiable BEAM_SHADER_SDK=<path to shader-sdk>
  • Create envoronment valiable WASI_SDK_PREFIX=<path to wasi-sdk>. wasi-sdk should exist in shader-sdk folder after ./shade init command completion
  • Generate new shader project
mkdir new_project
cd new_project
<BEAM_SHADER_SDK>/shade create_project <project_name>

This script generate new project files where <project_name> is used for namespace, also it verifies that it compiles

  • Build project

On Linux and MacOS

cmake -G "Ninja"
      -DCMAKE_BUILD_TYPE=Release
      -DCMAKE_TOOLCHAIN_FILE=$WASI_SDK_PREFIX/share/cmake/wasi-sdk.cmake 
      -DCMAKE_SYSROOT=$WASI_SDK_PREFIX/share/wasi-sysroot
      -DWASI_SDK_PREFIX=$WASI_SDK_PREFIX
      -DCMAKE_CXX_COMPILER_FORCED=True
      -DCMAKE_C_COMPILER_FORCED=True
      .
make

On Window

  1. Open new_project folder in VS as a CMake project.
  2. Choose configuration wasm32-Release
  3. Build

Learn about shaders

About

SDK for developing Beam Confidential DeFi Applications (still work in progress)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published