-
-
Child Process and output management - fitzgen, issue/287 pull/392
Not exactly a "fix", but definitely a huge improvment in how child processes and their output are handled by
wasm-pack
. Ever sat at a long prompt fromwasm-pack
and wondered what was happening? No longer! Didwasm-pack
eat your test output- no more! -
Less scary missing field messages - mstallmo, issue/393 pull/394
After watching a livestream of someone using
wasm-pack
, fitzgen noted that folks seemed pretty alarmed by the loud warning about missing optional manifest fields. As a result, we are now downgrading those messages from WARN to INFO, and consolidating them on a single line. -
Add
exit_status
to CLI errors - konstin, issue/291 pull/387We'd been hiding these- but we shouldn't have been!
-
Remove lingering forced nightly usage - alexcrichton, pull/383
In 0.5.0 we removed all forced nightly usage as we depend on
~1.30
which is now available on both nightly and beta channels! We had a bit of a race condition with that PR and thewasm-pack test
PR, and missed a few as a result! This removes all lingering forced nightly, which only affected thewasm-pack test
command. -
Fix
wasm-bindgen-test
dependency error message - fitzgen, issue/377 pull/378The error message about missing the
wasm-bindgen-test
dependency errantly stated that the user was missing awasm-bindgen
dependency! We've fixed it to correctly state the missing dependency now.
-
-
-
Website! - ashleygwilliams, [pull/246]
We have a website now. It has the installer and links to documentation. In the future, we hope to have calls to action for folks first coming to the site who are looking to do specific things- these will help them find the docs and tutorials they need to.
This PR also has a complete rework of our documentation.
Check it out here!
-
-
BREAKING: use correct
package.json
keys for generated JavaScript - ashleygwilliams, issue/309 pull/312This is marked as potentially breaking because it changes the
package.json
keys that are generated by the project.Previously, we generated a JavaScript file and placed it in the
main
key, regardless of what you were targeting, ES6 and Node.js alike.We have received a lot of requests for
wasm-pack
to generate "isomorphic" packages, that contain assets that could work on both Node.js and ES6, and this led to us looking more closely at how we are usingpackage.json
.With this release, we will do the following:
-
--target browser
: By default, we generate JS that is an ES6 module. We used to put this in themain
field. Now we put it in themodule
field. We also addsideEffects: false
so that bundlers that want to tree shake can. -
--target nodejs
: This target doesn't change. We put generated JS that is a CommonJS module in themain
key. -
--target no-modules
: This is a new target. For this target we generate bare JavaScript. This code is put in abrowser
field.
You can see the structs that represent each target's expected
package.json
here.Thanks so much to bterlson for his help in sorting this out for us!
-
-
-
-
wasm-pack init
is nowwasm-pack build
- csmoe, issue/188 pull/216When this project was first conceived, we imagined it would be simply a way to package up generate wasm and js and publish it to npm. Here we are at version
0.5.0
and we have become much more- an integrated build tool!As a result, the original command
init
does a lot more than that these days. We've renamed the command to better reflect the work it's actually doing.init
will still work, but is deprecated now, and we will eventually remove it. -
add new command:
wasm-pack test
- fitzgen, pull/271This is an experimental new command that will run your tests in Node.js or a headless browser using
wasm-pack test
. Check out this tutorial to learn more! -
add 2FA support to
wasm-pack publish
- mstallmo, issue/257 pull/282We've been wrapping the
npm login
andnpm publish
commands aswasm-pack login
andwasm-pack publish
for a while now- but we didn't fully support two factor authentication. Now we do! (Be safe out there! 2FA is good for everyone!)
-
-
-
New target, bare JavaScript:
--target no-modules
- ashleygwilliams, issue/317 pull/327wasm-bindgen
offers ano-modules
flag that until now, we didn't support. This flag produces bare, no modules JavaScript. So if that's your thing, this target is for you! -
--access
flag forwasm-pack
publish - ashleygwilliams, issue/297 pull/299Many of our tutorials use scopes to help prevent folks from attempting to publish packages that will lead to npm Registry errors because the package name already exists.
However, by default, scoped packages are assumed by the npm registry to be private, and the ability to publish private packages to the npm registry is a paid feature. Worry not! Now you can pass
--access public
towasm-pack publish
and publish scoped packages publicly.
-
-
-
rustc version check - ashleygwilliams, [issue/351] [pull/353]
Now that we have a new fangled installer, there's a chance that folks might install
wasm-pack
and not have Rust installed. Additionally, now that the features we required from thenightly
channel of Rust have moved tobeta
- we don't need to enforcenightly
.As of this release, we will check that your Rust version is above
1.30.0
. You can be on either thenightly
orbeta
channel and all ofwasm-pack
s calls tocargo
will respect that.Really hate this? You can pass
--mode force
towasm-pack
to skip this check. I hope you know what you're doing! -
coordinating wasm-bindgen versions and installing from binaries for improved speed - datapup, issue/146 pull/244 pull/324
This is the true gem of this release. Have you been frustrated by how long
wasm-pack
takes to run? Overusing--mode no-install
? This is the release you're looking for.Many releases back we realized that folks were struggling to keep the
wasm-bindgen
library that their project used in sync with thewasm-bindgen
CLI application whichwasm-pack
runs for you. This became such an issue that we opted to force installwasm-bindgen
to ensure that everywasm-pack
user had the latest version.Like many technical solutions, this solved our original problem, but caused a new one. Now, we we are forcing a
cargo install
ofwasm-bindgen
on every run, and that means downloading and compilingwasm-bindgen
everytime you want to runwasm-pack
. That's unacceptable!We're happy to announce that we have a pretty great solution, and several more planned for future releases. As of this release, we will read your
Cargo.lock
to find the version ofwasm-bindgen
you are using in your local project. We will attempt to fetch a binary version ofwasm-bindgen
that matches your local version. We place that binary local to your project, and use it when you runwasm-pack build
. The next time you runwasm-pack build
we'll use that binary, instead of fetching a new one. We still fall back tocargo install
for less common architectures but this is a huge speed improvement. Check out these benchmarks!$ time wasm-pack init # fresh build real 1m58.802s user 14m49.679s sys 0m24.957s $ time wasm-pack init # re-build real 0m56.953s user 11m12.075s sys 0m18.835s $ time wasm-pack init -m no-install # re-build with no-install real 0m0.091s user 0m0.052s sys 0m0.042s
$ time wasm-pack build # fresh build real 1m3.350s user 3m46.912s sys 0m6.057s $ time wasm-pack build # re-build real 0m0.230s user 0m0.185s sys 0m0.047s $ time wasm-pack build -m no-install # re-build with no-install real 0m0.104s user 0m0.066s sys 0m0.041s
-
enforce
cargo build
with--lib
- ashleygwilliams, issue/303 pull/330Right now,
wasm-pack
only works on Rust library projects. But sometimes, if you're new to Rust, you might end up having amain.rs
in your project, just by mistake. Some folks ran into this and realized that it can cause issues!As a result, we are enforcing that
cargo build
only build the library at this time.Want to use
wasm-pack
on a binary application? We're interested in hearing from you! Checkout issue/326 and please comment! We want to support binary applicaitons in the future and are always happy and curious to hear about how folks usewasm-pack
!
-
-
-
Appveyor Windows Pre-Built binaries - alexcrichton, issue/147 pull/301
We finally got Appveyor to publish pre-built binaries to GitHub releases. Aside: I really wish there were an easier way to test and debug this stuff.
-
new experimental installer - alexcrichton, pull/307
Whew, this one is exciting. Up until now,
wasm-pack
has been distributed usingcargo install
. This is not ideal for several reasons. Updating is confusing, and every time it's installed the user has to wait for it to compile- right at the moment they just want to hurry up and use it already.Say hello to the new
wasm-pack
installer- we have an executable for Windows and acurl
script for *nix users. Not pleased with that? File an issue for your preferred distribution method and we'll do our best to get it working!This is experimental- so please try it out and file issues as you run into things! You'll always be able to use
cargo install
as a backup.Checkout the new installer here!
-
-
-
-
improve readability of warnings about missing optional fields - twilco, pull/296
A little punctuation goes a long way. Error message improvement PRs are the best.
-
update links in README - alexcrichton, pull/300
We had a real dicey documentation situation for a while. Sorry about that, and thank you SO MUCH to all the folks who filed PRs to fix it.
-
fix broken links in book by using relative paths - mstallmo, issue/325 pull/328
-
-
-
recognize
[dependencies.wasm-bindgen]
during dep check ininit
- ashleygwilliams, issue/221 pull/224When we originally implemented the dependency check in
wasm-pack init
we naively only checked for the "simple" dependency declaration,[dependencies] wasm-bindgen="0.2"
. However! This is not the only way to declare this dependency, and it's not the ideal way to do it if you want to specify features from the crate. Now that a bunch of folks want to usefeatures = ["serde-serialize"]
we ran into a bunch of folks having issues with our naive dependency checker! Thanks so much to turboladen for filing the very detailed issue that helped us solve this quickly!PSSSST! Curious what
features = ["serde-serialize"]
withwasm-bindgen
actually does? It's awesome:It's possible to pass data from Rust to JS not explicitly supported in the Feature Reference by serializing via Serde.
Read the Passing arbitrary data to JS docs to learn more!
-
improve UX of publish and pack commands - Mackiovello, pull/198
Previous to this fix, you would need to be in the parent directory of the
/pkg
dir to successfully runpack
orpublish
. This was pretty crummy! Thankfully, Mackiovello swooped in with a fix, that you can find documented in the pack and publish docs! -
use
PathBuf
instead ofString
for paths - Mackiovello, pull/220This is mostly a maintenance PR but does fix one very small bug- depending on if you add a trailing slash to a path that you pass to
init
, you might have seen an extra/
! Now that we're using a proper Type to handle this, that's much better, and in general, all the operations using paths are more robust now.
-
-
-
update docs and tests to eliminate no longer necessary feature flags - ashleygwilliams, pull/226
The Rust 2018 edition marches on and we are seeing feature flags drop like flies :) Instead of a whole slew of feature flags, we now only need one,
#![feature(use_extern_macros)]
, and that one is also not long for this world :)
-
-
-
fix
files
key value for projects build fornodejs
target - ashleygwilliams, issue/199 pull/205We became aware that the
files
key inpackage.json
did not include the additional_bg.js
file thatwasm-bindgen
generates for projects being built for thenodejs
target. This resulted in the file not being included in the published package and resulted in aModule Not Found
error for folks.This was a group effort from mciantyre with pull/200 and Brooooooklyn with pull/197. Thank you so much for your diligence and patience while we sorted through it.
-
-
-
clean up
quicli
remnants - SoryRawyer, pull/193In v0.3.0 we removed the
quicli
dependency, however there were a few remnants left behind. They are now removed!
-
-
-
DOCUMENT EVERYTHING!! and deny missing docs for all future development - fitzgen, pull/208
The
wasm-pack
team has worked hard on tutorial documentation and keeping the codebase as self-explanatory as possible, but we have been slowly accruing a documentation debt. This amazing PR, landed just moments before this point release and was just too good not to include. Thank you so much, fitzgen! -
fix README code example - steveklabnik, pull/195
The code example in our
README.md
was missing a criticalpub
. It's there now! -
fix README markup - Hywan, pull/202
There was an errant
`
- it's gone now!
-
This release has a ton of awesome things in it, but the best thing is that
almost all of this awesome work is brought to you by a new contributor
to wasm-pack
. Welcome ya'll! We're so glad to have you!
-
-
--mode
flag for skipping steps when callinginit
- ashleygwilliams, pull/186After teaching and working with
wasm-pack
for some time, it's clear that people would like the flexibility to run some of the steps included in theinit
command and not others. This release introduces a--mode
flag that you can pass toinit
. The two modes currently available areskip-build
andno-installs
and they are explained below. In the future, we are looking to change theinit
interface, and potentially to split it into two commands. If you have thoughts or opinions on this, please weigh in on issue/188!-
skip-build
mode - kohensu, pull/151wasm-pack init --mode skip-build
Sometimes you want to run some of the shorter meta-data steps that
wasm-pack init
does for you without all the longer build steps. Now you can! Additionally, this PR was a fantastic refactor that allows even more custom build configurations will be simple to implement! -
no-installs
mode - ashleygwilliams, pull/186wasm-pack init --mode no-installs
Sometimes you want to run
wasm-pack
and not have it modify your global env by installing stuff! Or maybe you are just in a hurry and trust your env is set up correctly- now the--mode no-install
option allows you to do this.
-
-
wasm-pack init --debug
Find yourself needing to compile your Rust in
development
mode? You can now pass the--debug
flag to do so! Thanks so much to clanehin for filing issue/126 for this feature... and then implementing it!
-
-
-
ensure you have
cdylib
crate type - kendromelon, pull/150One of the biggest mistakes we've seen beginners make is forgetting to declare the
cdylib
crate type in theirCargo.toml
before runningwasm-pack init
. This PR fixes that, and comes from someone who ran into this exact issue learning aboutwasm-pack
at JSConfEU! Love when it works out like this. -
ensure you have declared wasm-bindgen as a dep - robertohuertasm, pull/162
Another easy mistake to make is to forget to declare
wasm-bindgen
as a dependency in yourCargo.toml
. Nowwasm-pack
will check and make sure you have it set before doing a bunch of long build steps :) -
ensure you are running
nightly
- FreeMasen, pull/172wasm-pack
currently requires that you run it withnightly
Rust. Now,wasm-pack
will make sure you havenightly
installed and will ensure thatcargo build
is run withnightly
. Thanks so much to FreeMasen for filing issue/171 and fixing it!
-
-
fixed broken progress bar spinner - migerh, pull/164
Oh no! We broke the progress bar spinner in version 0.3.0. Thankfully, it's fixed now- with a thoughtful refactor that also makes the underlying code sounder overall.
-
WIP bot - ashleygwilliams & mgattozzi, issue/170
We've got a lot of work happening on
wasm-pack
so it's good to have a bit of protection from accidentally merging a Work In Progress. As a result, we now have the WIP Github App set up onwasm-pack
. Great suggestion mgattozzi! -
modularize
command.rs
- ashleygwilliams, pull/182Thanks to the growth of
wasm-pack
,command.rs
was getting pretty long. We've broken it out into per command modules now, to help make it easier to read and maintain! -
improve PoisonError conversion - migerh, pull/187
As part of the awesome progress bar spinner fix in pull/164, migerh introduced a small concern with an
unwrap
due to an outstanding need to convertPoisonError
intowasm-pack
's customError
. Though not a critical concern, migerh mitigated this right away by replacingstd::sync::RwLock
with theparking_lot
crate! This cleaned up the code even more than the previous patch! -
wasm category for crates.io discovery- TomasHubelbauer, pull/149
crates.io has categories to help folks discover crates, be we weren't leveraging it! Now- if you explore the
wasm
category on crates.io you'll seewasm-pack
!
-
human panic is now 1.0.0 - spacekookie, pull/156
Congrats friends! We like what you do.
-
cleaned up the README - ashleygwilliams, pull/155
Our
README
was struggling with a common problem- doing too much at once. More specifically, it wasn't clear who the audience was, contributers or end users? We've cleaned up our README and created a document specifically to help contributors get up and running.
Babby's first point release! Are we a real project now?
-
fixed
init
Is a Directory
error - ashleygwilliams, pull/139Our new logging feature accidentally introduced a regression into 0.3.0. When calling
wasm-pack init
, if a directory was not passed, a user would receive a "Is a Directory" Error. Sorry about that! Thanks to jbolila for filing issue/136!
-
typescript files were not included in published package - danreeves, pull/138
Generating Typescript type files by default was a pretty rad feature in 0.3.0 but we accidentally forgot to ensure they were included in the published package. Thanks so much to danreeves for catching this issue and fixing it for us!
-
Up until now, we've forced folks to rely on emoji-jammed console output to debug errors. While emojis are fun, this is often not the most pleasant experience. Now we'll generate a
wasm-pack.log
file ifwasm-pack
errors on you, and you can customize the log verbosity using the (previously unimplemented) verbosity flag.
-
--target
flag - djfarly, pull/132wasm-bindgen-cli
is able to generate a JS module wrapper for generated wasm files for both ES6 modules and CommonJS. Up until now, we only used wasm-bindgen's default behavior, ES6 modules. You can now pass a--target
flag with eithernodejs
orbrowser
to generate the type of module you want to use. Defaults tobrowser
if not passed.
-
human readable panics - yoshuawuyts, pull/118
Panics aren't always the most friendly situation ever. While we never want to panic on ya, if we do- we'll do it in a way that's a little more readable now.
-
typescript support by default - kwonoj, pull/109
wasm-bindgen
now generates typescript type files by default. To suppress generating the type file you can pass the--no-typescript
flag. The type file is useful for more than just typescript folks- many IDEs use it for completion!
-
wrap
npm login
command - djfarly, pull/100In order to publish a package to npm, you need to be logged in. You can now use
wasm-pack login
to login to the npm (or any other) registry.
-
exit early on failure - mgattozzi, pull/90
Until now,
wasm-pack
would continue to run tasks, even if a task failed. Now- if something fails, we'll exit so you don't have to wait to fix the error.
-
force install wasm-bindgen - ashleygwilliams, pull/133
Using an out of date version of
wasm-bindgen
can run you into a bunch of trouble. This very small change should fix the large number of bug reports we received from users using an out of datewasm-bindgen-cli
by force installingwasm-bindgen-cli
to ensure the user always has the latest version. We don't expect this to be a forever solution (it's a bit slow!) but it should help those who are getting started have a less rough time.
-
fix CI release builds - ashleygwilliams, pull/135
This was not working! But now it is! You can always use
cargo install
to install wasm-pack, but now you can find pre-built Linux and Mac binaries in the Releases tab of our GitHub repo.
-
remove
quicli
dependency - mgattozzi, pull/131While
quicli
is a great way to get started writing a CLI app in Rust- it's not meant for large, mature applications. Now thatwasm-pack
is bigger and has many active users, we've removed this dependency to unblock further development on the tool.
-
update rustfmt CI test - djfarly, pull/128
Since 0.2.0 how one should call
rustfmt
changed! We've kept it up to date so we can continue to maintain conventional style in the codebase.
-
custom module for errors - mgattozzi, pull/120
Thanks to the
failure
crate, we've been playing fast and loose with errors for a bit. We're finally getting serious about error handling - by organizing all of our specific errors in a specific module. This will make it easier to communicate these errors out and handle new error cases from future features.
Special thanks to data-pup who continues to be our documentation champion! In case you missed it, check out the guides in the docs directory!!
This release focuses on filling out all commands and improving stderr/out handling for improved user experience!
pack
andpublish
- jamiebuilds, pull/67 You can now runwasm-pack pack
to generate a tarball of your generated package, as well as runwasm-pack publish
to publish your package to the npm registry. Both commands require that you have npm installed, and thepublish
command requires that you be logged in to the npm client. We're working on wrapping thenpm login
command so that you can also login directly fromwasm-pack
, see pull/100 for more details.
-
package.json
is pretty printed now - yoshuawuyts, pull/70Previously,
package.json
was not very human readable. Now it is pretty printed! -
collaborators
- yoshuawuyts, pull/70wasm-pack
now will fill out thecollaborators
field in yourpackage.json
for you based on yourCargo.toml
authors
data. For more discussion on how we decided on this v.s. other types ofauthor
fields inpackage.json
, see issues/2.
- Release binaries built with CI - ashleygwilliams, pull/103
Thanks so much to mgattozzi, data-pup, sendilkumarn, Andy-Bell, steveklabnik, jasondavies, and edsrzf for all the awesome refactoring, documentation, typo-fixing, and testing work. We appreciate it so much!
- First release!