Skip to content

hydrobeam/org-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

org-rust

This crate aims to provide parsing support for org-mode based on the official spec. The goal is to be mostly spec compliant, and allow for exporting the generated AST to other formats and applying modifications to it. View the demo at https://org-rust.pages.dev/.

Installation

org-rust can be used as a CLI tool or as a library via the org-rust-parser/org-rust-exporter crates.

The MSRV is 1.70.0, but may compile with earlier rust versions (untested).

Arch

org-rust can be found on the AUR.

paru -S org-rust

Cargo

cargo install org-rust

Dependencies

  • bitflags: provides a macro to generate bitflags from a struct.

    Extremely useful for handling markup delimiters and creating object groups (standard set, minimal set, etc…).

  • derive_more{from}: allows deriving From on a enum.

    Mostly a convenience crate to make it easy to create a Node from an Expr.

  • regex: provides fast string search functions.

    Used in parsing block / LaTeX environments to find the ending token (#+end_NAME). I expect these elements to be fairly large on average, so being able to do this quickly is very good!

  • phf: allows initializing compile time look up tables.

    Not absolutely necessary, but makes it faster/easier to group together characters like markup delimiters, entities, etc…

Development

Refer to the documentation for developer-specific information & syntax-progress.