Ingvar Stepanyan
87b4c5c7b1
Add rust-toolchain file set to nightly
...
This allows new contributors to avoid manually running `rustup override set nightly`.
7 years ago
Nick Fitzgerald
51e6351c28
Merge pull request #440 from fitzgen/build-profiles-toml-config
...
Add three build profiles and infrastructure for their toml config
7 years ago
Nick Fitzgerald
64d52d8735
Add three build profiles and infrastructure for their toml configuration
...
Fixes #153
Fixes #160
7 years ago
Alex Crichton
91e3293529
Merge pull request #389 from xmclark/fix-canonical-paths-on-windows
...
fix canonical paths windows
7 years ago
Mackenzie Clark
b3d62e1649
do not canonicalize the crate path
7 years ago
Nick Fitzgerald
b107874817
Merge pull request #442 from alexcrichton/cdylib
...
Don't require cdylib crate-type for testing
7 years ago
Alex Crichton
fe48dbd15a
Don't require cdylib crate-type for testing
...
The `cdylib` crate type output isn't actually necessary for the
`wasm-pack test` stage because `wasm-bindgen` isn't run over a wasm
file. This commit removes the checks during `wasm-pack test` that the
`cdylib` crate type is configured.
7 years ago
Nick Fitzgerald
9e1e9b0cb3
Merge pull request #439 from fitzgen/rename-debug-to-dev
...
Rename `--debug` to `--dev` to match `cargo`
7 years ago
Alex Crichton
401f114991
Merge pull request #436 from alexcrichton/error
...
Replace internal `Error` with `failure::Error`
7 years ago
Alex Crichton
11beac3736
Replace internal `Error` with `failure::Error`
...
This commit removes the internal `Error` type in favor of exclusively
using the `failure::Error` type, simplifying error construction in a
number of locations and reducing the number of error types in play.
7 years ago
Nick Fitzgerald
3575a0a5fc
Rename `--debug` to `--dev` to match `cargo`
...
See #437
7 years ago
Alex Crichton
7796ecb311
Merge pull request #435 from alexcrichton/handle-rename
...
Fix wasm-bindgen if lib is renamed via `lib.name`
7 years ago
Alex Crichton
35fe250d09
Fix wasm-bindgen if lib is renamed via `lib.name`
...
This commit fixes an issue where if a library is renamed via the `name`
key in the `[lib]` section of the manifest then `wasm-pack` would try to
generate bindings for an noexistent wasm-file, generating an error.
The fix was to internally use `cargo_metadata` more aggressively and
move around where this data is generated. This ended up refactoring a
few locations, but this should also bring improved error messages for
`cargo metadata` as well as caching the resulting data more aggressively
to avoid recalculating it too much.
Closes #339
7 years ago
Alex Crichton
e8b3075dae
Merge pull request #430 from fitzgen/build-crate-in-a-workspace
...
Build crate in a workspace
7 years ago
Nick Fitzgerald
8abedfebbe
Run `cargo fmt`
7 years ago
Nick Fitzgerald
e7145e585f
Add a test for building a wasm crate in a workspace
...
Fixes #252
7 years ago
Nick Fitzgerald
0bb4fc4352
Merge pull request #433 from fitzgen/update-mdbook
...
deps: Update mdbook version we use to build the book
7 years ago
Nick Fitzgerald
400cfba7c1
Merge pull request #431 from fitzgen/stop-reading-cargo-toml-many-times
...
Stop reading cargo toml many times
7 years ago
Nick Fitzgerald
91e3de352b
Merge pull request #432 from fitzgen/name-field-for-ci-jobs
...
CI: Use `name` field for Travis CI jobs
7 years ago
Nick Fitzgerald
4d3c97de05
deps: Update mdbook version we use to build the book
7 years ago
Nick Fitzgerald
098eb33cea
Run cargo fmt
7 years ago
Nick Fitzgerald
f63abe0c8a
CI: Also log the rustfmt version
7 years ago
Nick Fitzgerald
8a59cf2956
CI: Use `name` field for Travis CI jobs
7 years ago
Nick Fitzgerald
6d3e9dfebb
Refactor: make `check_crate_config` a method of `CargoManifest`
7 years ago
Nick Fitzgerald
25490301e0
Refactor: make `get_crate_name` a method of `CargoManifest`
7 years ago
Nick Fitzgerald
0e09b3fd3c
Refactor: make `write_package_json` a method on `CargoManifest`
7 years ago
Nick Fitzgerald
511e6c29a0
Refactor: replace `manifest::read_cargo_toml` with a constructor
7 years ago
Nick Fitzgerald
4e6abcfd1d
Only read the `Cargo.toml` manifest once
...
And then keep reusing what we read, instead of re-reading it again.
Fixes #25
7 years ago
Nick Fitzgerald
dac12d3e34
Merge pull request #426 from alexcrichton/home-dir-cache
...
Use a global cache for all downloaded binaries
7 years ago
Alex Crichton
f986edf4c7
Move test synchronization to tests, not in `wasm-pack`
...
In `wasm-pack` it can't do cross-process synchronization, and in tests
there's now multiple processes which need to be synchronized.
7 years ago
Alex Crichton
110d930351
Assert not only an error happens but the right error happens
...
Add message assertions to the various assertions in `test.rs`
7 years ago
Alex Crichton
c664cfddd1
Use a global cache for all downloaded binaries
...
This commit switches wasm-pack to using a global cache for all download
binaries, living typically in a user's home directory. The intention
here is to aovid creating a `bin` folder in all wasm-pack projects and
additionally share downloads between projects to ensure that you're
downloading a minimal number of binaries from the network.
Along the way the downloading code was restructured to support a global
cache, but everything should largely be as it was before!
Closes #292
7 years ago
Nick Fitzgerald
df4ef1f451
Merge pull request #424 from fitzgen/issue-422
...
Issue 422
7 years ago
Nick Fitzgerald
1bbc966240
Don't print stdout/stderr in error messages because we already pipe that to console when running the child process
...
Fixes #422
7 years ago
Nick Fitzgerald
b16660375e
Add "Error:" prefix to error messages
7 years ago
Nick Fitzgerald
352b47d732
Provide better error context for `cargo build`
7 years ago
Nick Fitzgerald
9218c65d07
Merge pull request #417 from fitzgen/issue-416
...
Add no-modules to --target flag's help text
7 years ago
Nick Fitzgerald
916a35ffcf
CI: run normal tests and cargo tests separately
7 years ago
Nick Fitzgerald
66223f1b25
CI: run tests single threadedly on hunch that cargo bug is due to interleaving
7 years ago
Nick Fitzgerald
7768f54d88
CI: use stable toolchain in appveyor
7 years ago
Nick Fitzgerald
604bcf1473
Pin appveyor to an older nightly until we figure out the cargo/rustc bug
7 years ago
Nick Fitzgerald
182c3931c3
Run cargo fmt
7 years ago
Nick Fitzgerald
0ca6d2475b
Update Cargo.lock
7 years ago
Nick Fitzgerald
965ae35933
Add no-modules to --target flag's help text
...
Fixes #416
7 years ago
Nick Fitzgerald
d689c50408
Merge pull request #412 from mstallmo/typo-fix
...
Fix typo in test function name for copying the README
7 years ago
Nick Fitzgerald
600d02b292
Merge pull request #408 from huangjj27/test-build-for-example
...
test(command/build): add a test for build command
7 years ago
Junjie Huang
29c19f8a40
Merge branch 'master' into test-build-for-example
7 years ago
huangjj27
c713477ac8
change for cargo_metadata
7 years ago
huangjj27
ee9116d2e0
bugfix(bindgen-target-dir): use PathBuf to join
...
the old code are hard coded path with "/", which may cause error
on windows, thus changing to use PathBuf.join.
fixing #414
7 years ago
Mason Stallmo
6426e23cbe
Fix typo in test function name for copying the README
7 years ago