Contributing
Casbin 是一个开源授权库,有多种语言的实现。欢迎使用任何受支持语言的贡献者参与。
项目分为两大块:
- 核心与语言移植:用 Go、Java、Node.js、PHP、Python、.NET、C++、Rust 等实现 Casbin 的核心和生态。
![]() | ![]() | ![]() | ![]() |
|---|---|---|---|
| Casbin | jCasbin | node-Casbin | PHP-Casbin |
| 生产就绪 | 生产就绪 | 生产就绪 | 生产就绪 |
![]() | ![]() | ![]() | |
|---|---|---|---|
| PyCasbin | Casbin.NET | Casbin-CPP | Casbin-RS |
| 生产就绪 | 生产就绪 | 生产就绪 | 生产就绪 |
- 应用和工具:基于 Casbin 构建的项目(例如编辑器、仪表盘)。
| 项目 | 演示 | 详情 | 技术栈 |
|---|---|---|---|
| Casbin编辑器 | Casbin编辑器 | 一个基于浏览器的编辑器,用来创建和测试 Casbin 模型和策略。 | TypeScript + React |
贡献方式
-
使用 Casbin 并提供反馈:在 GitHub 上报告 bug 或建议功能。更大的想法,请先在 Discord 或 GitHub Discussions 上讨论。 issue 和讨论请 使用英文。
-
完善文档:文档是很好的入手点,随时欢迎修正和补充说明。
-
解决 issue:在 项目看板 查看未解决的 issue,很多都标注了难度。
提交 pull request
我们使用 GitHub 和标准的 pull request 流程。
提交前:
-
清楚说明改动的目的和影响。
-
每个 PR 保持聚焦(一个功能或一个修复)。不相关的改动拆成单独的 PR。
-
新增文件时,在文件顶部加上 Casbin 的许可证头:
// Copyright 2021 The casbin Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License. -
使用语义化的提交信息,格式为:
<type>(<scope>): <subject>。<scope>是可选的。详细规范见 Conventional Commits。
许可证
所有对 Casbin 的贡献都采用 Apache 许可证。






