{"id":25820577,"url":"https://github.com/ghivert/brioche","last_synced_at":"2025-10-08T20:09:13.153Z","repository":{"id":279882523,"uuid":"940314158","full_name":"ghivert/brioche","owner":"ghivert","description":"Opinionated Bun's bindings for Gleam","archived":false,"fork":false,"pushed_at":"2025-09-27T18:25:30.000Z","size":193,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T20:09:11.501Z","etag":null,"topics":["bun","gleam","javascript","server","typescript","websocket"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/brioche","language":"Gleam","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghivert.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["ghivert"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"custom":null}},"created_at":"2025-02-28T00:55:21.000Z","updated_at":"2025-08-22T20:56:49.000Z","dependencies_parsed_at":"2025-02-28T09:14:12.000Z","dependency_job_id":"3bbaed27-336b-4746-9a9a-c95f362f03fa","html_url":"https://github.com/ghivert/brioche","commit_stats":null,"previous_names":["ghivert/brioche"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ghivert/brioche","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghivert%2Fbrioche","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghivert%2Fbrioche/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghivert%2Fbrioche/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghivert%2Fbrioche/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghivert","download_url":"https://codeload.github.com/ghivert/brioche/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghivert%2Fbrioche/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000681,"owners_count":26082818,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bun","gleam","javascript","server","typescript","websocket"],"created_at":"2025-02-28T09:55:38.318Z","updated_at":"2025-10-08T20:09:13.148Z","avatar_url":"https://github.com/ghivert.png","language":"Gleam","funding_links":["https://github.com/sponsors/ghivert"],"categories":["Gleam"],"sub_categories":[],"readme":"# Brioche\n\n\u003e Opinionated Gleam bindings over Bun API.\n\nBrioche fills the gap between Gleam and a part of the JavaScript ecosystem, by\nproviding easy-to-use, opinionated, gleamy bindings on Bun. Writing Gleam\nJavaScript \u0026 Bun code has never been easier, and no bindings are required for\nmain features for Bun.\n\n\u003e [!NOTE]\n\u003e\n\u003e Brioche is still not production-ready, and as such, is not in 1.x.y version!\n\u003e Brioche is used at Steerlab, but not guarantee can be provided. Use it at your\n\u003e own risk.\n\n## Opinions\n\nWhile Bun is a JavaScript runtime, Brioche does no try to provide 1:1 API.\nInstead, Brioche tries to provide idiomatic Gleam bindings on top of Bun, while\nleveraging the performance and the efficiency of the Bun runtime. Brioche takes\ninspiration in existing major Gleam packages in the ecosystem\n([`Wisp`](https://hexdocs.pm/wisp), [`Glen`](https://hexdocs.pm/glen),\n[`Pog`](https://hexdocs.pm/pog), and so on), and provides similar API for a\nunified experience across the different Gleam targets. Brioche does not try to\nsubstitute to any of those, but tries to provide an alternative to those\nsolutions if you're looking for something different.\n\nBrioche tries to use as much standard, official packages as possible from the\nGleam ecosystem, while being dependent on almost no package. Brioche is a\nbinding on top of Bun on which you can build or bring your own framework.\n\n[`Wisp`](https://hexdocs.pm/wisp) continues to be the _de facto_ default web\nserver in Gleam, and unless you know what you're doing, and you're ready to\nhandle all the JavaScript promises and asynchronicity, you should use `Wisp`\ninstead.\n\n[`Glen`](https://hexdocs.pm/glen) is also a more mature, production-ready\nframework that proved to be efficient in case you're targetting another runtime\nthat Bun. You can also use `Glen` with Brioche freely, so if any code you're\nlooking for is already using `Glen`, use it!\n\n## Getting Started\n\nGleam \u0026 Bun are required to run. Bun is the runtime for Brioche. Brioche _will\nnot_ run on anything else than Bun.\n\n### Installing Brioche\n\n```sh\n# Install brioche.\ngleam add brioche\n\n# Install the other core packages. While those are transitive dependencies, they\n# should be added in your `gleam.toml` to avoid any inconsistencies.\ngleam add gleam_javascript gleam_http gleam_fetch gleam_json\n```\n\n### Setting your `gleam.toml`\n\nSetting your `gleam.toml` with `target = \"javascript\"`, and the `[javascript]`\nsection is a simple way to use Bun without hassle. At the end, your `gleam.toml`\nshould look like this.\n\n```toml\nname = \"your_project\"\nversion = \"1.0.0\"\ntarget = \"javascript\"\n\n[javascript]\ntypescript_declarations = true\nruntime = \"bun\"\n\n[dependencies]\nbrioche = \"\u003e= 1.0.0 and \u003c 2.0.0\"\ngleam_stdlib = \"\u003e= 0.44.0 and \u003c 2.0.0\"\ngleam_javascript = \"\u003e= 1.0.0 and \u003c 2.0.0\"\ngleam_http = \"\u003e= 4.0.0 and \u003c 5.0.0\"\ngleam_fetch = \"\u003e= 1.2.0 and \u003c 2.0.0\"\ngleam_json = \"\u003e= 2.0.0 and \u003c 3.0.0\"\n\n[dev-dependencies]\ngleeunit = \"\u003e= 1.0.0 and \u003c 2.0.0\"\n```\n\n## Documentation\n\nEvery Brioche modules are documented in their own modules. Complete\ndocumentation can be found on [HexDocs](https://hexdocs.pm/brioche).\n\n## Features\n\nBrioche tries to implements all major features from Bun, with proper tests. Some\nstill remain to be implemented. To stay stable, Brioche will not implement\nexperimental features as they are subject to changes. In those cases, discretion\nis left to developer to implement missing features with the Gleam FFI. Below is\nthe list of implemented features, with their state. Any help is welcome for\nnon-implemented features.\n\n### Features already-made, documented, tested, and usable\n\n- [x] Web server, with `brioche/server`.\n- [x] Websockets, with `brioche/websocket`.\n- [x] SQL, with `brioche/sql`.\n- [x] Bun.File, with `brioche/file`.\n- [x] Bun.FileSink, with `brioche/file_sink`.\n- [x] Semver, with `brioche/semver`.\n- [x] TLS, with `brioche/tls`.\n- [x] Utils, with `brioche`.\n- [x] Hashing, with `brioche/hash`, `brioche/hash/password` \u0026\n      `brioche/hash/crypto_hasher`.\n\n### Features made, but untested\n\n- [x] S3, with `brioche/s3`.\n\n### Features remaining to implement\n\n- [ ] $ shell\n- [ ] Streams\n- [ ] SQLite\n- [ ] Child processes\n- [ ] TCP sockets\n- [ ] UDP sockets\n\n### Experimental API, waiting for stabilisation before implementation\n\n- [ ] DNS\n- [ ] Workers\n\n## Contributing\n\nAny Pull Request is welcome! Feel free to open a Pull Request with your desired\nchanges to start the discussion, or open an issue first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghivert%2Fbrioche","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghivert%2Fbrioche","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghivert%2Fbrioche/lists"}