Skip to content

doc: how to compile wasm-dpp with debug logs #8

@coolaj86

Description

@coolaj86

Requirements

  • 4GB of RAM worked for me
  • 5GB of space for compiling (probably more with temp files)
    2.6G    /home/app/.rustup
    1.9G    /home/app/platform
    

Process

  1. Update to UTF-8 (for yarn animations and such)
    sudo locale-gen en_US.UTF-8
    sudo update-locale LANGE=en_US.UTF-8
  2. Install various C++ and llvm build tools (not sure why)
    (the build-essential meta package is probably overkill, but I didn't want to deal with each)
    sudo apt-get install -y build-essential libssl-dev pkg-config clang cmake llvm
    # OR
    # apk add alpine-sdk
  3. Install Node @ v22 (current LTS) and Rust
    curl https://webi.sh/node@v22 | sh
    curl https://webi.sh/rust | sh
    
    source ~/.config/envman/PATH.env
  4. Clone and build wasm-dpp
    git clone --depth=1 --branch=master https://github.com/dashevo/platform
    cd ./platform/packages/wasm-dpp/
    
    # may "hang" for minutes before first output
    # IMPORTANT: the necessary version may change
    cargo install -f wasm-bindgen-cli --version 0.2.99
    corepack enable
    yarn install --immutable
    yarn build
  5. TODO how to use it???
  6. ./platform/packages/dapi-grpc/protos/platform/v0/platform.proto

Versions

cat /etc/issue

Ubuntu 24.04 LTS \n \l
node --version

v22.14.0
cargo --version

cargo 1.83.0 (5ffbef321 2024-10-29)
rustc --version

rustc 1.83.0 (90b35a623 2024-11-26)
pkg-config --version

1.8.1
cmake --version
cmake version 3.28.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
clang --version

Ubuntu clang version 18.1.3 (1ubuntu1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
make --version

GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
gcc --version

gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions