Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: c2wasm-api to Heroku CD
name: compiler-api to Heroku CD

on:
push:
Expand All @@ -10,7 +10,7 @@ on:
#set environment variables
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
APP_NAME: ${{ 'xrpl-c2wasm-api' }}
APP_NAME: ${{ 'xrpl-compiler-api' }}

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DS_Store
/bin
bin.zip
docker/c2wasm-api
docker/compiler-api
docker/wasi-sdk
docker/clangd
docker/hook-cleaner
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
[submodule "quickjslite"]
path = quickjslite
url = https://github.com/RichardAH/quickjslite
[submodule "c2wasm-api/clang/includes"]
path = c2wasm-api/clang/includes
url = https://github.com/Xahau/xahaud
[submodule "guard-checker"]
path = guard-checker
url = https://github.com/RichardAH/guard-checker
[submodule "compiler-api/clang/includes"]
path = compiler-api/clang/includes
url = https://github.com/Xahau/xahaud
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ checkout:
git submodule update --init --recursive hook-cleaner-c
git submodule update --init --recursive guard-checker
git submodule update --init --recursive quickjslite
git submodule update --init --recursive c2wasm-api/clang/includes
git submodule update --init --recursive compiler-api/clang/includes

bin:
mkdir $@
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ top-level make `build` target can be replaced by running just the
allows skipping the checkout of the `llvm-project`, `wasi-sdk`,
`hook-cleaner-c` and `quickjslite` submodules.

## API Wrapper or c2wasm-api
## API Wrapper or compiler-api

This project includes node.js endpoint where you can send c files and it will return compiled binary as a response. Development of this api happens under c2wasm-api folder. c2wasm-api folder contains README.md which has further information about the project.
This project includes node.js endpoint where you can send c files and it will return compiled binary as a response. Development of this api happens under compiler-api folder. compiler-api folder contains README.md which has further information about the project.

## Developing c2wasm-api without building all the binaries
## Developing compiler-api without building all the binaries

Make sure you have Docker installed. Clone this project. Download
latest bin.zip file from the releases of this GitHub repository, put
Expand All @@ -56,7 +56,7 @@ unzip bin.zip
```

- CD to docker folder `cd docker`
- Run `make c2wasm-api && make clangd && make wasi-sdk && make hook-cleaner && make guard-checker && make qjsc`
- Run `make compiler-api && make clangd && make wasi-sdk && make hook-cleaner && make guard-checker && make qjsc`
- Run `docker-compose build`
- Run `docker-compose up` or `docker-compose up -d`
- This should start server at port `:9000`, the actual compiling endpoint is this: [http://localhost:9000/api/build](localhost:9000/api/build). Note that it takes a while to start.
1 change: 0 additions & 1 deletion c2wasm-api/clang/includes
Submodule includes deleted from d17f71
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions compiler-api/clang/includes
Submodule includes added at 89cacb
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ MAINTAINER Vaclav Barta "vaclav@equilibrium.co"
RUN apk --no-cache add su-exec
COPY clangd /usr/bin
WORKDIR /app
COPY c2wasm-api/clang/includes/hook ./clang/includes
COPY c2wasm-api/package.json .
COPY c2wasm-api/yarn.lock .
COPY c2wasm-api/tsconfig.json .
COPY c2wasm-api/src ./src
COPY compiler-api/clang/includes/hook ./clang/includes
COPY compiler-api/package.json .
COPY compiler-api/yarn.lock .
COPY compiler-api/tsconfig.json .
COPY compiler-api/src ./src
COPY wasi-sdk ./clang/wasi-sdk
COPY hook-cleaner /usr/bin
COPY guard_checker /usr/bin
Expand Down
6 changes: 3 additions & 3 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MAIN_CONTAINER_TAG?=xrpl-hooks-compiler
build: dependencies
docker build -t $(MAIN_CONTAINER_TAG) .

dependencies: wasi-sdk c2wasm-api clangd hook-cleaner qjsc
dependencies: wasi-sdk compiler-api clangd hook-cleaner qjsc

run:
docker run -p 127.0.0.1:9000:9000/tcp $(MAIN_CONTAINER_TAG):latest
Expand All @@ -31,12 +31,12 @@ guard-checker: ../bin/guard_checker
cp $< .
chmod +x guard_checker

c2wasm-api: ../c2wasm-api
compiler-api: ../compiler-api
cp -LR $< .

qjsc: ../bin/qjsc
cp $< .
chmod +x qjsc

clean:
-rm -rf c2wasm-api clangd wasi-sdk hook-cleaner qjsc ../wasi-sdk.ts
-rm -rf compiler-api clangd wasi-sdk hook-cleaner qjsc ../wasi-sdk.ts
6 changes: 3 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: '3.6'
name: c2wasm-api
name: compiler-api
services:
server:
container_name: c2wasm-api
container_name: compiler-api
build: .
restart: always
ports:
- "9000:9000"
working_dir: /app
command: [ "./run.sh", "yarn", "dev" ]
volumes:
- ../c2wasm-api/src:/app/src
- ../compiler-api/src:/app/src
environment:
NODE_ENV: development
2 changes: 0 additions & 2 deletions js2wasm-cli/.env

This file was deleted.

1 change: 0 additions & 1 deletion js2wasm-cli/.env.sample

This file was deleted.

12 changes: 0 additions & 12 deletions js2wasm-cli/.eslintrc.js

This file was deleted.

12 changes: 0 additions & 12 deletions js2wasm-cli/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions js2wasm-cli/.prettierignore

This file was deleted.

45 changes: 0 additions & 45 deletions js2wasm-cli/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions js2wasm-cli/bin/cli.js

This file was deleted.

29 changes: 0 additions & 29 deletions js2wasm-cli/contracts/base.js

This file was deleted.

10 changes: 0 additions & 10 deletions js2wasm-cli/jest.config.integration.js

This file was deleted.

7 changes: 0 additions & 7 deletions js2wasm-cli/jest.config.unit.js

This file was deleted.

49 changes: 0 additions & 49 deletions js2wasm-cli/package.json

This file was deleted.

Loading
Loading