Document
WAMR on GitHubWAMR Blogs
  • WAMR Document Home Page
  • Basics
    • Introduction
      • WebAssembly
      • WAMR Project
      • Security Feature
    • Getting Started
      • Host Environment Preparation
      • Hello-world Program On Host
      • Docker Environment Preparation
      • Hello-world Program On Docker
      • Build And Run WASM Application
        • More Tools To Create WASM Application
  • WAMR In Practice
    • Tutorial
      • WAMR Running Modes
      • Build Tutorial
        • Build iwasm
        • Build wamrc
      • Language Embedding
        • C/C++
        • Python
        • Go
      • Debugging & IDE Support
        • WAMR Source Debugging With LLDB
        • VS Code Support
          • Enable Debugging In VS Code
          • Move LLDB Binaries
    • Advance Tutorial
      • Performance Test
        • PolyBench
        • CoreMark
        • Sightglass
        • JetStream2
      • Memory Usage Tunning
      • Application Framework
      • Remote Application Management
        • Example 1: Install/Uninstall WASM App Remotely
        • Example 2: IoT App Store Demo
      • WAMR Porting Guide
    • Features
      • Export Native APIs To WASM Applications
        • Example 1: Export C Functions to WASM
        • Example 2: Using "native-lib"
      • Multiple Modules As Dependencies
        • Multi-modules Example
      • Multi-thread, Pthread APIs And Thread Management
        • Multi-thread Example
      • Linux SGX(Intel Software Guard Extension) Support
      • Linux SGX Remote Attestation
      • XIP(Execution In Place) Support
      • Socket Support
        • Example: Use Socket Api in WAMR
      • Post-MVP Features
        • WASM C API
        • 128-bit SIMD
        • Reference Types
    • More Examples
      • File Interaction Of WASI
      • GUI Example
        • Littlevgl
        • LVGL
      • Same WASM Program Executing Concurrently
      • Build And Run Workload
    • User Case
  • Programmer's Manual
    • Programmer's Manual
      • C API Lists
  • Community
    • How To Contribute
    • WAMR On Github
    • WAMR Blogs
  • Appendix
    • Appendix A. Background Knowledge And Glossary Of Terms
    • Appendix B. WebAssembly Details
    • Appendix C. Complete WAMR Guide
Powered by GitBook
On this page
  1. Basics
  2. Getting Started

Host Environment Preparation

Ubuntu

First, install the needed packages and libraries.

apt-get update \
  && apt-get install -y apt-transport-https apt-utils build-essential \
  ca-certificates curl g++-multilib git gnupg \
  libgcc-9-dev lib32gcc-9-dev lsb-release \
  ninja-build ocaml ocamlbuild python2.7 \
  software-properties-common tree tzdata \
  unzip valgrind vim wget zip --no-install-recommends

Then install CMake and wasi-sdk-16.0

wget --progress=dot:giga -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg > /dev/null \
  && echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null \
  && apt-get update \
  && rm /usr/share/keyrings/kitware-archive-keyring.gpg \
  && apt-get install -y kitware-archive-keyring --no-install-recommends \
  && apt-get install -y cmake --no-install-recommends 

wget -c --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-16/wasi-sdk-16.0-linux.tar.gz -P /opt \
  && tar xf /opt/wasi-sdk-16.0-linux.tar.gz -C /opt \
  && ln -fs /opt/wasi-sdk-16.0 /opt/wasi-sdk \
  && rm /opt/wasi-sdk-16.0-linux.tar.gz

This should be sufficient to build WAMR and run our hello world program.

PreviousGetting StartedNextHello-world Program On Host

Last updated 11 months ago