nickel-org / cookies Goto Github PK
View Code? Open in Web Editor NEWCookie support for nickel applications
Cookie support for nickel applications
I'm trying to use nickel_cookies 0.2.0
in conjunction with frank_jwt 2.5.1
.
frank_jwt 2.5.0
relies on the latest version of openssl v0.9.12
.
nickel_cookies 0.2.0
relies on cookie 0.2.5
which relies on openssl 0.7.17
.
When I try to build my rust application, I get the following error:
error: native library
openssl
is being linked to by more than one version of the same package, but it can only be linked once; try updating or pinning your dependencies to ensure that this package only shows up once
The latest version of cookie
,0.8.1, has dropped its openssl dependancy. If nickel_cookies
updates to the latest version of cookie
, this problem would be solved.
According to the src
folder in .cargo/registry
, [email protected]
is dependent on [email protected]
which is dependent on [email protected]
. Therefore, trying to cargo check
a project that relies on it will give the following error message :
error: enum is private and its variants cannot be re-exported
--> <cargo registry path>\mustache-0.6.3\src\parser.rs:4:9
|
4 | pub use self::ParserState::*;
| ^^^^^^^^^^^^^^^^^^^^
...
43 | enum ParserState { TEXT, OTAG, TAG, CTAG }
| ---------------- help: consider making the enum public: `pub enum ParserState`
error: enum is private and its variants cannot be re-exported
--> <cargo registry path>\mustache-0.6.3\src\parser.rs:5:9
|
5 | pub use self::TokenClass::*;
| ^^^^^^^^^^^^^^^^^^^
...
18 | enum TokenClass {
| --------------- help: consider making the enum public: `pub enum TokenClass`
Compiling gdi32-sys v0.2.0
error: aborting due to 2 previous errors
error: Could not compile `mustache`.
Modifying the dependency to [email protected]
should do the trick.
Information on my setup:
#rustc --version --verbose
rustc 1.32.0-nightly (4a45578bc 2018-12-07)
binary: rustc
commit-hash: 4a45578bc58ff262864f72680cc02e83f5d2f5b3
commit-date: 2018-12-07
host: x86_64-pc-windows-msvc
release: 1.32.0-nightly
LLVM version: 8.0
#cargo --version --verbose
cargo 1.32.0-nightly (5e85ba14a 2018-12-02)
release: 1.32.0
commit-hash: 5e85ba14aaa20f8133863373404cb0af69eeef2c
commit-date: 2018-12-02
Given the focus of Nickel which is to provide an Expressjs-inspired web framework(*), I would expect that cookies are handled out-of-the-box. Instead, I just found out that I need to use this crate; and I had to use the git version as I did not find it on crates.io.
Why are cookies treated as a separate crate, when it is central to many Web applications?
(*) which I find much superior to Iron's "everything is a plugin", because in Iron's case this creates an unfortunate feeling of "where are my batteries" for everything you want to do, even the most mundane tasks like serving static files and routing requests...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.