-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
First, thank you for rust-script its awesome !
I have a script with the following script named display-tests
//! Requires library SDL2 to be installed
//! See: <https://docs.rs/embedded-graphics-simulator/latest/embedded_graphics_simulator/#setup>
//! ```cargo
//! [package]
//! name = "ceceti"
//! version = "0.0.0"
//! edition = "2021"
//!
//! [dependencies]
//! embedded-graphics-simulator = "0.7.0"
//! embedded-graphics = { version = "0.8.1", default-features = false, features = [
//! "defmt",
//! ] }
//! embedded-menu = { version = "0.6.1", default-features = false }
//! embedded-layout = "*" ## sub dep of embedded-menu
//! ```
extern crate embedded_graphics_simulator;
extern crate embedded_graphics;
/* Modules */
#[path = "../src/menu.rs"]
mod menu;
/* Crate imports */
use menu::get_menu;
/* Dependencies */
use embedded_graphics::{pixelcolor::BinaryColor, prelude::Size, Drawable as _};
use embedded_graphics_simulator::{
BinaryColorTheme, OutputSettingsBuilder, SimulatorDisplay, Window,
};
fn main() {
let mut display = SimulatorDisplay::<BinaryColor>::new(Size::new(128, 64));
let output_settings = OutputSettingsBuilder::new()
.theme(BinaryColorTheme::OledBlue)
.build();
let mut window = Window::new("ceceti screen", &output_settings);
// Menu
let mut menu = get_menu();
menu.update(&display);
menu.draw(&mut display).unwrap();
window.show_static(&display);
}
but the name field isn't used by rust-script


Can we be allowed to override the package name with the Cargo.toml block, my menu
module uses env!("CARGO_CRATE_NAME")
so instead of

I get

Metadata
Metadata
Assignees
Labels
No labels