{"id":21392703,"url":"https://github.com/in-line/grip","last_synced_at":"2025-10-14T06:02:51.384Z","repository":{"id":47439014,"uuid":"158872855","full_name":"In-line/grip","owner":"In-line","description":"GoldSrc REST In Pawn (gRIP)","archived":false,"fork":false,"pushed_at":"2022-07-08T15:18:02.000Z","size":404,"stargazers_count":22,"open_issues_count":38,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-13T18:43:56.526Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/In-line.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":"2018-11-23T19:55:09.000Z","updated_at":"2025-04-23T06:43:02.000Z","dependencies_parsed_at":"2022-09-23T02:40:24.077Z","dependency_job_id":null,"html_url":"https://github.com/In-line/grip","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/In-line/grip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/In-line%2Fgrip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/In-line%2Fgrip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/In-line%2Fgrip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/In-line%2Fgrip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/In-line","download_url":"https://codeload.github.com/In-line/grip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/In-line%2Fgrip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017959,"owners_count":26086237,"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-10-14T02:00:06.444Z","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":[],"created_at":"2024-11-22T13:42:22.890Z","updated_at":"2025-10-14T06:02:51.361Z","avatar_url":"https://github.com/In-line.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoldSrc Rest In Pawn (gRIP) [![Build Status](https://travis-ci.com/In-line/grip.svg?branch=master)](https://travis-ci.com/In-line/grip)\n\n# Unmaintained.\n## Because of several reasons, such as army service. This project is currently unmaintained.\n\nGRIP started as an effort to make an asynchronous REST API for Pawn.  \n\nMonths ago I was invited to participate in the GameX project initiative. GameX was striving to create a modern administrating system for HLDS. To do this many problems queued up, waiting to be solved. One of the major challenges was the interaction with the database. \n\nA long time ago before GRIP and GameX, web-server and HLDS modified database direcly. It was a crude and a brutal approach, which is one of the sources of todays problems. \nGRIP was created to fill this gap, by providing asynchronous REST Client for Pawn. Database access and modification, with the server-specific code are deligated to the server and encapsulated in REST API, which is a sophysticated and modern approach.\n\nBefore we proceed, I should mention that HLDS and Pawn operate on the main thread. Generally code isn't concurrent. \n\nSo to sum up there are 3 key requirements for the GRIP. \n1) Low-latency\n2) Asynchronous API\n3) Support for the modern web standards.\n4) Builtin JSON support (to bypass limits on the AMXX buffer sizes)\n\nSolutions implemented before, usually achieved only second requirement or just basically nothing. They used raw sockets and blocked the main thread for the IO. \nTo solve blocking problem requests were dispatched to another thread (See for SQL_ThreadQuery for example). This approach has several problems. One of them is the difficulty on concurrent and safe programming in C++. To speed up things, thread pool should be written. To write a fast thread pool you need to be a highly professional programmer... This is just a mess! \n\nWhy don't use modern programming language which is as fast as C++, but is safe, has greater libraries and tooling support? Yeah, basically no reasons to not to.  \n\nRust has many libraries dedicated to high-performance HTTP(s) requests, implemented (at the lowest level) using non-blocking sockets. It is extremely easy to write something in Rust, which is otherwise nearly impossible in C++. \n\nThus, I, with the team of dedicated supporters give a birth to a GRIP. It supports modern web standards, will eventually support JSON and many other things..\n\n## API \n\nTo familiarize yourself with the API you need little to no knowledge about it's inner structure. You should be familiar with Pawn scripting language in the context of the AMX Mod X and REST API.\n\nFirst of all, let's see whats the most important point. All the necessary optimizations are done under the hood, developer is exposed only to the high-level view of the things.\n\nYou start a request with the corresponding arguments and just after that, function returns immediately. There is no blocking and no way to achieve it by design.\n\nNext I think it is important to describe idiomatic callback implementation. User is forced to provide completion handler, which is guaranteed to be called in the case of success, timeout, cancelation, etc.. Requests completion order is unspecified. On completion, response status should be checked. No function silently failes. it is strict API which forces users to consider all cases. All network requests are done simultaneously in the implementation specified order.\n\nJSON API tries to mimic corresponding `json.inc` file from AMX Mod X. Some things were removed/changed, because in my opinion they are bad design choices. Such dangerous components should rarely cause compilation errors in the plugin, but in the majority of the cases gRIP JSON API is drop-in replacemant of AMX Mod X `json.inc` .\n\nAnyway they are some fundamental places where my point of view and that of AMX Mod X JSON implementation diverge drastically. Here is semi-complete list of such [problems](https://github.com/alliedmodders/amxmodx/issues?q=is%3Aissue+sort%3Aupdated-desc+json+author%3AIn-line).\n\n## Building\n\nCurrently building only on the Linux is supported, but there is some discussions and ongoing work for Windows support. Anyway, the best way to get list of up to date build time dependencies is to view [.travis.yml](https://github.com/In-line/grip/blob/master/.travis.yml) section containing debian packages.\n\nAfter installing these dependencies you need to install Rust, follow your distribution specific instruction or simply download it from [rustup](https://rustup.rs/).\n\nBecause, currently Rustup ships by default only host target, you need to manually install 32-bit x86 target for Rust. \n```bash\n$ rustup target install i686-unknown-linux-gnu\n```\nTo get nice IDE for Rust and C++, I recomment first of all googling and choosing something based on your taste, but I usually develop using CLion with InteliJ Rust plugin, it is very convenient to use in with mixed Rust/C++ project.\n\nTo start building you should use cmake, so first of all, do standard procedure.\n```\n$ cmake . # Generate makefile\n$ make # Make makefile.\n```\nThis will compile Rust code, C++ code and produce single shared library at the end. There is no much to tell about this process, but feel free to ask questions (even stupid!). I appreciate contributions and will help anybody, who wants to be involved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fin-line%2Fgrip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fin-line%2Fgrip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fin-line%2Fgrip/lists"}