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

As a developer, I want to extend config for header in rust bindings #495

Open
linnefromice opened this issue Nov 17, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@linnefromice
Copy link

Is your feature request related to a problem? Please describe.

I want to update in config a header that affects the entire structure generated from candid.

let contents = candid::bindings::rust::compile(&config, &self.type_env, &None);
let mut lines = contents
  .lines()
  .skip(4);
lines.insert(0, "#![allow(dead_code, unused_imports)]".to_string());
lines.insert(1,"use candid::{self, CandidType, Deserialize, Principal, Encode, Decode};".to_string());

Describe the solution you'd like

I want to be able to change the following in header with option

  • 'use' Declaration
  • 'derive' of 'use' declaration
  • (if possible) header comment

I have a few requests for structures as well.

@linnefromice linnefromice added the enhancement New feature or request label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant