{"id":16410519,"url":"https://github.com/ralpha/dfhack_rust_plugin","last_synced_at":"2026-02-06T20:03:31.096Z","repository":{"id":81807102,"uuid":"261059350","full_name":"ralpha/DFHack_Rust_plugin","owner":"ralpha","description":"Proof of concept DFHack plugin in Rust","archived":false,"fork":false,"pushed_at":"2020-05-04T02:06:01.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-27T15:53:32.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CMake","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/ralpha.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}},"created_at":"2020-05-04T01:58:12.000Z","updated_at":"2025-04-05T10:15:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f357991-eeb1-4511-b034-030231399242","html_url":"https://github.com/ralpha/DFHack_Rust_plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ralpha/DFHack_Rust_plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralpha%2FDFHack_Rust_plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralpha%2FDFHack_Rust_plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralpha%2FDFHack_Rust_plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralpha%2FDFHack_Rust_plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ralpha","download_url":"https://codeload.github.com/ralpha/DFHack_Rust_plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralpha%2FDFHack_Rust_plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29174352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T19:56:27.068Z","status":"ssl_error","status_checked_at":"2026-02-06T19:56:18.934Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-11T06:43:10.433Z","updated_at":"2026-02-06T20:03:31.083Z","avatar_url":"https://github.com/ralpha.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust in DFHack\n\nThis is an example project to show that Rust can be used in the [DFHack](https://github.com/DFHack/dfhack) C++ codebase.\nThis project is a plugin for DFHack.\n\nOutput from plugin:\n```\n[DFHack]# hellorust\nHello World from C++\nFrom rust: Hello World, Rust here!!\nFrom rust: 17\n[DFHack]#\n```\n\n# Build\n\nStep 1: Add or link the whole content of the repo in the `DFHack/dfhack/plugins` folder of you dfhack source code.\n![Showing the `DFHack_Rust_plugin` folder next to the `diggingInvaders` folder and others](https://i.imgur.com/L7w1GaR.png)\n\nStep 2: Edit the `CMakeLists.custom.txt` file and add the line: `add_subdirectory(DFHack_Rust_plugin)` at the end.\nThis is the name of the folder. It will find the `CMakeLists.txt` file in that folder.\n\nStep 3: Build DFhack as you always do. For example:\n```\ncd ./build\ncmake .. -G Ninja -DCMAKE_BUILD_TYPE:string=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=../../df_linux_0.47.04;\nninja install\n```\nMore info about compiling DFHack: https://docs.dfhack.org/en/stable/docs/Compile.html\n\nStep 4: Execute dfhack so it opens dwarf fortress. Example `./dfhack`\n\nStep 5: Run in the DFHack terminal: `hellorust`\nIt should output this:\n```\n[DFHack]# hellorust\nHello World from C++\nFrom rust: Hello World, Rust here!!\nFrom rust: 17\n[DFHack]#\n```\n\nIt works :)\n\n# Troubleshooting\nIf you change the Rust code it might, as it did for me not recompile if there are changes make to the files.\nYou might have to recompile rust yourself.\nMove to the `dfplugin_test` folder and use `cargo build` and `cargo build --release` to update the dev and release build.\nIf that does not work try: `cargo build --lib` and `cargo build --lib --release`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fralpha%2Fdfhack_rust_plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fralpha%2Fdfhack_rust_plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fralpha%2Fdfhack_rust_plugin/lists"}