-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Target casbin to wasm #101
Comments
First trial failed, because casbin depends on tokio depends on mio depends on net2, and net2 doesn't compile on wasm32-unknown-unknown. To achieve this we have 2 solutions.
|
I like option 1, more lightweight, better structure. |
I would say we can have a If someone is interested in this please comment below. |
Currently using CASL in js, which is 'isomorphic'. Looking for something similar in rust, so yes, interested. |
We had a plan for developing casbin.js, which is based on Node-casbin because of the JS language: casbin/casbin.js#2 . We may even have a GSoC student to work on it this year: https://github.com/casbin/SummerOfCode2020#casbinjs Of course it's also welcome if Casbin-RS can achieves front-end authorization too via WASM! |
@hsluoyz That's even better I suppose as at this stage many solutions will have rust for backend and js in the client. |
async-std = "1.6.0-beta.1" # Async version of the Rust standard library has been published with |
I'll try to upgrade |
I upgraded See also: async-rs/async-std#770 |
with the release of [email protected], it's now passing wasm CI check |
Any update on this? I want to use casbin as part of Envoy filter with proxy-wasm-rust-sdk. Currently casbin-rs is not compiling to wasm |
We usually use casbin-rs in a web server, that is when a request comes in, a middleware or controller asks casbin whether it's authenticated. A common situation is that we also have a frontend ui that needs to do permission control. If we can compile casbin to wasm file, then we can do enforce at browser, no need to ask for the server all the time.
Rust has very good wasm support, I think this idea can be implemented. After that we need to consider how to sync user's policy from server, maybe we need to add a
get_all_policies_for_user
ininternal_api.rs
The text was updated successfully, but these errors were encountered: