Skip to content

Instantly share code, notes, and snippets.

@jamesmunns
Last active June 29, 2023 22:31
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmunns/06f70b68bde8e1394b79e936a8599718 to your computer and use it in GitHub Desktop.
Save jamesmunns/06f70b68bde8e1394b79e936a8599718 to your computer and use it in GitHub Desktop.
AsciiDoc Rust Implementation

Pledging for Rust support of the Asciidoc format

On 2021-01-17, @bitshiftmask requested an open source implementation of the AsciiDoc format.

Please see the original twitter thread for details.

The project is currently being developed here on GitHub.

NOTE: The repo/library name is likely to change in the near future to avoid Trademark Confusion. The link above will be changed once that has happened.

If you would like to add your pledge, please DM James on twitter, or reply to the thread. We are still looking for more contributions, to help prioritize or accelerate the work!

Deliverables

All of the following deliverables have the following requirements:

  1. The deliverables must be developed under a permissive open source license
    • Ideally this would be dual MIT+Apache 2.0
    • If you'd like to use another license, please check with James first.
  2. Both components must be completely written in Rust, and must not wrap a non-Rust library or CLI program.
  3. All work must be public, at least at the time of release/acceptance

Your work will be reviewed prior to acceptance of payment. You must be listed on this page under "Implementors" to be elligible for the payment.

We are currently tracking the following deliverables

Deliverable 1 - Syntax Parser

A syntax parser for the AsciiDoc format, implemented in pure Rust.

The parser should have tests verifying its compliance with at least one common flavor of the AsciiDoc format.

Concrete acceptance criteria is under development.

Supporters for this deliverable:

The total support for this deliverable is currently 1000 EUR.

Deliverable 2 - mdBook Support

Support for this AsciiDoc syntax parser for the mdbook tool.

The mdbook support does not need to be merged upstream, but does need to be submitted.

Concrete acceptance criteria is under development.

Supporters for this deliverable:

The total support for this deliverable is currently 750 EUR.

Deliverable 3 - Format-Preserving re-serialization

The parser (deliverable #1) should be equipped for format-preserving re-serialization.

Concrete acceptance criteria is under development.

Supporters for this deliverable:

The total support for this deliverable is currently 250 EUR.

Funding

This amount is being paid by individuals that are pledging their amounts. This money will be paid out by each individual independently. James cannot control the individuals pledging, but will make a best effort to follow up with them once payment is due.

Please see above for the current pledge amounts.

If you would like to add your pledge, please DM James on twitter, or reply to the thread. We are still looking for more contributions, to help prioritize or accelerate the work!

Implementors

Currently, Lukas Wirth (GitHub, Twitter) has been assigned as the primary implementor. At the moment, he plans to take this commission on as a solo developer.

The project is currently being developed here on GitHub.

Potential Alternates

In the case that Lukas is unable to continue or finish development of the deliverables above, or is looking for potential collaborators, we are looking for interested alternates! If you are interested, please DM James for more details.

The following people have contacted James as potentially interested in helping:

@agorges
Copy link

agorges commented Feb 6, 2021

Wow, I'm glad that I found this conversation. Trademark issues are a very important thing these times. And to force Projects to rename their projects is a good Indicator what is coming up. Good Luck with that... I'm glad that at least the spelling is specified and enforced...

@mojavelinux
Copy link

Indeed, we've put in a lot of work over the last few years to ensure the trademark is protected and that the meaning of AsciiDoc remains consistent. And a key part of why we're doing that is so that AsciiDoc can be made available on more language platforms, like Rust. We really want AsciiDoc to be a success in every sense of the word.

@jiakuan
Copy link

jiakuan commented Jul 23, 2022

Really interested in a pure Rust implementation of the parser, but seems the discussion stopped last year. Is the TCK ready?

Parsing an AsciiDoc document into an AST with source positions would be a great first step. Lots of more features can be added gradually from there.

Just wondering if it's possible to keep it moving, even a tiny step periodically? I'm interested in looking into the current implementation and experimenting how hard it is to write a Rust parser. I may try it in a private test repo first.

@jiakuan
Copy link

jiakuan commented Jul 23, 2022

In terms of funding, perhaps Open Collective and Github Sponsors are good options to keep things rolling?
The more supporters are there, the quicker the project would be developed.

@noritada
Copy link

Hello. I came here after seeing a comment on @Veykril's project saying "see the linked gist if you are interested in taking over the project instead".

I am interested in this project. In the past week or so, I have written a process to convert an AsciiDoc document to Markdown for rust-analyzer's release notes (but I am not sure yet if this PR will be accepted). This process was implemented based on the documentation on AsciiDoctor's site, and it handles the limited source documentation in a nice way. However, it contains some ad hoc parts and I wanted to create a more decent parser. I found @Veykril's project while researching existing projects and ended up here.

I am a solo open source developer with a company job that deals primarily with binary data, and also have a translation book manuscript, so I can't devote full time to this project. However, I am very interested in participating as an implementer, as I would like to use AsciiDoc more in the Rust community and would be happy to use AsciiDoc in mdBook as well. Note that I have used the AsciiDoc format in my manuscripts, so I have some understanding of it, but I am still refining the details by reading AsciiDoctor's documentation.

@willsp
Copy link

willsp commented Dec 27, 2022

I'm not sure if the pledgers are still willing, as it's been almost 2 years. I'm interested in the effort for personal reasons, and intend to fork raphlinus/pulldown-cmark in order to get a bit of a head start. However, between a demanding day job and a busy family, I doubt I'll have a lot of time to spend on this (besides the fact that I'll likely end up going down more than a couple of rabbit holes cleaning it up, read making it more idiomatic).

Just wanted to throw this tip into the wild, to see if anybody else can get a working implementation up faster than I.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment