How do I add cargo features? #2182
Answered
by
Velfi
thomas-k-cameron
asked this question in
Q&A
Replies: 2 comments 1 reply
-
If you are asking how a new crate, let's say When the |
Beta Was this translation helpful? Give feedback.
1 reply
-
writer.rust("use #T::{Serialize, Deserialize};", CargoDependency.Serde.toType()) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
thomas-k-cameron
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do I add new dependencies and features?
I understand that
Cargo.toml
is generated withclass CargoTomlGenerator
, which is called byClientCodegenVisitor
fromRustClientCodegenPlugin
.But couldn't really nail down where all the configurations are coming from.
draft pull request:
#2183
UPDATE:
I'm trying to add this piece on the generated toml.
I figured out that you had to add
DependencyScope
andCargoDependency
so I decided to add these on CodeDependency.kt file.and this on CargoTomlGenerator.kt file,
But I can't figure out how to tell kotlin to include Serde defined on CargoDependency on CargoTomlGenerator.
Beta Was this translation helpful? Give feedback.
All reactions