{"id":33935959,"url":"https://github.com/qixinynan/libloader","last_synced_at":"2026-03-11T04:31:09.800Z","repository":{"id":59149614,"uuid":"535587150","full_name":"qixinynan/libloader","owner":"qixinynan","description":"A easy-to-use dll loader for rust that based on libloading ","archived":false,"fork":false,"pushed_at":"2022-09-12T13:23:09.000Z","size":2987,"stargazers_count":27,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-13T20:57:44.564Z","etag":null,"topics":["rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/libloader","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/qixinynan.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}},"created_at":"2022-09-12T09:06:08.000Z","updated_at":"2025-07-11T19:08:09.000Z","dependencies_parsed_at":"2023-01-18T04:45:30.707Z","dependency_job_id":null,"html_url":"https://github.com/qixinynan/libloader","commit_stats":null,"previous_names":["qixinies/libloader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qixinynan/libloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qixinynan%2Flibloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qixinynan%2Flibloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qixinynan%2Flibloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qixinynan%2Flibloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qixinynan","download_url":"https://codeload.github.com/qixinynan/libloader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qixinynan%2Flibloader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30370797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"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":["rust"],"created_at":"2025-12-12T14:03:29.486Z","updated_at":"2026-03-11T04:31:09.275Z","avatar_url":"https://github.com/qixinynan.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eWelcome to libloader 👋\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Version\" src=\"https://img.shields.io/badge/version-0.1.4-blue.svg?cacheSeconds=2592000\" style=\"display:inline-block\" /\u003e\n  \u003ca href=\"\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" /\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/libloader\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/on-crates.io-green.svg\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e libloader is a easy-to-use DLL loader for rust that based on libloading\n\nIt is very easy to dynamically call a function from dynamic link library (DLL files for Windows, so files for Unix/Linux dylib for macOS )\n\nUse this function to get the function from DLL\n\n```rust\nget_libfn!(\n    \"path.dll\",\n    \"func_name\",\n    name_to_call,\n    return_type, // ifreturn type is none, use \"()\" instead\n    param1_name: param1_type\n    param2_name: param2_type\n    param3_name: param3_type\n    ...\n);\n```\n\nFor example, We have these functions from libstd.dylib\n\n```rust\n// lib.rs （compiled into libstd.dylib)\n#[no_mangle]\npub fn println(str: \u0026str) {\n    println!(\"{}\", str);\n}\n\n#[no_mangle]\npub fn add(a: usize, b: usize) -\u003e usize {\n    a + b\n}\n\n#[no_mangle]\npub fn print_hello() {\n    println!(\"Hello\");\n}\n\n```\n\nWe can call it with:\n\n```rust\n// main.rs\nuse libloader::libloading\nfn main() {\n    get_libfn!(\"libstd.dylib\", \"println\", my_println, (), str: \u0026str);\n    my_println(\"Hello World\");\n\n    get_libfn!(\"libstd.dylib\", \"add\", my_add, usize, a: usize, b: usize);\n    println!(\"10 + 20 = {}\", my_add(10, 20));\n\n    get_libfn!(\"libstd.dylib\", \"print_hello\", my_print_hello, ());\n    my_print_hello();\n}\n```\n\nThe output is:\n```\nHello World\n10 + 20 = 30\nhello\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqixinynan%2Flibloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqixinynan%2Flibloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqixinynan%2Flibloader/lists"}