jgarderon / regles Goto Github PK
View Code? Open in Web Editor NEWOrganiser son traitement métier. Sans se désorganiser.
Organiser son traitement métier. Sans se désorganiser.
la gestion des arguments semble différente sous windows:
https://doc.rust-lang.org/stable/std/env/fn.args_os.html
voici une méthode qui fonctionne sous Windows: pour des arguments obligatoires et dans le même ordre...
use std::env;
fn main() {
let args: Vec = env::args().collect();let rt = &args[1]; let rs = &args[2]; println!("RESOLUTION_TYPE", rt); println!("REGLES_SOURCE", rs);
}
avec comme commandes:
C:\Users\toto\Documents\projects\Regles-master>
cargo build
cd target\debug
Regle.exe asservi regles.txt
comment différencier l'os en Rust pour pouvoir switcher la collecte des arguments ?
si non, il reste l'option d'un fichier .ini systématiquement situé dans le même dossier que le main.rs
mais le chemin de regles.txt sera, de toute façon, de syntaxe différente selon l'os.
Cordialement,
jérôme
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.