Coder Social home page Coder Social logo

rust-bundler's People

Contributors

slava-sh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rust-bundler's Issues

minify option

Along with the existing pretty print, it may be useful to support minified code output.

I assume this won't be especially difficult since you're already using syntax trees?

..= causes rustfmt fail

attempting to bundle the following file

fn f() {
    let a = 0;
    for x in 1..=a {}
}

causes a rustfmt failure:

error: expected `{`, found `=`
 --> stdin:1:45
  |
1 | fn spread_at ( ) { let a = 0 ; for x in 1 ..= a { } }
  |                                             ^

thread 'main' panicked at 'rustfmt returned no code', src/libcore/option.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Notice, however, that manually running rustfmt on that snippet works.

Support for automatic configuration within cargo.toml

I'm not sure if it's actually possible, but I think it'd be conveniant to specify the destination file via cargo.toml (with the src being implicitly lib.rs or main.rs already, although it could also be configured). Additionally (if possible), it'd be nice to have some kind of implicit build.rs ship with the bundler crate. (That is, rather than having to manually write or copy one into your project).

It was always one of the key motivations for me of porting my project to rust.

Do you know if it's possible? If you haven't already looked into it, I might fork your project and give it a go over the weekend.

New keyword in Rust 2018 not supported

When using lib-files withing same project the new syntax is

use crate::example

instead of

use {{crate_name}}::example

In my codingame template
if trying to create a new lib and use inside math.rs with the crate_name::example it will fail when trying to bundle.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.