{"id":13763369,"url":"https://github.com/thatstoasty/gojo","last_synced_at":"2025-05-10T16:32:26.965Z","repository":{"id":218935494,"uuid":"746855593","full_name":"thatstoasty/gojo","owner":"thatstoasty","description":"Experiments in porting over Golang stdlib into Mojo.","archived":false,"fork":false,"pushed_at":"2024-12-13T19:44:23.000Z","size":2211,"stargazers_count":28,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-13T20:30:20.636Z","etag":null,"topics":["golang","mojo","mojo-lang","reader-writer","scanner"],"latest_commit_sha":null,"homepage":"","language":"Mojo","has_issues":true,"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/thatstoasty.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-01-22T20:02:49.000Z","updated_at":"2024-12-07T18:23:20.000Z","dependencies_parsed_at":"2024-02-22T23:28:20.197Z","dependency_job_id":"6679434c-4643-477d-b21a-4ec7bb573f66","html_url":"https://github.com/thatstoasty/gojo","commit_stats":null,"previous_names":["thatstoasty/gojo"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatstoasty%2Fgojo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatstoasty%2Fgojo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatstoasty%2Fgojo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatstoasty%2Fgojo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thatstoasty","download_url":"https://codeload.github.com/thatstoasty/gojo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253445799,"owners_count":21909862,"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":["golang","mojo","mojo-lang","reader-writer","scanner"],"created_at":"2024-08-03T15:00:43.390Z","updated_at":"2025-05-10T16:32:26.503Z","avatar_url":"https://github.com/thatstoasty.png","language":"Mojo","funding_links":[],"categories":["🗂️ Libraries\u003ca id='libraries'\u003e\u003c/a\u003e"],"sub_categories":["Advent of Code 2023"],"readme":"# gojo\n\nExperiments in porting over Golang stdlib into Mojo.\n\nIt will not always be a 1:1 port, it's more so code inspired by the Golang stdlib and the Mojo community's code. This is not intended to be a full port, but rather a learning exercise and a way to experiment with Mojo's capabilities. Please feel free to contribute or use this as a starting point for your own projects! The codebase will remain in flux and will evolve with Mojo as future releases are created.\n\n![Mojo Version](https://img.shields.io/badge/Mojo%F0%9F%94%A5-24.5-orange)\n![Build Status](https://github.com/thatstoasty/gojo/actions/workflows/build.yml/badge.svg)\n![Test Status](https://github.com/thatstoasty/gojo/actions/workflows/test.yml/badge.svg)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Installation\n\n1. First, you'll need to configure your `mojoproject.toml` file to include my Conda channel. Add `\"https://repo.prefix.dev/mojo-community\"` to the list of channels.\n2. Next, add `gojo` to your project's dependencies by running `magic add gojo`.\n3. Finally, run `magic install` to install in `gojo`. You should see the `.mojopkg` files in `$CONDA_PREFIX/lib/mojo/`.\n\n## What this includes\n\nAll of these packages are partially implemented and do not support unicode characters until Mojo supports them.\n\n- `bufio`\n  - `Reader`: Buffered `io.Reader`\n  - `Scanner`: Scanner interface to read data via tokens.\n- `bytes`\n  - `Buffer`: Buffer backed by `UnsafePointer[UInt8]`.\n  - `Reader`: Reader backed by `UnsafePointer[UInt8]`.\n- `io`\n  - Traits: `Reader`, `Writer`, `Seeker`, `Closer`, `ReadWriter`, `ReadCloser`, `WriteCloser`, `ReadWriteCloser`, `ReadSeeker`, `ReadSeekCloser`, `WriteSeeker`, `ReadWriteSeeker`, `ReaderFrom`, `WriterReadFrom`, `WriterTo`, `ReaderWriteTo`, `ReaderAt`, `WriterAt`, `ByteReader`, `ByteScanner`, `ByteWriter`, `StringWriter`\n  - `Reader` and `Writer` wrapper functions.\n  - `FileWrapper`: `FileHandle` Wrapper Reader/Writer\n  - `STDOUT/STDERR` Writer (leveraging `libc`).\n- `strings`\n  - `StringBuilder`: String builder for fast string concatenation.\n  - `Reader`: String reader.\n- `fmt`\n  - Basic `sprintf` function.\n- `syscall`\n  - External call wrappers for `libc` functions and types.\n- `net`\n  - `Socket`: Wraps `FileDescriptor` and implements network specific functions.\n  - `FileDescriptor`: File Descriptor wrapper that implements `io.Writer`, `io.Reader`, and `io.Closer`.\n  - `Dial` and `Listen` functions. (for TCP and UDP only atm).\n\n## Usage\n\nPlease check out the `test`, `examples`, and `benchmarks` directories for usage of the various packages!\n\n## Projects that use Gojo\n\n### My projects\n\n- `weave`: A collection of (ANSI-sequence aware) text reflow operations \u0026amp; algorithms. [Link to the project.](https://github.com/thatstoasty/weave)\n- `mog`: Terminal text styling library. [Link to the project.](https://github.com/thatstoasty/mog)\n- `stump`: Bound Logger library. [Link to the project.](https://github.com/thatstoasty/stump)\n- `prism`: CLI Library. [Link to the project.](https://github.com/thatstoasty/prism)\n\n### Community projects\n\n- `lightbug_http`: Simple and fast HTTP framework for Mojo! 🔥 [Link to the project.](https://github.com/saviorand/lightbug_http/tree/main)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatstoasty%2Fgojo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthatstoasty%2Fgojo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatstoasty%2Fgojo/lists"}