SDK for developing Beam Confidential DeFi Applications (still work in progress)
  • C++ 42.2%
  • Python 35.6%
  • CMake 20.2%
  • C 0.8%
  • Shell 0.8%
  • Other 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2022-09-28 13:46:19 +03:00
beam@9b8396a5d3 updated beam 2022-09-28 12:06:18 +03:00
cmake added shader tools and updated beam and project template 2021-09-20 13:47:25 +03:00
samples downgraded cmake version 2021-10-05 11:11:13 +03:00
scripts fixed build 2022-09-28 13:46:19 +03:00
shaderlib more new&delete overloads 2021-11-24 16:16:32 +03:00
.gitignore initial 2021-06-30 22:32:15 +03:00
.gitmodules initial 2021-06-30 22:32:15 +03:00
CMakeLists.txt fixed build 2022-09-28 13:46:19 +03:00
README.md Update README.md 2022-07-21 12:24:35 +03:00
shade minor fix 2021-12-07 08:46:02 +03:00
shade.bat fixed paths on windows 2021-10-04 18:28:39 +03:00

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