docs.rs failed to build syntex-0.4.3
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:
syntex-0.58.1
Syntex Code Generation Framework
syntex
is a library that enables compile time syntax extension expansion.
This allows users to use libraries like regex_macros in a rust 1.0
compatible context.
Configuring with Cargo
To create a package:
[]
= "hello_world_macros"
= "0.2.0"
= [ "erick.tryzelaar@gmail.com" ]
[]
= "*"
= "*"
To use it:
Cargo.toml:
[]
= "hello_world"
= "0.3.0"
= [ "erick.tryzelaar@gmail.com" ]
= "build.rs"
[]
= "*"
build.rs:
extern crate syntex;
extern crate hello_world_macros;
use env;
use Path;
src/main.rs:
// Include the real main
include!;
src/main.rs.in:
Limitations
Unfortunately because there is no stable plugin support in Rust yet, there are some things that syntex cannot do:
- The code generated by syntex reports errors in the generated file, not the source file.
- Syntex macros cannot be embedded in macros it doesn't know about, like the
builtin
vec![]
,println!(...)
, and etc. This is because those macros may override themacro_name!(...)
to mean something different.