TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Gatehouse-TS – TypeScript port of Rust's authorization policy framework

23 点作者 gr4vityWall30 天前
TL;DR Gatehouse-TS is a zero-dependencies authorization policy library written in TypeScript, ported from Rust.<p>It allows you to combine different access control policies to check before allowing someone to access a resource.<p>A few weeks ago, I saw a post on HN about Gatehouse, an authorization library written in Rust. Here&#x27;s the original HN thread: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43466221">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43466221</a><p>I looked at their GitHub page, and started reading the source code. I do this for anything posted here that catches my attention, even if it&#x27;s written in a language I don&#x27;t understand. The code was relatively easy to follow, even though I&#x27;m not a Rust programmer.<p>Why did I decide to try rewriting it in TypeScript? For fun, of course! That was basically the only reason. I had nothing to do on a weekend and wanted to write code. It _did_ help with some challenges I was facing at $day_job, but that came afterwards.<p>I emailed the authors of the Rust version, telling them that I was working in a TypeScript version, and they kindly blessed me to publish it with a similar name.<p>Overall I&#x27;m very happy with it. The original authors provided an amazing foundation for a port, I had fun rewriting it and trying to adapt their APIs from Rust to TypeScript. As a bonus, it was immediately useful at work as well.<p>I appreciate any feedback or thoughts on it. Please check out the original project as well, since most of the hard work was done by them: <a href="https:&#x2F;&#x2F;github.com&#x2F;thepartly&#x2F;gatehouse">https:&#x2F;&#x2F;github.com&#x2F;thepartly&#x2F;gatehouse</a><p>Documentation: <a href="https:&#x2F;&#x2F;9morello.github.io&#x2F;gatehouse-ts&#x2F;" rel="nofollow">https:&#x2F;&#x2F;9morello.github.io&#x2F;gatehouse-ts&#x2F;</a>

暂无评论

暂无评论