Skip to content
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

Allow compiling without C dependencies #199

Closed
jcarres-mdsol opened this issue Apr 23, 2018 · 4 comments
Closed

Allow compiling without C dependencies #199

jcarres-mdsol opened this issue Apr 23, 2018 · 4 comments

Comments

@jcarres-mdsol
Copy link

Actix web has currently only three possible C dependencies:
Brotli which may bring Brotli-sys which is a wrapper to a C library and
Openssl which also can bring a C dependency or not
Miniz which can bring Miniz-sys.

In the case of Miniz it is possible via features to use a different Rust only backend. Although such backend is considered experimental.

Actix web already allows Brotli and openssl to be removed or use rust backends.
If Actix web gives a way to either remove Miniz or allow it to use the Rust backend, then it will have no C dependencies and it will be easier to cross compile it by just adding and using the target chain of the system which would run it.

@fafhrd91
Copy link
Member

we can add flate2-rust feature and enable rust_backend backend for miniz. would you provide PR?
I'll be able to work on this issue in couple days

@jcarres-mdsol
Copy link
Author

I'll try my best

@fafhrd91
Copy link
Member

added two features "flate2-c" and "flate2-rust", by default "flate2-c" is enabled.

you can define actix-web dependency like this:

actix-web = { version="^0.5.5", features=["flate2-rust"], default-features = false }

@jcarres-mdsol
Copy link
Author

Thank you! Definitely much more simple than what I was trying to do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants