Skip to content

Commit fe8fb1d

Browse files
committed
Move the crate to a subdir.
1 parent 4ff3f16 commit fe8fb1d

18 files changed

+35
-23
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ Cargo.lock
1212
/target
1313
**/*.rs.bk
1414
Cargo.lock
15+
16+
*.xsd
17+
*.nxsd
18+
*.xml
19+
foo.rs

.travis.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ rust:
55
- nightly
66
cache: cargo
77
script:
8-
- wget https://www.w3.org/2009/XMLSchema/derived.nxsd https://www.w3.org/2009/XMLSchema/XMLSchema.xsd
8+
- wget https://www.w3.org/2009/XMLSchema/XMLSchema.xsd -O xml-schema/XMLSchema.xsd
9+
- wget https://www.w3.org/2009/XMLSchema/derived.nxsd -O xml-schema/derived.nxsd
910
- cargo test
10-
- cargo run --bin gen derived.nxsd XMLSchema.xsd > foo.rs
11-
- diff foo.rs src/parser.rs # Fails if they are different.
11+
- cargo run --package xml-schema --bin gen xml-schema/derived.nxsd xml-schema/XMLSchema.xsd > foo.rs
12+
- diff foo.rs xml-schema/src/parser.rs # Fails if they are different.

Cargo.toml

+4-18
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
1-
[package]
2-
name = "xml-schema"
3-
version = "0.1.0"
4-
authors = ["Valentin Lorentz <[email protected]>"]
1+
[workspace]
52

6-
[dependencies]
7-
#quick-xml = "0.12.1"
8-
xmlparser = "0.5.0"
9-
codegen = { git = "https://github.com/carllerche/codegen" }
10-
heck = "0.3.0"
11-
bigdecimal = "0.0.12"
12-
num-traits = "0.2.5"
13-
14-
[dev-dependencies]
15-
pretty_assertions = "^0.4"
16-
17-
[[bin]]
18-
name = "gen"
19-
path = "src/bin/gen.rs"
3+
members = [
4+
"xml-schema",
5+
]

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ XML Parser generator based on XML schemas.
44
## Regenerating the schema parser
55

66
```
7-
wget https://www.w3.org/2009/XMLSchema/derived.nxsd https://www.w3.org/2009/XMLSchema/XMLSchema.xsd
8-
cargo run --bin gen derived.nxsd XMLSchema.xsd > foo.rs && cp foo.rs src/parser.rs
7+
wget https://www.w3.org/2009/XMLSchema/XMLSchema.xsd -O xml-schema/XMLSchema.xsd
8+
wget https://www.w3.org/2009/XMLSchema/derived.nxsd -O xml-schema/derived.nxsd
9+
cargo run --package xml-schema --bin gen xml-schema/derived.nxsd xml-schema/XMLSchema.xsd > foo.rs
910
cargo test
1011
```
1112

xml-schema/Cargo.toml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[package]
2+
name = "xml-schema"
3+
version = "0.1.0"
4+
authors = ["Valentin Lorentz <[email protected]>"]
5+
6+
[dependencies]
7+
#quick-xml = "0.12.1"
8+
xmlparser = "0.5.0"
9+
codegen = { git = "https://github.com/carllerche/codegen" }
10+
heck = "0.3.0"
11+
bigdecimal = "0.0.12"
12+
num-traits = "0.2.5"
13+
14+
[dev-dependencies]
15+
pretty_assertions = "^0.4"
16+
17+
[[bin]]
18+
name = "gen"
19+
path = "src/bin/gen.rs"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)