docs.rs failed to build aster-0.13.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
aster-0.40.0
Rust Syntax Ast Builder
Aster is a framework that simplifies generating Rust AST. It supports using syntex with stable Rust, and the builtin libsyntax with the nightly Rust.
Example
This example demonstrates how to use Aster to create a simple compound
expression. We will take advantage of
Cargo features to
optionally switch between the two different backends. Let's start with the
Cargo.toml
file:
[]
= "hello_world"
= "0.3.0"
= ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
[]
= ["aster/default", "syntex_syntax"]
= ["aster/nightly"]
[]
= { = "*", = false }
= { = "*", = true }
Here is the actual script:
extern crate aster as aster_lib;
use syntax as aster;
use syntex as aster;
When run with cargo run
, the example will use syntex. With
cargo run --no-default-features --features nightly
, it will use libsyntax.