{"id":51719309,"url":"https://github.com/sanohiro/align","last_synced_at":"2026-07-17T08:04:09.874Z","repository":{"id":365595923,"uuid":"1272059504","full_name":"sanohiro/align","owner":"sanohiro","description":"A resource-oriented systems language for AI-written code that should land on fast paths by default.","archived":false,"fork":false,"pushed_at":"2026-07-17T06:59:45.000Z","size":9792,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-17T07:03:51.637Z","etag":null,"topics":["ai-codegen","aot-compiler","columnar","compiler","constrained-hardware","data-oriented-design","language-design","llvm","local-first","performance","programming-language","resource-oriented","runtime","simd","systems-programming","zero-copy"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/sanohiro.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-17T08:51:49.000Z","updated_at":"2026-07-17T06:27:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"72f2312c-36a3-4b0d-8ff4-6b537defce2b","html_url":"https://github.com/sanohiro/align","commit_stats":null,"previous_names":["sanohiro/align"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sanohiro/align","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanohiro%2Falign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanohiro%2Falign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanohiro%2Falign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanohiro%2Falign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanohiro","download_url":"https://codeload.github.com/sanohiro/align/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanohiro%2Falign/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35573737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-17T02:00:06.162Z","response_time":116,"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":["ai-codegen","aot-compiler","columnar","compiler","constrained-hardware","data-oriented-design","language-design","llvm","local-first","performance","programming-language","resource-oriented","runtime","simd","systems-programming","zero-copy"],"created_at":"2026-07-17T08:04:06.769Z","updated_at":"2026-07-17T08:04:09.868Z","avatar_url":"https://github.com/sanohiro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Align\n\n\u003e 🌐 [English](./README.md) · **日本語**\n\nAlign は AOT コンパイル方式のデータ指向プログラミング言語です。コードを書く**人間**、コードを生成する **AI**、コードを最適化する**コンパイラ**、コードを実行する**ハードウェア** —— この四者の足並みを、一度にそろえます。\n\n\u003e Less code. Predictable performance. Nothing hidden.\n\u003e (コードは少なく。性能は予測どおりに。隠し事はしない。)\n\nまだ初期段階のプロジェクトです。設計の正典は `draft.md` + `docs/` にあり、コンパイラ(`alignc`)は `crates/` 以下で Rust による実装が進んでいます。\n\n## Align を選ぶ理由\n\n- **データ指向のコア。** 配列とスライスが言語の中心です。`prices.map(with_tax).where(in_stock).sum()` と書くだけで、コンパイラはこれを中間配列のない単一ループへ融合します。素直に書いたコードがそのままきれいに最適化されるので、キャッシュにも SIMD にも優しく仕上がります。\n- **何も隠さない。** アロケーション、エラー、副作用、並列処理は、常にソースコード上に見える形で現れます。裏で起きるコピーも、例外も、勝手に立ち上がるスレッドもありません。\n- **やり方はひとつだけ。** エラーモデルはひとつ(`Result` + `?`)、オプショナルもひとつ(`Option`、null なし)、所有権モデルもひとつ(値 / `arena` / heap)、並列モデルもひとつ(`map` / `reduce` / `task_group`)。\n- **手動のメモリ管理なし、GC なし。** 所有権は型の性質であり、ライフタイムは region として推論されます —— 書く必要はありません。データを*どこに*置くか(値・`arena`・heap)を選ぶだけで、解放処理はコンパイラが挿入します。\n\n## 一例\n\n```align\nItem { price: f64, active: bool }\n\nfn with_tax(p: f64) -\u003e f64 = p * 1.08\n\nfn main() -\u003e i32 {\n    items := [\n        Item { price: 100.0, active: true },\n        Item { price: 50.0,  active: false },\n        Item { price: 200.0, active: true },\n    ]\n    total := items.where(.active).price.map(with_tax).sum()  // one fused loop, no temporaries\n    print(total)                                             // 324.0\n    return 0\n}\n```\n\n## Align を学ぶ\n\n言語に初めて触れる方は、まずガイドから始めてください。Align で考え、書くための実践的な入門です。\n\n**[チュートリアル(日本語)](docs/guide/ja/README.md)** · **[Tutorial (English)](docs/guide/README.md)**\n\n問題を解きながら学ぶ方には **[The Little Aligner(日本語)](docs/little-aligner/ja/README.md)**([English](docs/little-aligner/README.md))がおすすめです。*The Little Schemer* のスタイルで、同じイディオムを Q\u0026A 形式のワークブックとして学べます。\n\n## ビルドと実行\n\n```sh\ncargo build\ncargo test\ncargo run --bin alignc -- run examples/arena.align     # arena + heap box; exits 42\ncargo run --bin alignc -- run examples/pipeline.align  # fused map/where/sum; exits 24\n```\n\n日常的に使うコマンドは `check`、`fmt`、`build`、`run` です。検査・ビルド制御用には `check-per-unit`、`emit-interface`、`emit-mir`、`emit-llvm`、`emit-obj`、`explain-opt`、`size`、`cache clear` があり、`alignc --version` でコンパイラのバージョンを確認できます。複数ファイルの codegen は既定で並列かつ cache され、production build では `--rt-lto`、`--thin-lto`、instrumented PGO を明示的に選べます。\n\n**ソースからビルドする場合の必要環境:** Rust 1.96 以上、LLVM 22 (`llvm-config-22` が `PATH` 上にあること)、リンク用の C コンパイラ(`cc`)。圧縮、暗号、HTTP を使うプログラムには zlib、zstd、OpenSSL の開発ライブラリも必要です。暗号機能の大半は OpenSSL 3.0 で動きますが、`crypto.argon2id` には OpenSSL 3.2 以上が必要で、その provider がない環境では engine error を返します。\n\n## リリース版のインストール\n\n以下のコマンドは、最初の配布リリースとリポジトリ設定が完了した後に利用できます。それまではソースからビルドしてください。\n\nmacOS Apple Silicon (Homebrew):\n\n```sh\nbrew tap sanohiro/align\nbrew install align\n```\n\nUbuntu 24.04、x86_64 または ARM64 (署名付き apt リポジトリ):\n\n```sh\ncurl -fsSL https://sanohiro.github.io/align/install.sh | sudo sh\nsudo apt install alignc\n```\n\n各 GitHub リリースにはアーカイブと `.deb` も添付されます。生のアーカイブを使う場合は、`alignc` と対応する `libalign_runtime.a` を同じ場所に保つ必要があります。`alignc` は LLVM 22 を動的に利用し、システムの C リンカーを呼び出すため、完全な静的バイナリではなく、ツールチェーン依存を明示したネイティブパッケージとして配布します。\n\n## ステータス\n\nまだ初期段階ですが、パイプラインは端から端まで動きます(`lexer → parser → sema → MIR → LLVM → native`)。関数と制御フロー、構造体、プリミティブ型のフルセット、`?` を伴う `Option`/`Result`、move・エスケープチェック付きの `arena`/`box`、融合された配列パイプライン、文字列と `json`、SIMD(`vecN`/`soa`/`group_by`)、実スレッド上の `par_map`/`task_group`、`unsafe`/FFI、そして拡充中の標準ライブラリ(`io`/`fs`/`path`/`env`/`time`/`encoding`/`rand`/`cli`/`net`/`process`/`compress`/`crypto`/`http`)まで揃っています。マイルストーンの詳細は `docs/impl/07-roadmap.md` を参照してください。\n\n## パフォーマンスと移植性\n\nデフォルトのビルドは、**安全で移植性の高いアーキテクチャ別ベースライン**(amd64 では `x86-64-v2`、arm64 では `armv8-a`/NEON)を使います。そのため、混在したクラウドフリート上でも1つのバイナリで動きます。より攻めたターゲットは**オプトインであり、決してデフォルトにはなりません** —— ホスト固有のビルドなら `--target-cpu native`、移植可能な AVX2/FMA 帯なら `x86-64-v3` を指定します。多様なフリート全体で広い SIMD を活かすのは、ベースラインを引き上げることではなく、ライブラリ側の実行時 CPU 機能ディスパッチによって実現する方針です。詳しくは `draft.md` §3.4 と `docs/open-questions.md`(「Build targets \u0026 portability」)を参照してください。\n\n## レイアウト\n\n- `draft.md` —— 言語仕様の正典\n- `docs/guide/` —— 実践的なチュートリアル、全19章(`00`〜`18`、英語 + 日本語)\n- `docs/little-aligner/` —— *The Little Schemer* スタイルの Q\u0026A ドリル・ワークブック(英語 + 日本語)\n- `docs/` —— 設計の根拠、経緯、非目標、未解決の論点\n- `docs/impl/` —— コンパイラ実装計画 + 標準ライブラリのモジュール設計仕様\n- `editors/` —— Vim / Emacs / VS Code 対応(シンタックスハイライト、スニペット)\n- `crates/` —— `alignc` コンパイラのワークスペース\n\n## ライセンス\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanohiro%2Falign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanohiro%2Falign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanohiro%2Falign/lists"}