{"id":29970565,"url":"https://github.com/kyle6012/netmap-min-sys","last_synced_at":"2025-09-04T16:46:14.785Z","repository":{"id":307958537,"uuid":"1031196265","full_name":"Kyle6012/netmap-min-sys","owner":"Kyle6012","description":"low-level FFI (Foreign Function Interface) bindings to the Netmap C library","archived":false,"fork":false,"pushed_at":"2025-08-03T08:15:02.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T10:10:04.706Z","etag":null,"topics":["crates","ffi","lib","netmap","netmap-rs","rust","system"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kyle6012.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2025-08-03T08:12:48.000Z","updated_at":"2025-08-03T08:17:19.000Z","dependencies_parsed_at":"2025-08-03T10:24:15.621Z","dependency_job_id":null,"html_url":"https://github.com/Kyle6012/netmap-min-sys","commit_stats":null,"previous_names":["kyle6012/netmap-min-sys"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Kyle6012/netmap-min-sys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle6012%2Fnetmap-min-sys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle6012%2Fnetmap-min-sys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle6012%2Fnetmap-min-sys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle6012%2Fnetmap-min-sys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kyle6012","download_url":"https://codeload.github.com/Kyle6012/netmap-min-sys/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle6012%2Fnetmap-min-sys/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273641216,"owners_count":25142244,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"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":["crates","ffi","lib","netmap","netmap-rs","rust","system"],"created_at":"2025-08-04T05:39:27.174Z","updated_at":"2025-09-04T16:46:14.714Z","avatar_url":"https://github.com/Kyle6012.png","language":"Rust","readme":"# netmap-min-sys\n\nThis crate provides low-level FFI (Foreign Function Interface) bindings to the Netmap C library. Netmap is a framework for very fast packet I/O from userspace.\n\n`netmap-min-sys` is a \"sys\" crate, meaning it primarily handles the C library linking and exposes raw, unsafe bindings. Higher-level, safe abstractions are provided by the `netmap-rs` crate, which depends on this one.\n\n## Prerequisites\n\nTo compile and use this crate (and by extension, `netmap-rs` with its `sys` feature), you must have the Netmap C library and its development headers installed on your system.\n\nThis typically involves:\n1.  **Installing Netmap:** Follow the instructions from the [official Netmap project](http://info.iet.unipi.it/~luigi/netmap/) or its [GitHub repository (netmap/netmap)](https://github.com/netmap/netmap) to compile and install the Netmap kernel module, libraries, and headers for your operating system.\n2.  **Installing Clang:** The `bindgen` tool, used by this crate's build script to generate Rust bindings from C headers, requires `clang` to be installed. (e.g., `sudo apt install clang libclang-dev` on Debian/Ubuntu).\n\n## Build Configuration\n\nThe build script (`build.rs`) for `netmap-min-sys` attempts to locate your Netmap installation.\n\n### Standard Installation\n\nIf Netmap is installed in a standard system location (e.g., headers in `/usr/include` or `/usr/local/include`, and libraries in `/usr/lib` or `/usr/local/lib`), the build script should generally find it automatically. It defaults to checking `/usr/local` if no other hints are provided. The `build.rs` script was updated to explicitly pass the include path `${NETMAP_LOCATION}/include` (or the default `/usr/local/include`) to `bindgen`.\n\n### Custom Netmap Installation Path (`NETMAP_LOCATION`)\n\nIf you have installed Netmap in a non-standard directory, you **must** inform the build script by setting the `NETMAP_LOCATION` environment variable before building your project. Set this variable to the root directory of your Netmap installation (i.e., the directory that contains the `include` and `lib` subdirectories for Netmap).\n\n**Example:**\n\nIf Netmap is installed in `/opt/netmap` (so headers are in `/opt/netmap/include` and libraries in `/opt/netmap/lib`), you would build your project like this:\n\n```bash\nNETMAP_LOCATION=/opt/netmap cargo build\n```\n\nThe build script will then:\n*   Instruct `bindgen` to look for headers in `$NETMAP_LOCATION/include` (e.g., `/opt/netmap/include`).\n*   Instruct the linker to look for libraries in `$NETMAP_LOCATION/lib` (e.g., `/opt/netmap/lib`).\n\n### Disabling Netmap Kernel Integration (`DISABLE_NETMAP_KERNEL`)\n\nFor compilation on platforms where Netmap is not supported or available (e.g., macOS, Windows), or if you wish to compile `netmap-rs` without actual Netmap functionality (perhaps for using only its fallback mechanisms if any are fully independent), you can set the `DISABLE_NETMAP_KERNEL` environment variable.\n\n```bash\nDISABLE_NETMAP_KERNEL=1 cargo build\n```\n\nIf this variable is set, the build script will:\n*   Skip the `bindgen` process.\n*   Generate an empty `binding.rs` file.\n*   Not attempt to link against the Netmap library.\n\nThis allows the crate (and `netmap-rs`) to compile, but any attempt to use Netmap-specific functions will likely fail or be unavailable.\n\n## Usage\n\nThis crate is not typically used directly. Instead, the `netmap-rs` crate provides safe Rust abstractions over the raw bindings exposed here. If you are using `netmap-rs`, ensure its `sys` feature is enabled, which will correctly pull in and configure this `-sys` crate.\n\n## License\n*   Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)).\n*   MIT license ([LICENSE-MIT](LICENSE-MIT)).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyle6012%2Fnetmap-min-sys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyle6012%2Fnetmap-min-sys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyle6012%2Fnetmap-min-sys/lists"}