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

Rewrote this repository in Rust #55

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

SOF3
Copy link

@SOF3 SOF3 commented Jun 12, 2020

This would compile README into an executable rust file that would output the same contents as the markdown content.

One can obtain the executable by running just build. Currently the justfile only supports Linux-like systems.

@@ -18,7 +21,14 @@ No. This is a joke.

### Y U HATE RUST SO MUCH?

I don't, actually. I believe that those who spend their time asking people to rewrite their projects are probably not themselves active Rust developers, as those active devs are probably busy [writing memory-safe code](https://trac.torproject.org/projects/tor/ticket/11331).
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTPS links have // which prevents the () from being paired, causing errors at the lexing stage. They have been migrated to footnote style which does not wrap URLs inside brackets.

fn test() {
use std::{fs, path::PathBuf};

let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("test.txt");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test file was made external instead of using quote!(), because quote!() does not allow literal expressions with a #.

@SOF3
Copy link
Author

SOF3 commented Jun 12, 2020

The CI is currently failing because of rust-lang/cargo#8354 failing to install just. It has been tested to work on older nightly versions.

@ansuz
Copy link
Owner

ansuz commented Jun 12, 2020

This is an impressive display of over-engineering. Kudos!

The only thing that seems to be missing at this point is instructions for how to build the readme within the readme.

@progval progval added approved this repository maintainers' like this post help wanted link to a ticket by someone asking for a rust rewrite work in progress someone is working on the Rust rewrite labels Aug 31, 2020
@SOF3
Copy link
Author

SOF3 commented Mar 4, 2021

I have added the instructions to build the readme. I have also added a rust-toolchain file so that a nightly compiler with proc_macro_span support is used.

README.md Outdated
This readme is written in Rust to further rebut arguments that Rust has low readability.
The readme can be built into an executable by running the [just][just] command:

> just build
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code blocks can be inserted in markdown by indenting with four spaces.

README.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved this repository maintainers' like this post help wanted link to a ticket by someone asking for a rust rewrite work in progress someone is working on the Rust rewrite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants