Docker Iamge for development environment of C/C++, Emscripten, WABT and Meson on Dcoker and VSCode RemoteContainer
- base image: mcr.microsoft.com/vscode/devcontainers/cpp
- based on OS:Debian 11
- image size: 2.97 GB
- gcc/clang
- llvm/lld
- emscripten
- Node.js installed with emscripten
- WABT (wasm2wat, etc)
- Meson(building tool)
- ninja-builld
- python3, python3-pip (for installing Meson)
- Microsoft, "C/C++ Extension Pack",
id:
ms-vscode.cpptools-extension-pack
- WebAssembly Foundation, "WebAssembly ", id:
dtsvet.vscode-wasm
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 .
- Click "Remote Container" on LeftBottom in VSCode.
- "Reopen in Container" or "Open Folder in Container"
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
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:
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
- project's patterns how to write Meson's
meson.build
file: https://mesonbuild.com/Users.html