{"id":51567648,"url":"https://github.com/kassane/rust-mos-examples","last_synced_at":"2026-07-10T16:01:49.060Z","repository":{"id":368474423,"uuid":"1264314242","full_name":"kassane/rust-mos-examples","owner":"kassane","description":"Using rust + llvm-mos-sdk on some examples ","archived":false,"fork":false,"pushed_at":"2026-06-30T19:23:13.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-30T19:23:47.758Z","etag":null,"topics":["6502","c64","llvm","llvm-mos","mega65","nesdev","rust","rust-mos","snes"],"latest_commit_sha":null,"homepage":"https://llvm-mos.org/wiki/Rust","language":"Rust","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/kassane.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":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-09T19:12:35.000Z","updated_at":"2026-06-30T19:23:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kassane/rust-mos-examples","commit_stats":null,"previous_names":["kassane/rust-mos-examples"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kassane/rust-mos-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Frust-mos-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Frust-mos-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Frust-mos-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Frust-mos-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kassane","download_url":"https://codeload.github.com/kassane/rust-mos-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Frust-mos-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35335898,"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-10T02:00:06.465Z","response_time":60,"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":["6502","c64","llvm","llvm-mos","mega65","nesdev","rust","rust-mos","snes"],"created_at":"2026-07-10T16:01:43.911Z","updated_at":"2026-07-10T16:01:49.034Z","avatar_url":"https://github.com/kassane.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust-mos-examples\n\nRust examples targeting MOS 6502/65816 platforms via [llvm-mos-sdk](https://github.com/llvm-mos/llvm-mos-sdk).\n\n## Requirements\n\n- [rust-mos](https://github.com/kassane/rust-mos-examples/releases) — Rust toolchain with LLVM-MOS backend.\n- [llvm-mos-sdk](https://github.com/llvm-mos/llvm-mos-sdk/releases) v23.x\n\n\u003e [!IMPORTANT]\n\u003e Both toolchains are LLVM 23 based to LTO.\n\n## Building\n\nCargo build with `-Zbuild-std -Zunstable-options -Zjson-target-spec` (RUSTC_BOOTSTRAP=1 required).\n\nOutput extensions are set per-platform via `exe-suffix` in the target JSON:\n\n| Platform | Extension | Example output |\n|----------|-----------|---------------|\n| NES      | `.nes`    | `target/mos-nes-nrom-none/release/nes-nrom-hello.nes` |\n| SNES     | `.sfc`    | `target/mos-snes-none/release/snes-hello.sfc` |\n| C64      | `.prg`    | `target/mos-c64-none/release/hello.prg` |\n| MEGA65   | `.prg`    | `target/mos-mega65-none/release/mega65-hello.prg` |\n| SIM      | (none)    | `target/mos-sim-none/release/hello` (host-format ELF) |\n\n#### NES NROM\n\n```console\nRUSTFLAGS=\"-Clink-arg=-flto -Clink-arg=-Wl,-u,main -Clink-arg=-Qunused-arguments -A linker_messages\" cargo build \\\n  --target targets/mos-nes-nrom-none.json \\\n  -Zbuild-std -Zunstable-options -Zjson-target-spec \\\n  --release -p demo-nes --bin nes-nrom-hello\n```\n#### MEGA65\n\n```console\nRUSTFLAGS=\"-Clink-arg=-flto -Clink-arg=-Wl,-u,main -Clink-arg=-Qunused-arguments -A linker_messages\" cargo build \\\n  --target targets/mos-mega65-none.json \\\n  -Zbuild-std -Zunstable-options -Zjson-target-spec \\\n  --release -p demo-mega65\n```\n\n#### C64\n\n```console\nRUSTFLAGS=\"-Clink-arg=-flto -Clink-arg=-Wl,-u,main -Clink-arg=-Qunused-arguments -A linker_messages\" cargo build \\\n  --target targets/mos-c64-none.json \\\n  -Zbuild-std -Zunstable-options -Zjson-target-spec \\\n  --release -p demo-c64\n```\n\n#### SNES LoROM\n\n```console\ncargo build --target targets/mos-snes-none.json \\\n  -Zbuild-std -Zunstable-options -Zjson-target-spec \\\n  --release -p demo-snes --bin snes-hello\n```\n\n## References\n\n- [zig-mos-examples](https://github.com/kassane/zig-mos-examples) - examples based\n- [mrk-its/rust-mos](https://github.com/mrk-its/rust-mos) v1.87 [old - no asm-inline support] - this project uses v1.98-dev!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkassane%2Frust-mos-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkassane%2Frust-mos-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkassane%2Frust-mos-examples/lists"}