{"id":18894111,"url":"https://github.com/trailofbits/pasta","last_synced_at":"2025-04-16T06:14:28.173Z","repository":{"id":60328456,"uuid":"287367910","full_name":"trailofbits/pasta","owner":"trailofbits","description":"Peter's Amazing Syntax Tree Analyzer","archived":false,"fork":false,"pushed_at":"2024-09-24T02:08:55.000Z","size":7578,"stargazers_count":129,"open_issues_count":18,"forks_count":9,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-03-29T05:05:42.464Z","etag":null,"topics":["ast","clang","compiler","llvm","static-analysis"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trailofbits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-13T19:52:42.000Z","updated_at":"2025-03-02T17:00:28.000Z","dependencies_parsed_at":"2024-01-10T20:03:52.598Z","dependency_job_id":"8997e26f-517a-455a-9b9a-af76954d3172","html_url":"https://github.com/trailofbits/pasta","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Fpasta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Fpasta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Fpasta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Fpasta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trailofbits","download_url":"https://codeload.github.com/trailofbits/pasta/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249207202,"owners_count":21230028,"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":["ast","clang","compiler","llvm","static-analysis"],"created_at":"2024-11-08T08:18:06.734Z","updated_at":"2025-04-16T06:14:28.126Z","avatar_url":"https://github.com/trailofbits.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PASTA\n\nPASTA is a C++ library that abstracts the Clang compiler toolchain, and provides\ndetailed access to compilation artifacts using APIs that mirror those available in Clang. PASTA\ntries to achieve the following goals:\n\n  * Provide a baseline set of APIs that is relatively stable and does not require someone to\n    actually depend directly on Clang headers/libraries, thus enabling a substantially\n    easier distribution model.\n    \n  * Properly manage memory for all objects provided through the API. One should not have to\n    worry about object lifetimes when using PASTA.\n    \n  * Provide additional information/access. Native Clang APIs do not provide detailed token information\n    of any kind. One cannot ask for the tokens associated with an AST node, for example. PASTA attempts\n    to resolve this, among other similar issues.\n\n## Getting and Building the Code\n\nFirst, update aptitude and get install the baseline dependencies such is for\nexample `git`, `cmake`, `ninja` and your compiler of choice (remember it needs to support\nC++20). It is useful to use the same compiler at every subset to avoid some\nname mangling problems. If you're using macOS then we recommend installing\nHomebrew, and ensuring that you have Python 3.9 installed, along with an\nup-to-date `cmake` and `ninja`.\n\n### PASTA\n\nAnd finally to build PASTA itself.\n\n#### On Linux\n```shell\ngit clone https://github.com/trailofbits/pasta.git\nmkdir -p pasta-build\ncd pasta-build\ncmake \\\n    -DCMAKE_BUILD_TYPE=Release \\\n    -DPASTA_ENABLE_INSTALL=ON \\\n    -GNinja \\\n    ../pasta\nninja install\n```\n\n#### On macOS\n\nOn macOS, you may need to manually specify the Clang compiler. You can't, however,\njust specify `clang` or `clang++`, because then vcpkg will try to take over and produce\nunusual results. Therefore, you should give the absolute path to your Clang.\n\n```shell\ngit clone https://github.com/trailofbits/pasta.git\nmkdir -p pasta-build\ncd pasta-build\ncmake \\\n    -DCMAKE_BUILD_TYPE=Release \\\n    -DCMAKE_C_COMPILER=`which clang` \\\n    -DCMAKE_CXX_COMPILER=`which clang++` \\\n    -DPASTA_ENABLE_INSTALL=ON \\\n    -GNinja \\\n    ../pasta\nninja install\n```\n\n# License\n\nPASTA is licensed according to the [Apache 2.0](LICENSE) license. Large parts of PASTA are semi-autogenerated from Clang APIs. Clang is also licensed under Apache 2.0, with [LLVM exceptions](https://github.com/llvm/llvm-project/blob/main/clang/LICENSE.TXT).\n\nThis research was developed with funding from the Defense Advanced Research Projects Agency (DARPA). The views, opinions and/or findings expressed are those of the author and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government.\n \nDistribution Statement A – Approved for Public Release, Distribution Unlimited\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailofbits%2Fpasta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrailofbits%2Fpasta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailofbits%2Fpasta/lists"}