This repository has been archived by the owner on Jun 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cargo) Create 2
Cargo.toml
file: One for stable, one for nigh…
…tly. `rustc` nightly is required for `no_std`, which is required only for the WASM target. nom needs to be used with the feature `alloc` in this particular case. So to get stable for every other targets, we should write: ```toml [target.'cfg(feature = "wasm")'.dependencies] nom = { version = "4.0.0", default-features = false, features = ["alloc"] } [target.'cfg(not(feature = "wasm"))'.dependencies] nom = { version = "4.0.0" } ``` Sadly, it does not work, see rust-lang/cargo#2524. The only alternative I found so far, is to use 2 `Cargo.toml` files. Next commits are likely to split the repository into Cargo workspaces.
- Loading branch information
Showing
7 changed files
with
102 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[build] | ||
target-dir = "./target" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[package] | ||
name = "gutenberg_post_parser" | ||
version = "0.10.0" | ||
authors = ["Ivan Enderlin <[email protected]>"] | ||
license = "BSD-3-Clause" | ||
readme = "../../README.md" | ||
repository = "https://github.com/Hywan/gutenberg-parser-rs" | ||
build = "../../build.rs" | ||
|
||
[[bin]] | ||
name = "gutenberg-post-parser" | ||
path = "../../src/main.rs" | ||
required-features = ["bin"] | ||
|
||
[lib] | ||
name = "gutenberg_post_parser" | ||
crate-type = ["cdylib", "dylib", "lib", "staticlib"] | ||
path = "../../src/lib.rs" | ||
|
||
[profile.release] | ||
debug = false | ||
lto = true | ||
opt-level = 3 | ||
|
||
[features] | ||
default = ["nodejs"] # Because of a strange behavior, `nodejs` must be in `default`. Use `just --list` to compile correctly. | ||
wasm = ["wee_alloc"] | ||
c = ["cbindgen"] | ||
nodejs = ["neon", "neon-build", "serde_json", "neon-serde"] | ||
bin = ["failure", "clap"] | ||
|
||
[dependencies] | ||
nom = { version = "4.0.0", default-features = false, features = ["alloc"] } | ||
wee_alloc = { version = "0.4.1", optional = true } | ||
neon = { version = "0.1.23", optional = true } | ||
serde_json = { version = "1.0.21", optional = true } | ||
neon-serde = { version = "0.0.3", optional = true } | ||
failure = { version = "0.1.1", optional = true } | ||
clap = { version = "^2.31.2", optional = true } | ||
|
||
[build-dependencies] | ||
cbindgen = { version = "0.6.0", optional = true } | ||
neon-build = { version = "0.1.23", optional = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[package] | ||
name = "gutenberg_post_parser" | ||
version = "0.10.0" | ||
authors = ["Ivan Enderlin <[email protected]>"] | ||
license = "BSD-3-Clause" | ||
readme = "../../README.md" | ||
repository = "https://github.com/Hywan/gutenberg-parser-rs" | ||
build = "../../build.rs" | ||
|
||
[[bin]] | ||
name = "gutenberg-post-parser" | ||
path = "../../src/main.rs" | ||
required-features = ["bin"] | ||
|
||
[lib] | ||
name = "gutenberg_post_parser" | ||
crate-type = ["cdylib", "dylib", "lib", "staticlib"] | ||
path = "../../src/lib.rs" | ||
|
||
[profile.release] | ||
debug = false | ||
lto = true | ||
opt-level = 3 | ||
|
||
[features] | ||
default = ["nodejs"] # Because of a strange behavior, `nodejs` must be in `default`. Use `just --list` to compile correctly. | ||
wasm = ["wee_alloc"] | ||
c = ["cbindgen"] | ||
nodejs = ["neon", "neon-build", "serde_json", "neon-serde"] | ||
bin = ["failure", "clap"] | ||
|
||
[dependencies] | ||
nom = { version = "4.0.0" } | ||
wee_alloc = { version = "0.4.1", optional = true } | ||
neon = { version = "0.1.23", optional = true } | ||
serde_json = { version = "1.0.21", optional = true } | ||
neon-serde = { version = "0.0.3", optional = true } | ||
failure = { version = "0.1.1", optional = true } | ||
clap = { version = "^2.31.2", optional = true } | ||
|
||
[build-dependencies] | ||
cbindgen = { version = "0.6.0", optional = true } | ||
neon-build = { version = "0.1.23", optional = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.