Skip to content

dev env of C/C++, emscripten, WABT, meson with VScode

Notifications You must be signed in to change notification settings

Cartman0/vsc-c-em-wabt-meson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vsc-c-em-wabt-meson

Docker Iamge for development environment of C/C++, Emscripten, WABT and Meson on Dcoker and VSCode RemoteContainer

Image info

installed packages/tools

  • gcc/clang
  • llvm/lld
  • emscripten
    • Node.js installed with emscripten
  • WABT (wasm2wat, etc)
  • Meson(building tool)
    • ninja-builld
  • python3, python3-pip (for installing Meson)

VScode Extensions

Installation

On local env's terminal(e.g. windows):

$ git clone https://github.com/Cartman0/vsc-c-em-wabt-meson.git
$ cd vsc-c-em-wabt-meson
$ code .
  1. Click "Remote Container" on LeftBottom in VSCode.
  2. "Reopen in Container" or "Open Folder in Container"

Example: How to switch compiler and linker on Meson to clang and lld(ld.lld)

graph BT
    subgraph "--native-file native_clang.ini"
        c["c: clang"]
        cld["c_ld: lld(ld.lld)"]
        subgraph "default native"
            c_d["c: gcc"]
            cld_d["c_ld: ld"]
        end
        c_d -..-> c
        cld_d -..-> cld
    end
Loading

create native_clang.ini:

[binaries]
c='clang'
c_ld='lld'
cpp='clang++'
cpp_ld='lld'

meson setup <build dir> <source dir> --native-file native_clang.ini on termial:

$ meson setup build_c/build build_c --native-file build_c/native_clang.ini

result:

result clang

meson have been able to switched to clang and lld as bellow:

C compiler for the host machine: clang (clang 15.0.0 "clang version 15.0.0 (https://github.com/llvm/llvm-project fbce4a78035c32792b0a13cf1f169048b822c06b)")
C linker for the host machine: clang ld.lld 11.0.1

TIPS

About

dev env of C/C++, emscripten, WABT, meson with VScode

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published