Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(clog): update to beta compatible version of Rust #21

Merged
merged 1 commit into from
Apr 8, 2015

Conversation

kbknapp
Copy link
Member

@kbknapp kbknapp commented Apr 8, 2015

Allows compiling with stable Rust 1.0 beta channel (i.e. nightly not required)

@vyp
Copy link

vyp commented Apr 8, 2015

This is not related, but on #16, you said

I can confirm that it does, that's what I've been using for a while now ;)

So does that mean you are on Arch Linux too? Because how did you get Rust beta, did you find a package, or did you build it yourself? (Because the official package is still outdated.)

I'm using the nightly as usual for the moment (which compiles this pr btw).

@kbknapp
Copy link
Member Author

kbknapp commented Apr 8, 2015

@vyp yep, I use Arch. For Rust I use multirust so I can develop against both stable and nightly at the same time, but you can also just use the regular rustup.sh to install either the beta or nightly (assuming you only want one). Before the beta was out, I used the AUR rust-nightly-bin package.

For Beta:
$ curl -s https://static.rust-lang.org/rustup.sh | sudo sh

For Nightly:
$ curl -s https://static.rust-lang.org/rustup.sh | sudo sh -s -- --channel=nightly

The AUR should hopefully get the beta soon. If not, I'm sure the official arch repos will get stable 1.0 once released.

cburgdorf added a commit that referenced this pull request Apr 8, 2015
refactor(clog): update to beta compatible version of Rust
@cburgdorf cburgdorf merged commit 275d192 into clog-tool:master Apr 8, 2015
@cburgdorf
Copy link
Contributor

THANKS! Would still love to get my question addressed just for the purpose of learning :)

@kbknapp
Copy link
Member Author

kbknapp commented Apr 8, 2015

@cburgdorf It's because syntax extensions aren't supported in stable/beta (since they're unstable), only procedural macros are allowed. Procedural macros can't be at the top level (i.e. static) when they require a function call (perhaps not all?). So we end up paying a [very small] performance hit because the regex is recompiled each time, but it's so small it's not noticeable (talking ns/ms slower). Once syntax extensions are stable we should be able to re-incorporate the real regex! macro back at the static level.

@cburgdorf
Copy link
Contributor

Understood! Thanks for clarifying :)

@kbknapp
Copy link
Member Author

kbknapp commented Apr 8, 2015

No problem :)

@vyp
Copy link

vyp commented Apr 8, 2015

Oh cool, multirust looks really great. Thanks for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants