{"id":19190163,"url":"https://github.com/Xahau/xrpl-hooks-compiler","last_synced_at":"2025-04-20T07:34:14.609Z","repository":{"id":41359293,"uuid":"428670185","full_name":"XRPLF/xrpl-hooks-compiler","owner":"XRPLF","description":"Repository for compiler and language server logic ","archived":false,"fork":false,"pushed_at":"2024-01-19T00:57:19.000Z","size":3383,"stargazers_count":5,"open_issues_count":7,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-13T17:16:23.969Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XRPLF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-16T13:39:34.000Z","updated_at":"2024-01-12T18:24:19.000Z","dependencies_parsed_at":"2023-02-09T02:45:15.692Z","dependency_job_id":null,"html_url":"https://github.com/XRPLF/xrpl-hooks-compiler","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XRPLF%2Fxrpl-hooks-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XRPLF%2Fxrpl-hooks-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XRPLF%2Fxrpl-hooks-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XRPLF%2Fxrpl-hooks-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XRPLF","download_url":"https://codeload.github.com/XRPLF/xrpl-hooks-compiler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223822730,"owners_count":17208917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T11:33:07.019Z","updated_at":"2025-04-20T07:34:14.600Z","avatar_url":"https://github.com/XRPLF.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XRPL Hooks compiler\n\nThis repository contains build scripts for the docker image with Hooks\nC compiler and Language Server, git submodules of the projects\nactually going into the image and their web API.\n\n## Getting Started\n\nRunning `make` in this directory after checkout should produce the\nimage, but\n\n1. It must be run as root (or at least an account privileged enough to\n   build \u0026 run docker containers), and\n\n2. checking out the submodules as root writes files into the .git\n   directory that non-priviledged users cannot update,\n\nso it's recommended to split the build into 2 steps:\n\n```console\n$ make checkout\n\n# make build\n```\n\nThe final container is called `xrpl-hooks-compiler` and can be run by\nthe `run` target of Makefile in the docker directory.\n\n## Shortcuts\n\nBuilding LLVM (twice - the current setup shares LLVM repo but not the\nbuild directory between clang \u0026 clangd) takes hours, and might not\neven work on computers with less than 8GB of memory (16GB is better),\nso the LLVM binaries are maintained in releases of\n[xrpl-hooks-compiler](https://github.com/XRPLF/xrpl-hooks-compiler/).\nThese binaries can be extracted from the file bin.zip in the top-level\ndirectory, providing the results of running `make` in clang-build,\nclangd-build and cleaner-build directories, so that running the\ntop-level make `build` target can be replaced by running just the\n(default) make `build` target in the docker directory. This also\nallows skipping the checkout of the `llvm-project`, `wasi-sdk`,\n`hook-cleaner-c` and `quickjslite` submodules.\n\n## API Wrapper or compiler-api\n\nThis 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.\n\n## Developing compiler-api without building all the binaries\n\nMake sure you have Docker installed. Clone this project. Download\nlatest bin.zip file from the releases of this GitHub repository, put\nit project root and unzip:\n\n```\nunzip bin.zip\n```\n\n- CD to docker folder `cd docker`\n- Run `make compiler-api \u0026\u0026 make clangd \u0026\u0026 make wasi-sdk \u0026\u0026 make hook-cleaner \u0026\u0026 make guard-checker \u0026\u0026 make qjsc`\n- Run `docker-compose build`\n- Run `docker-compose up` or `docker-compose up -d`\n- 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXahau%2Fxrpl-hooks-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FXahau%2Fxrpl-hooks-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXahau%2Fxrpl-hooks-compiler/lists"}