Code Monkey home page Code Monkey logo

olean-rs's Introduction

Build Status

olean-rs

Parser/viewer for olean files, written in Rust and Lean.

See olean.lean for the lean version, and build with cargo for the Rust version. Currently the Rust version is faster by a factor of a hundred or so, so I don't know if I will continue to keep the Lean version up to speed.

Why look at olean files? The olean file format is an unstable binary format used by lean for caching successfully parsed files. As such, it is much easier to parse from a third party position than a lean file. Second, although lean supports an export format, the format is quite lossy, essentially only representing the expressions that are defined in the file. By contrast, the olean file contains lots of other information like notation declarations, attributes, protected status and namespace locations (which are not accessible through lean metaprogramming), and VM code. So olean parsing is the first step to a number of other processing or analysis passes.

Building the Rust project

rustup toolchain install nightly
rustup override set nightly
cargo build

Getting Started

Usage: target/debug/olean-rs path/to/file.olean [options]

Options:
    -D, --dump FILE      dump olean parse
    -L                   give location of lean library
    -d, --deps lean.name view all dependents of the target file
    -p DIR               set current working directory
    -l lean.name         test lexer
    -t lean.name         testing
    -h, --help           print this help menu

olean-rs's People

Contributors

cipher1024 avatar digama0 avatar

Watchers

 avatar

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.