Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
for i in src/parser/cxx/*.cc src/lsp/cxx/lsp/*.cc src/frontend/cxx/*.cc; do
echo "Parsing $i"
./build/src/frontend/cxx \
-fno-check \
-I src/parser \
-I src/lsp \
-I build/_deps/utfcpp-src/source \
Expand All @@ -52,6 +53,7 @@ jobs:
for i in src/parser/cxx/*.cc src/lsp/cxx/lsp/*.cc src/frontend/cxx/*.cc; do
echo "Parsing $i"
./build/src/frontend/cxx \
-fno-check \
-toolchain linux \
-I src/parser \
-I src/lsp \
Expand Down Expand Up @@ -143,7 +145,7 @@ jobs:

- name: Install dependencies
run: |
npm ci
npm ci --ignore-scripts

- name: Download MLIR
run: |
Expand Down Expand Up @@ -208,6 +210,7 @@ jobs:
for i in src/parser/cxx/*.cc src/lsp/cxx/lsp/*.cc src/frontend/cxx/*.cc; do
echo "Parsing $i"
./build/src/frontend/cxx \
-fno-check \
-toolchain macos \
-I src/parser \
-I src/lsp \
Expand All @@ -229,7 +232,7 @@ jobs:

- name: Build
run: |
npm ci
npm ci --ignore-scripts
npm run build:wasi

- name: Install wasmtime
Expand All @@ -243,7 +246,7 @@ jobs:
-W threads=y -S threads=y \
--dir ${{github.workspace}}/build.wasi/install::/ \
--dir tests::tests \
${{github.workspace}}/build.wasi/install/usr/bin/cxx.wasm -v tests/manual/source.cc
${{github.workspace}}/build.wasi/install/usr/bin/cxx.wasm -fno-check -v tests/manual/source.cc

- name: Parse C++ source files (wasmtime runtime)
run: |
Expand All @@ -259,6 +262,7 @@ jobs:
--dir=build.wasi/src/lsp::build.wasi/src/lsp \
--dir=build.wasi/install/usr::/usr \
build.wasi/install/usr/bin/cxx.wasm \
-fno-check \
-I src/parser \
-I src/lsp \
-I build.wasi/_deps/utfcpp-src/source \
Expand Down Expand Up @@ -297,7 +301,7 @@ jobs:

- name: Build
run: |
npm ci
npm ci --ignore-scripts
npm run build -w @robertoraggi/cxx-playground -- --base /cplusplus
mkdir -p packages/cxx-playground/dist/docs
cp -a packages/cxx-frontend/docs/. packages/cxx-playground/dist/docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mlir.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- name: Install dependencies
run: |
npm ci
npm ci --ignore-scripts

- name: Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Build
run: |
npm ci
npm ci --ignore-scripts
npm -w cxx-frontend run build

- name: Publish
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ uv sync && source .venv/bin/activate
configure the source code

```sh
cmake --preset default
cmake --preset default-mlir -DCMAKE_PREFIX_PATH=<path to llvm>
```

build
Expand All @@ -54,10 +54,10 @@ cd build
ctest --progress
```

Dump the AST to stdout
Disable the type checker and dump the AST to stdout

```sh
./build/src/frontend/cxx tests/manual/source.cc -ast-dump
./build/src/frontend/cxx -fno-check -ast-dump tests/manual/source.cc
```

## Build the npm package (requires docker)
Expand All @@ -71,13 +71,15 @@ npm ci
compile WASM and TypeScript code

```sh
npm ci --ignore-scripts
npm run download-mlir # requires gh cli tool
npm run build:cxx-frontend
```

## Build for WASM/WASI (requires docker)

```sh
npm ci
npm ci --ignore-scripts
npm run build:wasi
```

Expand Down
Loading
Loading