{"id":13682451,"url":"https://github.com/pure-c/purec","last_synced_at":"2025-04-30T09:32:38.510Z","repository":{"id":54280384,"uuid":"144087131","full_name":"pure-c/purec","owner":"pure-c","description":"C backend for PureScript","archived":false,"fork":false,"pushed_at":"2021-02-27T00:31:11.000Z","size":874,"stargazers_count":231,"open_issues_count":15,"forks_count":8,"subscribers_count":15,"default_branch":"next","last_synced_at":"2024-08-02T13:34:09.284Z","etag":null,"topics":["backends","c","clang","functional-programming","native","programming-language","purescript"],"latest_commit_sha":null,"homepage":"","language":"PureScript","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/pure-c.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"licenses/BSD-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-09T01:41:36.000Z","updated_at":"2024-05-08T13:32:26.000Z","dependencies_parsed_at":"2022-08-13T10:50:39.160Z","dependency_job_id":null,"html_url":"https://github.com/pure-c/purec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pure-c%2Fpurec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pure-c%2Fpurec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pure-c%2Fpurec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pure-c%2Fpurec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pure-c","download_url":"https://codeload.github.com/pure-c/purec/tar.gz/refs/heads/next","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224206072,"owners_count":17273383,"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":["backends","c","clang","functional-programming","native","programming-language","purescript"],"created_at":"2024-08-02T13:01:46.202Z","updated_at":"2024-11-12T02:30:43.302Z","avatar_url":"https://github.com/pure-c.png","language":"PureScript","funding_links":[],"categories":["PureScript"],"sub_categories":[],"readme":"# Pure-C\n\nAn alternative backend for the PureScript programming language that targets C.\n\n## Introduction\n\nPureScript is a high-level, statically typed, functionally pure programming\nlanguage that enables various backends using its intermediate representation of\nelaborated programs.\n\nPureC provides a backend that transpiles to the C programming language, thus\nenabling native, ahead-of-time compilation of PureScript programs. With a dead\nsimple FFI to C, performance critical sections can easily be implemented outside\nof PureScript when the need arises.\n\nFor an example of how PureC could be used, take a look at\n[purec-uv](https://github.com/pure-c/purec-uv), a project implementing both\npurescript-aff and bindings to libuv on top of PureC.\n\n## Features\n\n* Write native programs in PureScript\n* Simple FFI to C\n* Generates readable, human- and machine-debuggable C\n* Simple and efficient reference counted GC\n* Opt-in tracing GC (Boehm–Demers–Weiser garbage collector)\n\n## Usecases\n\n* Scrap your node.js\n* Write small, easy to distribute command line utilities\n* No JS parsing, instant start up times, native performance\n\n## Development\n\nThese instructions will get you a copy of the project up and running on your\nlocal machine for development and testing purposes.\n\nFor now, the default makefiles use the clang compiler toolchain. So either\ninstall clang (if not installed already), or open a PR adding support for other\ncompilers.\n\n### Prerequisites\n\nPureC is written in PureScript and currently not self-hoisting; A full node.js\nruntime is required. With node.js installed (any recent version will work)\ninstall the node.js dependencies to build purec.js: `npm install`.\n\nAdditionally, we require\n\n* make\n* libcmocka-dev\n* valgrind\n\n## Build the purec utility\n\nRun `npm run build` to build the purec.js utility.\n\n## Running the tests\n\n```\nnpm t\n```\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](#) for details on our code of\nconduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nThis project is alpha quality and will likely remain alpha quality for a while.\nThat means for now there's one version, and that's `origin/HEAD`.\n\n## Authors\n\n* **Felix Schlitter** - *Initial work* - [felixschl](https://github.com/felixschl)\n\nSee also the list of [contributors](https://github.com/pure-c/pure-c/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n## Acknowledgments\n\n* [uthash](https://github.com/troydhanson/uthash) - A hash table for C structures\n* [vec](https://github.com/rxi/vec) - A type-safe dynamic array implementation for C\n* [ccan](https://github.com/rustyrussell/ccan) - The C Code Archive Network\n* [purescript-native](https://github.com/andyarvanitis/purescript-native) - An experimental C++11/native compiler backend for PureScript\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpure-c%2Fpurec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpure-c%2Fpurec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpure-c%2Fpurec/lists"}