nrc / deglobber Goto Github PK
View Code? Open in Web Editor NEWTool for showing and replacing glob imports with non-glob imports in Rust programs
Tool for showing and replacing glob imports with non-glob imports in Rust programs
Use the code for dealing with opts in driver, rather than trying to emulate it.
The deglobber should take an argument which filters by filename. E.g., deglob -f foo.rs
would only modify files called foo.rs
.
I think we have to require that the user supply a sysroot, I don't think there is any better way to get one.
It would be easier, and I think more DRY, to first run the compiler with --save-analysis, then use that output as input to the deglobber, rather than doing a partial compile as part of deglobbing. Otherwise being able to run over rustc or other projects with complicated build processes is going to be not-fun.
To make this usable, we'll probably want to implement --save-analysis for Cargo, if that can't be easily done already.
The downside of this is that it makes the deglobbing process more complicated than just running a single command. Also the deglobber is a nice proof of concept for a tool using librusc as a library.
Currently we supply a file name, seems unnecessary.
Sensible options seem to be:
use foo::{a, b, c, d, ...};
use foo::a;
use foo::b;
...
use foo::{a, b, c};
use foo::{d, e};
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.