| Crates.io | nano_banana_pro_prompt |
| lib.rs | nano_banana_pro_prompt |
| version | 68.0.75 |
| created_at | 2026-01-16 10:28:00.19008+00 |
| updated_at | 2026-01-16 10:28:00.19008+00 |
| description | High-quality integration for https://supermaker.ai/blog/nano-banana-pro-prompt-use-cases-ready-to-copy-paste/ |
| homepage | https://supermaker.ai/blog/nano-banana-pro-prompt-use-cases-ready-to-copy-paste/ |
| repository | https://github.com/qy-upup/nano-banana-pro-prompt |
| max_upload_size | |
| id | 2048389 |
| size | 12,013 |
A lightweight Rust crate for generating structured prompts tailored for various applications. Simplifies prompt engineering with a focus on clarity and efficiency.
Add the following to your Cargo.toml file under the [dependencies] section:
toml
nano-banana-pro-prompt = "0.1.0" # Replace with the latest version
Here are a few examples demonstrating how to use nano-banana-pro-prompt to generate prompts for different scenarios:
1. Generating a Marketing Slogan: rust use nano_banana_pro_prompt::PromptGenerator;
fn main() { let mut generator = PromptGenerator::new(); generator.add_instruction("Generate a catchy slogan for a new brand of organic coffee."); generator.add_context("Brand name: 'Sunrise Brew'"); generator.add_constraint("Slogan must be under 10 words.");
let prompt = generator.build();
println!("{}", prompt);
}
This will produce a prompt suitable for a large language model to generate marketing slogans for an organic coffee brand.
2. Summarizing a Research Paper: rust use nano_banana_pro_prompt::PromptGenerator;
fn main() { let mut generator = PromptGenerator::new(); generator.add_instruction("Summarize the following research paper."); generator.add_context("Paper Title: 'Advances in Neural Network Architectures'\nAbstract: [Insert Abstract Here]"); generator.add_constraint("Summary should be concise and highlight key findings."); generator.add_output_format("Bullet points");
let prompt = generator.build();
println!("{}", prompt);
}
This example demonstrates how to create a prompt that instructs a language model to summarize a research paper, specifying the desired output format.
3. Translating Code Comments: rust use nano_banana_pro_prompt::PromptGenerator;
fn main() { let mut generator = PromptGenerator::new(); generator.add_instruction("Translate the following code comments from English to Spanish."); generator.add_context("// This function calculates the factorial of a given number.\n// It handles edge cases like negative numbers."); generator.add_constraint("Ensure the translation is accurate and preserves the meaning of the original comments.");
let prompt = generator.build();
println!("{}", prompt);
}
This generates a prompt for translating code comments, ensuring accuracy and meaning preservation.
4. Creating a Customer Service Response: rust use nano_banana_pro_prompt::PromptGenerator;
fn main() { let mut generator = PromptGenerator::new(); generator.add_instruction("Generate a polite and helpful response to the following customer inquiry."); generator.add_context("Customer Inquiry: 'I am having trouble logging into my account. I have tried resetting my password but still cannot access it.'"); generator.add_constraint("Response should acknowledge the customer's issue and offer steps to resolve it."); generator.add_tone("Friendly and professional");
let prompt = generator.build();
println!("{}", prompt);
}
This example shows how to build a prompt for generating customer service responses, specifying tone and desired outcomes.
5. Generating a Creative Story Idea: rust use nano_banana_pro_prompt::PromptGenerator;
fn main() { let mut generator = PromptGenerator::new(); generator.add_instruction("Generate a creative story idea based on the following theme."); generator.add_context("Theme: 'A sentient AI discovers the meaning of friendship.'"); generator.add_constraint("The story idea should be original and captivating."); generator.add_style("Science Fiction");
let prompt = generator.build();
println!("{}", prompt);
}
This demonstrates the use of nano-banana-pro-prompt to create prompts for generating creative story ideas, specifying theme and style.
MIT
This crate is part of the nano-banana-pro-prompt ecosystem. For advanced features and enterprise-grade tools, visit: https://supermaker.ai/blog/nano-banana-pro-prompt-use-cases-ready-to-copy-paste/