-
-
Update binary-install to v0.4.1 - drager, pull/1407
Release v0.4.0 of binary-install introduced a regression that caused failures on some platforms. This release fixes that regression.
-
** Allow npm binary upgrades - net, pull/1439**
Fixes an issue where upgrading
wasm-packvia NPM would not update the underlying binary. Previously, the binary was stored in thebinary-installpackage's directory without versioning, causing version upgrades to silently fail as the old binary continued to be used. The binary is now stored innode_modules/wasm-pack/binary/, ensuring proper version updates when upgrading the package.Before: Upgrading from
0.12.1to0.13.0would continue using the0.12.1binary After: Eachwasm-packversion manages its own binary, enabling proper version upgrades
-
-
- ** Remove unmaintained dependency atty in favor of stdlib - mariusvniekerk, pull/1436**
-
-
Add option to skip optimization with wasm-opt - sisou, pull/1321
This feature introduces the
--no-optoption to wasm-pack, providing a significant improvement in build efficiency for projects requiring multiple wasm-pack executions. -
Add support geckodriver for linux-aarch64 - EstebanBorai, pull/1371
Introduces support to download Geckodriver in Linux aarch64.
-
Add wasm-opt linux aarch64 condition - dkristia, issue/1392, pull/1393
A linux aarch64 build for wasm-opt exists in the newest binaryen versions.
-
-
-
Fix passing relative paths to cargo - dfaust, issue/704, issue/1156, issue/1252, pull/1331
When building a crate located in a sub-directory, relative paths, passed as extra options to cargo (like
--target-dir), are now handled correctly. -
Rewrite wasm_target to use target-libdir - daidoji, issue/1342, pull/1343
Rewritten wasm_target to use target libdir from the rustc tool rather than looking through sysroot. This is to accomodate non-rustup installations.
-
Declare ES module in package.json - gthb, issue/1039, pull/1061
In bundler mode, generate package.json with "type": "module" and use the "main" attribute instead of the "module" attribute.
This change makes the built ES module palatable to Node.js (when run with --experimental-vm-modules --experimental-wasm-modules), while it remains also palatable to webpack as illustrated in webpack/webpack#14313 (where the pkg subfolder is generated with wasm-pack built with this change). This resolves the headache of using a wasm-pack-built package in a library that one needs to both run directly in Node and include in a webpack build.
-
Use new chromdriver endpoint and fix CI - Myriad-Dreamin, kade-robertson, issue/1315, issue/1390, pull/1325, pull/1391
-
Add mingw support to npm package - nathaniel-daniel, issue/1354, issue/1359, pull/1363
Fixes the NPM package's platform detection for mingw.
-
pkg-dir option for pack and publish commands - danielronnkvist, issue/1369, pull/1370
To be able to use these commands when the output directory option to the build command isn't the default pkg.
-
Optimize out-dir display - ahaoboy, issue/1395, pull/1396
Optimize out-dir display.
from:
[INFO]: π¦ Your wasm pkg is ready to publish at /root/code/fib-wasm/fib-rs/../fib-wasm/wasm.to:
[INFO]: π¦ Your wasm pkg is ready to publish at /root/code/fib-wasm/fib-wasm/wasm.
-
-
-
Fix error and warnings in install script - lucashorward, issue/1159, issue/1217, issue/1283, pull/1320
-
Bump follow-redirects from 1.14.9 to 1.15.6 in /npm - dependabot, pull/1375
-
Bump rustls-webpki from 0.100.1 to 0.100.2 - dependabot, pull/1323
-
Bump rustix from 0.37.20 to 0.37.25 - dependabot, pull/1341
-
Bump rustls from 0.21.9 to 0.21.11 - dependabot, pull/1385
-
Bump tar from 6.1.11 to 6.2.1 in /npm - dependabot, pull/1379
-
-
-
Fix typo in README - Lionelf329, [pull/1368]
-
Add a description of build --target deno - puxiao, pull/1344
-
Fix local navigation backing one step too far in docs - SamuSoft, pull/1387
-
Add --target web to quick start build command - josephrocca, pull/1367
-
-
-
Restore --version command - lynn, issue/1301, pull/1305
The --version command got lost in space in v0.12.0. It's now brought back!
-
Fix value parser for Option - Myriad-Dreamin, issue/1304, pull/1307
A value parser for OsString cannot parse a command line argument for Option, which let it failed to specify paths for pack, publish and test commands, this faulty behavior was introduced in v0.12.0.
-
-
-
Add --no-pack flag to build command - hamza1311, ashleygwilliams, issue/691, issue/811, pull/695, pull/1291
When calling wasm-pack build a user can optionally pass --no-pack and wasm-pack will build your wasm, generate js, and not build a package.json.
-
Add wasmbindgen option: omit_default_module_path - matthiasgeihs, pull/1272
Adds an option to call wasm-bindgen with --omit_default_module_path.
-
-
-
Add HTTP header USER-AGENT - LeviticusNelson, issue/1266, pull/1285
We encountered some issues when we didn't send an User-Agent. This is now fixed.
-
Replace curl with ureq - hamza1311, issue/650, issue/823, issue/997, issue/1079, issue/1203, issue/1234, issue/1281, pull/1290
The HTTP client is now pure Rust. Removes the dependency of openssl which have caused a lot of issues for people using wasm-pack on various distributions.
-
Update binary-install to 0.2.0. binary-install replaced curl with ureq - drager
See PR in binary-install repo for more information.
-
Remove --always-auth from npm login - EstebanBorai, pull/1288
npm login doesn't support --always-auth anymore, instead it is under the adduser subcommand.
-
Turn off cargo colors during log level test - dtolnay, pull/1294
-
Fix getting the target-dir in wasm_bindgen_build - tomasol, issue/1278, pull/1279
Fixes a wasm-pack panic if --target-dir was supplied (and arguments are not sorted).
-
Respect package.readme in Cargo.toml - heaths, issue/1215, pull/1298, pull/1216
wasm-pack now respects specifying readme=false:
[package] readme = false
-
-
-
Bump cargo-generate version to 0.18.2 - sassman, issue/1245 pull/1269
-
Replace unmaintained actions-rs/toolchain action in CI workflows - striezel, pull/1246
Now we are using https://github.com/dtolnay/rust-toolchain instead.
-
Update several dependencies - hamza1311, pull/1292
Updated clap, toml, predicates and serial_test to their latest versions.
-
-
-
Fix discovery of locally installed
wasm-opt- Liamolucko, issue/1247, pull/1257 -
Fix wasm-pack bin script entry - ahippler, issue/1248, pull/1250
-
-
- bump openssl from 0.10.46 to 0.10.48 - pull/1254
-
-
Make Deno target available - egfx-notifications, issue/672, issue/879, pull/1117
-
Add support for more platforms to installer script - omninonsense, issue/1064, issue/952, issue/1125, pull/1122
This makes the installation script work on M1 macs, as well as inside docker (especially when combined with buildx) for aarch64/arm64 architectures.
-
Add Linux arm64 support - nnelgxorz, issue/1169, pull/1170
-
Add support for workspace inheritance - printfn, issue/1180, pull/1185
-
-
-
--target-dir as extra option is now considered as expected - sassman, issue/1076, pull/1082
-
Pass through --weak-refs --reference-types flags to bindgen - serprex, issue/930, pull/937
-
Fix binaryen URL and use updated binary-install to fix installation on macOS - matheus23, printfn, pull/1188
Use the updated binary-install crate (drager/binary-install#21), switches from failure to anyhow to match what binary-install uses, and fixes wasm-opt installation on macOS.
-
Mark snippets and the bundler target's main file as having side effects - Liamolucko, issue/972, rustwasm/wasm-bindgen/3276, pull/1224
-
-
-
Fix typos in non-rustup-setups.md - dallasbrittany, issue/1141, pull/1142
-
Replace two mentions of wasm-pack init with wasm-pack build in the docs - mstange, pull/1086
-
Update npm installation link - benediktwerner, pull/1227
-
-
-
Bump wasm-opt to version 108 - MichaelMauderer, issue/1135 pull/1136
-
Update binary-install to v1.0.1 - EverlastingBugstopper, pull/1130
-
Add back run.js to npm installer - EverlastingBugstopper, pull/1149
-
Update actions/checkout in GitHub Actions workflows to v3 - striezel, pull/1221
-
Update actions/cache in GitHub Actions workflows to v3 - striezel, pull/1222
-
Update JamesIves/github-pages-deploy-action in GHA workflow to v4.4.1 - striezel, pull/1223
-
-
-
Use bash to create release tarballs - nasso, issue/1097 pull/1144
Fixes Windows installer failure due to malformatted tar.
-
Clean up package.json from previous runs - main--, issue/1110-comment pull/1119
Remove the package.json file from previous runs to avoid crashes.
-
Do not remove the pkg directory - huntc, issue/1099 pull/1110
A recent change ensured that the pkg directory was removed as the first step of attempting to create it. Unfortunately, this caused a problem for webpack when watching the pkg directory. Webpack was unable to recover its watching and so any watch server must be restarted, which is a blocker when using it. This PR and release fixes this.
-
Bump regex from 1.5.4 to 1.5.6 - dependabot, pull/1147
Version 1.5.5 of the regex crate fixed a security bug in the regex compiler.
-
Bump openssl-src from 111.17.0+1.1.1m to 111.20.0+1.1.1o - dependabot, pull/1146
Bring in bug fixes from the new version of openssl-src.
-
-
-
Add support for macos aarch64 - d3lm, issue/913 pull/1088
This fixes aarch64 for MacOS and will download x86_64-apple-darwin.
-
Add linux/arm64 to release workflow - nacardin, issue/1064 pull/1065
-
Force axios version - drager, pull/1094
Forces npm package
axiosto version0.21.2in order to get security fix for a security vulnerability present in axios before version0.21.2.
-
-
- Update docs for how to pass extra options to cargo - FrankenApps, issue/1059 pull/1073
-
- Add exe to binary name if windows - drager, issue/1038 pull/1055
-
-
Added keywords - lucashorward, issue/707 pull/838
package.jsonfiles usually contain a keywords array so that npm can make searching easier. This PR extracts keywords fromCargo.tomland puts them intopackage.json.
-
-
-
Update binary-install to get fix for axios security vulnerability - simlay, Rizary, issue/958 pull/973 pull/1012
Updates
binary-installnpm package to version^0.1.0in order to get security fix for a security vulnerability in axios. -
Fix cargo-generate installation - bradyjoslin, issue/975 issue/907 pull/983
wasm-pack new hello-wasmdidn't work due to a bad link when trying to installcargo-generate.This PR points the installation to the correct place and makes
wasm-pack newworking again! -
Pass through extra options when building tests - azriel91, issue/698 pull/851
wasm-pack testaccepts extra options to pass through tocargowhen running tests. Under the hood, this runscargo buildbeforecargo test, and the additional options were only passed through to thetestcommand. This meant that crates that enabled native features by default could not be built usingwasm-pack, as it would attempt to build tests for thewasm32-unknown-unknowntarget with the native features enabled.This PR passes through the extra options to
cargowhen building the tests as well. -
Corrected files included in package.json for bundler / no target - lucashorward, issue/837 pull/839
wasm-pack buildandwasm-pack build --target bundlergenerates a _bg.js file, but it was not added to thepackage.json. The file that is added, *.js will however reference the _bg.js, so when the package was distributed (both through pack or publish) it is not usable.This PR includes that _bg.js file in
package.json. -
Find the main package if multiple packages have the same name - ghost, pull/830
If there were 2 packages with the same name,
wasm-packwould sometimes use the wrong one and errored.
-
-
-
Fix CI. Remove appveyor and travis and use Github actions - ashleygwilliams, drager, issue/594 issue/979 pull/947
-
Cargo update - ashleygwilliams, pull/800
-
Remove dirs dependency - brightly-salty, issue/943 pull/944
-
-
-
Bump binaryen to version_90 - ashleygwilliams, issue/781 issue/782 pull/687
Previously, wasm-pack was hardcoded to install and attempt to execute wasm-opt on every build using binaryen version 78. This version had various issues on Unix/Linux and caused broken CI builds for many folks (we're so sorry!).
This PR updates the binaryen version to 90, which should fix the issues folks were having.
Long-term, we'd like to create an auto-updating mechanism so that we can install and use the latest release of binaryen as we do for other binaries we orchestrate.
-
-
- Consolidate wasm-opt installation into existing binary install logic - ashleygwilliams, issue/685 pull/687
-
-
Adding in
--quietand--log-levelflags to control the console output - Pauan, pull/694The
--verboseflag has long existed as a way to get more console output, but now there are two flags to get less console output:--quietwill silence all stdout, so only errors will be displayed.--log-levelcan be used to silence[INFO]or[WARN]output from wasm-pack.
You can cause it to display even more information by using
--verbose, or you can silence all stdout by using--quiet.You can also use
--log-levelto have fine-grained control over wasm-pack's log output:--log-level infois the default, it causes all messages to be logged.--log-level warncauses warnings and errors to be displayed, but not info.--log-level errorcauses only errors to be displayed.
These flags are global flags, so they can be used with every command, and they must come before the command:
wasm-pack --log-level error build wasm-pack --quiet build
-
Wrap
cargo-generatewithwasm-pack new- ashleygwilliams, issue/373 pull/623One of the first steps in getting started with
wasm-packis tocargo install cargo-generateto bootstrap some project templates. This can take a while and is an extra burden on users just getting started withwasm-pack.wasm-pack newusescargo-generateto bootstrap new projects, removing the need to install the tool on your own. You can read more about this feature here. -
Allow
wasm-packto be run from subdirectories - gameldar, issue/620 pull/624If a crate path is not specified when running
wasm-packand there is noCargo.tomlin the current working directory,wasm-packwill walk up the directory structure to find aCargo.toml. -
Automatically execute
wasm-opton produced binaries - alexcrichton, issue/159 pull/625When
wasm-packbuilds binaries in released and profiling modes, it will executewasm-opton the binary, making the result smaller and more performant. -
Helpful error message when wasm-bindgen fails because of an old version - gameldar, ashleygwilliams, issue/627 pull/633
wasm-packwill pass a--webflag towasm-bindgenwhenwasm-pack build --target webis run. Before, if the user had an old version ofwasm-bindgenin their dependencies, they would receive a cryptic error message. Now they will be notified that they need to update theirwasm-bindgendependency if they want to build for thewebtarget. -
Publish releases by tag to npm - Tarnadas, pull/690
You can now use
wasm-pack publishto publish tagged releases with the optional--tagargument. You can read more about distribution tags on NPM, and more about this feature in our docs.
-
-
-
Only use exactly v0.24.0 geckodriver on Windows - ashleygwilliams, issue/770 pull/774
wasm-pack testis a great way to test your web Wasm modules- and it very nicely sets up and configures the necessary browser engine drivers to do so!For the v0.25.0 release of geckodriver, the team switched their build environment- which introduced a new surprise runtime dependency, Visual C++ redistributable package, to their windows binaries. You can read more about the issue here, mozilla/geckodriver/issue/1617.
Becuase the introduction of this runtime dependency is considered a bug, and should be eventually fixed, the team decided that the least invasive solution would be to hold geckodriver binaries, on Windows, at v0.24.0, and to disable the auto-update logic, until the bug is fixed.
-
Handle version check failures - drager, issue/652, issue/653 pull/660
Every day,
wasm-packchecks the crates.io API for the latest version number and lets the user know if their installation is out of date. Now, when these API calls fail,wasm-packalerts the user of the failure and waits until the next day to make another call to crates.io. -
Add user agent for version check - drager, issue/651 pull/658
crates.io requires tools to set a version check
User-Agentheader when requesting the latest version. Now, whenwasm-packperforms an API request to crates.io, it sendsUser-Agent: wasm-pack/0.9.0. -
Make
sideEffectsin generatedpackage.jsona boolean instead of a string - rhysd, pull/649 -
Don't warn if license-file is present - ashleygwilliams, issue/692 pull/693
Previously,
wasm-packwould warn that thelicensefield was missing if thelicense-filefield was used instead. This warning is now only surfaced if bothlicenseandlicense-fieldare absent from aCargo.toml. -
Select correct webdriver version - MartinKavik, issue/611 pull/706
wasm-packused to install a pinned version of the Chrome, Gecko, and Safari drivers. Now when a driver needs to be installed,wasm-packwill pull the latest version from the API and install that instead. -
Only run node tests on
wasm-pack test --node- alexcrichton, pull/630 -
Fix npm installs for Windows Users - EverlastingBugstopper, issue/757 pull/759
We recently published
wasm-packon the npm registry but forgot to test on Windows!npm install -g wasm-packnow works on Windows machines. -
Clean up
cargo testwarnings - ashleygwilliams, issue/752 pull/753Tests now use
std::sync::Once::new()instead of the deprecatedstd::sync::ONCE_INIT
-
-
-
Update help message for
buildandpublishsubcommands - ibaryshnikov, issue/636 pull/640wasm-bindgenrecently changed the default target frombrowsertobundlerand deprecatedbrowser. This change is now reflected in the help message forwasm-pack build. -
Add Release Checklist - ashleygwilliams, issue/370 pull/626
While we try to automate releases of
wasm-packas much as possible, there are still some manual steps that need to be completed when releasing a new version (like writing a changelog π). These steps now live inRELEASE_CHECKLIST.md.
-
-
Ensure that
wasm-bindgengenerates move assertions - fitzgen, issue/677 pull/683wasm-packnow createswasm-bindgentest fixtures that must generate move assertions for both free functions and methods. -
Update
cargo_metadatato v0.8.0 - ThomasdenH, pull/670 -
Update
rustfmtinstall snippet in PR template` - data-pup, issue/639 pull/664rustfmtis now available on Rust's stable channel so now thewasm-packPR template recommends installing the stable version instead of the nightly version.
-
-
-
Check for "rustup" rather than ".rustup" when checking for wasm32 - drager, issue/613
When we introduced support for non-rustup setups we did a check if the user was using rustup or not. However, this check was too constrained and only covered the most common cases, but it did not work for Docker setups.
This PR addresses that and it now covers Docker setups as well! When doing this fix we also found two other small issues which this PR also addresses. The first is that we did not print the helpful error message when the wasm32 target was not found and the other one was that it linked to the wrong section of the documentation.
-
-
-
Give user's ability to customize generated filenames with
--out-nameflag - ibaryshnikov, issue/596 pull/599When running
wasm-pack build, several files are generated. These files are named based on the name of the crate, as per yourCargo.tomlfile. Sometimes- that's not the name you'd like your files to have!You can now specify a custom name for the generated files using a new flag,
--out-name. Given a project calleddom, here's a comparison of the default and custom generated filenames:wasm-pack build # will produce files # dom.d.ts dom.js dom_bg.d.ts dom_bg.wasm package.json README.md wasm-pack build --out-name index # will produce files # index.d.ts index.js index_bg.d.ts index_bg.wasm package.json README.md
-
-
-
Fix panics in
build mode --no-install- alexcrichton, pull/598This commit fixes the
wasm-pack build --mode no-installcommand from unconditionally panicking as well as--mode force. These steps were calling anunwrap()on an internalOption<T>which was supposed to be set duringstep_install_wasm_bindgen, but that step wasn't run in these modes. The mode configuration of steps has been refactored slightly to ensure that more steps are shared between these modes to reduce duplication. -
Print unexpected panics to standard error - drager, issue/562 pull/601
Unexpected panics are unfortunate but they're currently covered up and written out to an auxiliary file. This makes panics in CI difficult to debug, especially at a glance, as CI builders are likely not uploading those files.
This PR will print to standard error for unexpected panics and then let
human_panichandle panics, just like before. -
Improve error message when
wasm32-unknown-unknownis missing - drager, issue/579 pull/602For folks with non-rustup environments (which we only started supporting in 0.7.0!), we were giving a missing target error that was not helpful!
We've updated the error message to include more information, and we've added some documentation to help explain how you can remedy the error by manually installing the target on your specific rust setup- including the fact that it may not be possible to add the target to some setups.
Check out the docs here.
-
-
-
Document
--out-dirflag - ashleygwilliams, issue/592 pull/593Recently, someone asked on Discord about customizing the name of the directory that contains the assets built by
wasm-pack. We've had theout-dirflag for a while, but it wasn't documented! Now it is. -
Fix broken links in docs and update for template changes - drager, ashleygwilliams, issue/609 pull/612 pull/614
Recently, some improvements were made to the [
wasmpack-template]. Additionally, there were some broken links in the documentation. We've updated the docs for the new template and fixed the broken links!
-
-
-
Move
binary-installto its own repo - drager, issue/500 pull/600binary-installis a crate that holds the abstractions for howwasm-packdownloads and caches pre-built binaries for the tools it wraps. It was originally part of thewasm-packcode, then moved into a workspace as an independent crate. Now that we believe it's stable, we've moved it into its own repo!
-
-
-
Non
rustupenvironment support - drager, pull/552Before now,
wasm-packhad a hard requirement thatrustuphad to be in the PATH. While most Rust users userustupthere are variety reasons to have an environment that doesn't userustup. With this PR, we'll now support folks who are using a non-rustupenvironment! -
Improved CLI Output - alexcrichton, pull/547
It's hard to decide if this is a fix or a feature, but let's keep it positive! This PR moves
wasm-pack's CLI output strategy closer to the desired standard we have for 1.0. This is important as it fixes many small bugs that are distributed across a diveristy of terminals and difficult to test for locally.This strategy was first introduced as a mini RFC in issue/298, and then was discussed in a session at the Rust All Hands (notes).
You'll notice that the spinner is gone- we eventually want to have one, but we'd like one that doesn't cause bugs! If you have feedback about terminal support or an output bug, please file an issue! We want to hear from you!
Check out the new output in the
READMEdemo- or update yourwasm-packand take it for a spin! -
Add support for
--target web- alexcrichton, pull/567Recently,
wasm-bindgenadd a new target-web. This new target is similar to theno-modulestarget, in that it is designed to generate code that should be loaded directly in a browser, without the need of a bundler. As opposed to theno-modulestarget, which produces an IIFE (Immediately Invoked Function Expression), this target produces code that is an ES6 module.You can use this target by running:
wasm-pack build --target webLearn more about how to use this target by checking out the docs!
-
Support passing arbitrary arguments to
cargo testviawasm-pack test- chinedufn, issue/525 pull/530wasm-pack testis an awesome command that wrapscargo testin a way that helps provide you some nice out of the box configuration and setup. However, you may find yourself wanting to leverage the full funcationality ofcargo testby passing arguments that haven't been re-exported by thewasm-pack testinterface.For example, if you have a large test suite, it can be nice to simply run one test, or a subset of your tests.
cargo testsupports this, however up until now, thewasm-pack testinterface did not!wasm-pack testnow accepts passing and arbitrary set of arguments that it will forward along to itscargo testcall by allowing users to use--after anywasm-pack testarguments, followed by the set of arguments you'd like to pass tocargo test.For example:
# Anything after `--` gets passed to the `cargo test` wasm-pack test --firefox --headless -- --package my-workspace-crate my_test_name --color=alwaysThis will just run the
my_test_nametest and will output using color! -
Support
homepagefield ofCargo.tomlandpackage.json- rhysd, pull/531Both
Cargo.tomlandpackage.jsonsupport ahomepagefield that allow you to specify a website for your project. We didn't support it previously (purely an accidental omission) - but now we do! -
Support
license-filefield inCargo.toml- rhysd, pull/527Sometimes, you want to provide a custom license, or specific license file that doesn't map to SPDX standard licenses. In Rust/Cargo, you accomplish this by omitting the
licensefield and including alicense-filefield instead. You can read more about this in thecargomanifest documentation.In an npm package, this translates to
"license": "SEE LICENSE IN <filename>"in yourpackage.json. You can read more about this in the npmpackage.jsondocumentation.We previously only supported using SPDX standard licenses, by only supporting the
"license"key in yourCargo.toml- but now we'll allow you to leverage thelicense-filekey as well, and will translate it correctly into yourpackage.json!
-
-
-
wasm-pack-init (1).exeshould work - ashleygwilliams, issue/518 pull/550Several users noted that when downloading a new version of
wasm-packtheir browser named the executable filewasm-pack-init (1).exe. When named this way, the file didn't show the init instructions on execution. This happened because the installation logic was requiring an exact match on filename. We've loosened that restriction so that the filename must start withwasm-pack-initand will still execute files with these additional, extraneous charaters in the filename. Thanks so much to Mblkolo and danwilhelm for filing the issue and the excellent discussion! -
Fix chromedriver error and message on Windows for
wasm-pack test- jscheffner, issue/535 pull/537When running
wasm-pack teston a 64-bit Windows machine, users would receive an error:geckodriver binaries are unavailable for this target. This error message had two issues- firstly, it accidentally said "geckodriver" instead of "chromedriver", secondly, it threw an error instead of using the available 32-bit chromedriver distribution. Chromedriver does not do a specific disribution for Windows 64-bit!We've fixed the error message and have also ensured that 64-bit Windows users won't encounter an error, and will appropriately fallback to the 32-bit Windows chromedriver.
-
Correct look up location for
wasm-bindgenwhen it's installed viacargo install- fitzgen, pull/504Sometimes, when a
wasm-bindgenbinary is not available, or ifwasm-packis being run on an architecture thatwasm-bindgendoesn't produce binaries for, instead of downloading a pre-built binary,wasm-packwill installwasm-bindgenusingcargo install. This is a great and flexible back up!However, due to the last release's recent refactor to use a global cache, we overlooked the
cargo installcase and did not look forwasm-bindgenin the appropriate location. As a result, this led to a bug wherewasm-packwould panic.We've fixed the lookup for the
cargo install'dwasm-bindgenby moving thecargo-install'd version to global cache location forwasm-packonce it's successfully built. We also eliminated the panic in favor of propagating an error. Thanks for your bug reports and sorry about the mistake! -
Only print
cargo testoutput the once - fitzgen, issue/511 pull/521Due to some technical debt and churn in the part of the codebase that handles output, we were accidentally printing the output of
cargo testtwice. Now we ensure that we print it only one time!
-
-
-
Fix
clippywarnings - mstallmo, issue/477 pull/478clippyis an awesome utilty that helps lint your Rust code for common optimizations and idioms. at the beginning ofwasm-packdevelopment,clippyhad not yet stablized, but it has since 1.0'd and it was high time we leveraged it inwasm-pack. We still aren't completely fixed, but we're working on it, and we've already dervived a ton of value from the tool! -
Run
clippycheck on Travis - drager, pull/502Now that
wasm-packhas been clippified- we want to keep it that way! Now in addition tocargo fmtandcargo test, we'll also runcargo clippyon all incoming PRs! -
Port tests to use
assert-cmd- fitzgen, pull/522assert_cmdis a great utility for testing CLI applications that is supported by the CLI WG.wasm-packdevelopment began before this library existed- so we were using a much less pleasant and efficient strategy to test the CLI functionality ofwasm-pack. Now we've ported over to using this great library! -
Add initial tests for
binary-installcrate - drager, pull/517In the last release, we separated some of our binary install logic into a new crate,
binary-install. However, that's about all we did... move the logic! In an effort to move the crate into true open source status, drager has done some excellent work adding tests to the crate. This was trickier than it looked and involved creating a test server! Thanks for all the efforts drager, and the great review work fitzgen and lfairy! -
Update tests
wasm-bindgenversion - huangjj27, issue/519 issue/417 pull/526Our tests use fixtures that reference
wasm-bindgenoften, but the versions were not consistent or up to date. As a result, the test suite leverage many version ofwasm-bindgenwhich meant that they took a while to run as they couldn't use the cached version ofwasm-bindgenbecause the cached versions we slightly different! Now they are up to date and consistent so the tests can perform better!
-
-
-
Flag gh-pages docs as unpublished - alexcrichton pull/565
Recently, DebugSteven made a PR to merge all the documentation for the rustwasm toolchain into a single location. This is going to make discovering and using tools from the entire organization easier for new and seasoned folks alike. This also has the feature of displaying documentation that is related to the current published version of each tool- unlike before, where the only accessible documentation was for the tools at current master (which may or may not be currently published!)
If you like reading the current master's documentation- fear not, each tool will still publish the documentation generated from the master branch on their individual
gh-pages(Seewasm-pack'smaster docs here). To avoid confusion, we've added a flash message that let's you know which documentation you are reading- and provides a link to documentation of the published version- just in case that's what you're looking for! -
Add new QuickStart guide for "Hybrid Applications with Webpack" - DebugSteven pull/536
Since
wasm-packwas first published, we've focused on a workflow where a user writes a library and then publishes it to npm, where anyone can use it like any npm package in their JavaScript or Node.js application.Shortly after
wasm-packappeared, some RustWASM teammates created a template for a similar workflow- building a RustWASM package alongside an application. They did this by leveraging Webpack plugins, and it's a really lovely user experience![This template] hasn't gotten as much attention because we've lacked a quickstart guide for folks to discover and follow- now we've got one!
Check out the guide here!
-
Add
wee_allocdeepdive - surma, pull/542wee_allocis a useful utility that deserved more attention and explanation than our previous docs addressed. This was partially because thewasm-packtemplate has an explanatory comment that helps explain its use. However, for folks who don't use the template,wee_allocis something important to know about- so now we have given it its own section!Check out the deepdive here!
-
Update prerequisite documentation - alexcrichton, pull/569
Many folks are using
wasm-packwithout publishing to npm- as a result, we've updated the documentation to clearly indicate that npm is an optional requirement, only required for specific targets and workflows. Additionally, since the 2018 Edition landed,nightlyRust is no longer a requirement. We've removed those instructions and have consolidated the documentation so it is shorter and more efficient at getting you started! -
Clarify what kind of account
loginadds - killercup, pull/539Previously, when view
--help, the command description forloginshowed:π€ Add a registry user account!This could be confusing for folks, so now it's been updated to read:π€ Add an npm registry user account!, which is much clearer! -
Wasm is a contraction, not an acronym - fitzgen, pull/555
Ever wonder how you're actually supposed to refer to WebAssembly in short-form? WASM? wasm? For the pedants out there, the correct usage is "Wasm" because Wasm is a contraction of the words Web and Assembly. We've updated our doucmentation to consistently refer to WebAssembly as Wasm in the shortform.
The more you know!
-
Fix links and Rust highlightning - drager, issue/513 pull/514 pull/516
We had some broken links and missing Rust syntax highlighting in a few sections of the docs. This fixes that!
-
-
-
Add three build profiles and infrastructure for their toml config - fitzgen, issue/153 issue/160 pull/440
When originally conceived,
wasm-packwas exclusively a packaging and publishing tool, which naively assumed that the crate author would simply runwasm-packwhen they were ready to publish a wasm package. As a result,wasm-packalways rancargo buildin--releasemode. Since then,wasm-packhas grown into an integrated build tool used at all stages of development, from idea conception to publishing, and as such has developed new needs.In previous releases, we've supported a flag called
--debugwhich will runcargo buildindevmode, which trades faster compilation speed for a lack of optimizations. We've renamed this flag to--devto matchcargoand added an additional flag, representing a third, intermediary, build profile, called--profilingwhich is useful for investigating performance issues. You can see all three flags and their uses in the table below:Profile Debug Assertions Debug Info Optimizations Notes --devYes Yes No Useful for development and debugging. --profilingNo Yes Yes Useful when profiling and investigating performance issues. --releaseNo No Yes Useful for shipping to production. The meaning of these flags will evolve as the platform grows, and always be tied to the behavior of these flags in
cargo. You can learn more about these in thecargo profiledocumentation.This PR also introduces a way to configure
wasm-packin yourCargo.tomlfile that we intend to use much more in the future. As a largely convention-based tool,wasm-packwill never require that you configure it manually, however, as our community and their projects mature alongside the tool, it became clear that allowing folks the ability to drop down and configure things was something we needed to do to meet their needs.Currently, you can only configure things related to the above-mentioned build profiles. To learn more, check out the documentation. It leverages the
package.metadata.wasm-packkey in yourCargo.toml, and looks like this:# Cargo.toml [package.metadata.wasm-pack.profile.dev.wasm-bindgen] # Should we enable wasm-bindgen's debug assertions in its generated JS glue? debug-js-glue = true # Should wasm-bindgen demangle the symbols in the "name" custom section? demangle-name-section = true # Should we emit the DWARF debug info custom sections? dwarf-debug-info = false
As always- there are defaults for you to use, but if you love to configure (or have a project that requires it), get excited, as your options have grown now and will continue to!
-
DEPRECATION: Rename
--debugto--devto matchcargo- fitzgen, pull/439See the discussion of the build profiles feature above. This is a strict renaming of the previous
--debugflag, which will now warn as deprecated. -
Add an option to pass an arbitrary set of arguments to
cargo build- torkve, issue/455 pull/461As an integrated build tool,
wasm-packorchestrates many secondary command line tools to build your package in a single command. Notably, one of these tools iscargo.cargohas a wide array of features and flags, and we couldn't reasonably expect to implement them all as first class features ofwasm-pack. As a result, we've created the option to allow users to pass an arbitrary number of additional flags towasm-packby appending them to thewasm-pack buildcommand, after passing--. For example:wasm-pack build examples/js-hello-world --mode no-install -- -Z offlineIn the above example, the flag
-Z offlinewill be passed tocargo build. This feature is documented here. -
Pre-build before wasm-pack publish - csmoe, issue/438 pull/444
Previously, if you ran
wasm-pack publishbefore you had successfully runwasm-pack build, you'd receive an error that a package could not be found- because there would be nopkgor out-directory containing apackage.json.In this situation, you would hope that
wasm-packwould build your package for you when you ranwasm-pack publish. This is slightly complicated by the fact that not everyone wants to build their package to the default target or to a directory namedpkg.To solve this, running
wasm-pack publishbefore a successful build will give you an interactive prompt to build your package- allowing you to specify your out directory as well as the target you'd like to build to. Check it out in the gif below: -
Generate self-.gitignore as part of pkg folder - RReverser, pull/453
Since
wasm-packwas first published, thepkgdirectory was intended to be treated as a build artifact, and as such should never be published to version control. This was never enforced by any assets generated bywasm-pack, however.Now, when building your package,
wasm-packwill also generate a.gitignorefile so that thepkg, or out-directory, will be ignored.If you use another version control tool, you'll need to still create or edit your own ignore file- pull requests to support other version control tools are welcome!
If you require editing of the generated
package.jsonor add additonal assets to your package before publishing, you'll want to remove the.gitignorefile and commit to version control. We intend to have a solution that makes this workflow significantly easier in upcoming releases! -
Support cargo workspaces - fitzgen, issue/252 issue/305 pull/430
Workspaces are a well-liked and used feature of cargo that allow you to build multiple crates in a single cargo project. Because of how
wasm-packhandled paths fortargetand out-directories, we did not support cargo workspaces out of the box. Now they should work well and the feature is well guarded by tests! -
Use a global cache for all downloaded binaries - alexcrichton, pull/426
wasm-packis an integrated build tool that orchestrates several other command line tools to build your wasm project for you. Howwasm-packdoes this has evolved significantly since it's early versions. In the last version, abindirectory was created to house the tool binaries thatwasm-packneeded to build our project, but this had several limitations. Firstly, it created abindirectory in your project's root, which could be confusing. Secondly, it meant that sharing these tools across multiple projects was not possible. We did this because it gaves us the fine-grained control over the version of these tools that you used.Now,
wasm-packwill not generate abindirectory, but rather will use a global cache. We retain the fine-grained control over the versions of these tools that are used, but allow multiple projects that use the same tools at the same versions to share the already installed asset. Your global cache will generally be in your user's home directory- we use thedirscrate to determine where to place this global cache. This is not currently customizable but is something we intend to look into doing!This feature ensures that
wasm-packusers are downloading a minimal number of binaries from the network, which, forwasm-packusers with multiple projects, should speed up build times.
-
-
-
Fix
pack,login, andpublishfor Windows users - danwilhelm, issue/277 pull/489Rust's behavior for spawning processes on some Windows targets introduced an interesting case where Rust would fail unless the command was explicitly spawned with a prepended
cmd /c. This failure ofwasm-packwas well noticed by our community - and thanks to the efforts ofdanwilhelmis now fixed! You can read more on the background of this issue in rust-lang/rust issue/44542. -
Validate
--targetargument - csmoe, issue/483 pull/484For a few releases now,
wasm-packhas supported allowing users to specifying the target module system they'd like their package built for-browser,nodejs, andno-modules. We did not however, validate this input, and so if a user made even a slight mistake, e.g.node,wasm-packwould not catch the error and would build your project using the default,browser. This is of course, surprising, and unpleasant behavior and so now we'll error out with a message containing the supported target names. -
Fix login - danwilhelm, issue/486 pull/487
-
Eliminate unecessary escaping in build success terminal output - huangjj27, issue/390 pull/396
Previously, on some systems, a successful
wasm-pack buildwould print a unfortunate looking string:| :-) Your wasm pkg is ready to publish at "\\\\?\\C:\\Users\\Ferris\\tmp\\wasm-bug\\pkg".We've updated this to make sure the path to your project is well-formed, and most importantly, human-readable.
-
Copy license file(s) to out directory - mstallmo, issue/407 pull/411
Since
wasm-packwas first published, we've copied over yourCargo.tomllicense definition over to yourpackage.json. However, we overlooked copying the actualLICENSEfiles over! Now we do! -
Don't require cdylib crate-type for testing - alexcrichton, pull/442
wasm-packwas unecssarily checkingCargo.tomlfor thecdylibcrate type during calls towasm-pack test. Thecdyliboutput isn't necessary for thewasm-pack teststage becausewasm-bindgenisn't being run over a wasm file during testing. This check is now removed! -
Fix wasm-bindgen if lib is renamed via
lib.name- alexcrichton, issue/339 pull/435In some circumstances, a library author may wish to specify a
namein the[package]portion of theirCargo.toml, as well as a differentnamein the[lib]portion, e.g.:[package] name = "hello-wasm" [lib] name = "wasm-lib"
This would cause the
wasm-bindgenbuild stage ofwasm-packto error out becausewasm-packwould attempt to runwasm-bindgen-clion a path using the[package]name, which wouldn't exist (because it would be using the[lib]name). Now it works- thanks to more usage ofcargo_metadatainwasm-packinternals! -
Print standard error only once for failing commands - fitzgen, issue/422 pull/424
Previously,
wasm-packmay have printedstderrtwice in some circumstances. This was both confusing and not a pleasant experience, so now we've ensued thatwasm-packprintsstderrexactly once! (It's hard enough to have errors, you don't wantwasm-packrubbing it in, right?) -
Add no-modules to --target flag's help text - fitzgen, issue/416 pull/417
This is an interesting one!
fitzgenvery reasonably filed an issue asking to addwasm-bindgen's--target no-modulesfeature towasm-pack. This was confusing as this feature was indeed already implemented, and documented- BUT, notably missing from thewasm-pack --helptext. We've fixed that now- and it was an omission so glaring we definitely considered it a bug!
-
-
-
Replace
slogwithlog- alexcrichton, issue/425 pull/434For internal maintenance reasons, as well as several end-user ones, we've migrated away from the
slogfamily of crates, and are now using thelogcrate plusenv_logger. Now,wasm-packwon't create awasm-pack.log. Additionally, enabling logging will now be done throughRUST_LOG=wasm_packinstead of-vflags. -
Move binary installation to its own crate - drager, issue/384 pull/415
In
wasm-pack 0.5.0, we move away fromcargo installing many of the tools thatwasm-packorchestrates. Because we usedcargo install, this required an end user to sit through the compilation of each tool, which was a prohibitively long time. We moved, instead, to building, and then installing, binaries of the tools. This sped up build times dramatically!This pattern has been very beneficial to
wasm-packand is potentially something that could be beneficial to other projects! As a result, we've refactored it out into a crate and have published it as it's own crate,binary-install. -
Replace internal
Errorwithfailure::Error- alexcrichton, pull/436The story of error message handling in
wasm-packhas not been the prettiest. We originally were manually implementing errors, adding thefailurecrate at one point, but not fully updating the entire codebase. With this PR, we are nearly completely handling errors withfailure, bringing the code into a much more maintainable and pleasant-to-work-on place. -
Read the
Cargo.tomlfile only once - fitzgen, issue/25 pull/431This is a very fun one since it fixes one of the original issues filed by
ag_dubsat the very beginning ofwasm-packdevelopment. In a rush to implement a POC tool,ag_dubsnoted for posterity that theCargo.tomlwas being read multiple times (twice), when it did not need to be. Thanks tofitzgennow it's read only once! A minor performance improvement in the scheme of things, but a nice one :) -
Fix typo in test function name for copying the README - mstallmo, pull/412
-
-
-
Complete template deep dive docs - danwilhelm, issue/345 issue/346 pull/490
In a rush to publish a release,
ag_dubsleft some "Coming soon!" comments on most pages of the "Template Deep Dive" docs. These docs help walk new users through the boilerplate that using thewasm-packtemplate generates for you. Thanks so much todanwilhemfor picking this up and doing an excellent job!
-
-
-
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-packand wondered what was happening? No longer! Didwasm-packeat 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_statusto 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.30which is now available on both nightly and beta channels! We had a bit of a race condition with that PR and thewasm-pack testPR, and missed a few as a result! This removes all lingering forced nightly, which only affected thewasm-pack testcommand. -
Fix
wasm-bindgen-testdependency error message - fitzgen, issue/377 pull/378The error message about missing the
wasm-bindgen-testdependency errantly stated that the user was missing awasm-bindgendependency! 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.jsonkeys for generated JavaScript - ashleygwilliams, issue/309 pull/312This is marked as potentially breaking because it changes the
package.jsonkeys that are generated by the project.Previously, we generated a JavaScript file and placed it in the
mainkey, regardless of what you were targeting, ES6 and Node.js alike.We have received a lot of requests for
wasm-packto 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 themainfield. Now we put it in themodulefield. We also addsideEffects: falseso 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 themainkey. -
--target no-modules: This is a new target. For this target we generate bare JavaScript. This code is put in abrowserfield.
You can see the structs that represent each target's expected
package.jsonhere.Thanks so much to bterlson for his help in sorting this out for us!
-
-
-
-
wasm-pack initis 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.0and we have become much more- an integrated build tool!As a result, the original command
initdoes a lot more than that these days. We've renamed the command to better reflect the work it's actually doing.initwill 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 loginandnpm publishcommands aswasm-pack loginandwasm-pack publishfor 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-bindgenoffers ano-modulesflag 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! -
--accessflag forwasm-packpublish - 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 publictowasm-pack publishand 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-packand not have Rust installed. Additionally, now that the features we required from thenightlychannel 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 thenightlyorbetachannel and all ofwasm-packs calls tocargowill respect that.Really hate this? You can pass
--mode forcetowasm-packto 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-packtakes 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-bindgenlibrary that their project used in sync with thewasm-bindgenCLI application whichwasm-packruns for you. This became such an issue that we opted to force installwasm-bindgento ensure that everywasm-packuser 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 installofwasm-bindgenon every run, and that means downloading and compilingwasm-bindgeneverytime 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.lockto find the version ofwasm-bindgenyou are using in your local project. We will attempt to fetch a binary version ofwasm-bindgenthat 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 buildwe'll use that binary, instead of fetching a new one. We still fall back tocargo installfor 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 buildwith--lib- ashleygwilliams, issue/303 pull/330Right now,
wasm-packonly works on Rust library projects. But sometimes, if you're new to Rust, you might end up having amain.rsin 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 buildonly build the library at this time.Want to use
wasm-packon 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-packhas 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-packinstaller- we have an executable for Windows and acurlscript 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 installas 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 initwe 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-bindgenactually 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
/pkgdir to successfully runpackorpublish. This was pretty crummy! Thankfully, Mackiovello swooped in with a fix, that you can find documented in the pack and publish docs! -
use
PathBufinstead ofStringfor 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
fileskey value for projects build fornodejstarget - ashleygwilliams, issue/199 pull/205We became aware that the
fileskey inpackage.jsondid not include the additional_bg.jsfile thatwasm-bindgengenerates for projects being built for thenodejstarget. This resulted in the file not being included in the published package and resulted in aModule Not Founderror 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
quicliremnants - SoryRawyer, pull/193In v0.3.0 we removed the
quiclidependency, 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-packteam 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.mdwas 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!
-
-
--modeflag for skipping steps when callinginit- ashleygwilliams, pull/186After teaching and working with
wasm-packfor some time, it's clear that people would like the flexibility to run some of the steps included in theinitcommand and not others. This release introduces a--modeflag that you can pass toinit. The two modes currently available areskip-buildandno-installsand they are explained below. In the future, we are looking to change theinitinterface, and potentially to split it into two commands. If you have thoughts or opinions on this, please weigh in on issue/188!-
skip-buildmode - kohensu, pull/151wasm-pack init --mode skip-buildSometimes you want to run some of the shorter meta-data steps that
wasm-pack initdoes 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-installsmode - ashleygwilliams, pull/186wasm-pack init --mode no-installsSometimes you want to run
wasm-packand 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-installoption allows you to do this.
-
-
wasm-pack init --debugFind yourself needing to compile your Rust in
developmentmode? You can now pass the--debugflag to do so! Thanks so much to clanehin for filing issue/126 for this feature... and then implementing it!
-
-
-
ensure you have
cdylibcrate type - kendromelon, pull/150One of the biggest mistakes we've seen beginners make is forgetting to declare the
cdylibcrate type in theirCargo.tomlbefore runningwasm-pack init. This PR fixes that, and comes from someone who ran into this exact issue learning aboutwasm-packat 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-bindgenas a dependency in yourCargo.toml. Nowwasm-packwill check and make sure you have it set before doing a bunch of long build steps :) -
ensure you are running
nightly- FreeMasen, pull/172wasm-packcurrently requires that you run it withnightlyRust. Now,wasm-packwill make sure you havenightlyinstalled and will ensure thatcargo buildis 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-packso 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.rswas 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
unwrapdue to an outstanding need to convertPoisonErrorintowasm-pack's customError. Though not a critical concern, migerh mitigated this right away by replacingstd::sync::RwLockwith theparking_lotcrate! 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
wasmcategory 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
READMEwas 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
initIs a Directoryerror - 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.logfile ifwasm-packerrors on you, and you can customize the log verbosity using the (previously unimplemented) verbosity flag.
-
--targetflag - djfarly, pull/132wasm-bindgen-cliis 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--targetflag with eithernodejsorbrowserto generate the type of module you want to use. Defaults tobrowserif 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-bindgennow generates typescript type files by default. To suppress generating the type file you can pass the--no-typescriptflag. The type file is useful for more than just typescript folks- many IDEs use it for completion!
-
wrap
npm logincommand - djfarly, pull/100In order to publish a package to npm, you need to be logged in. You can now use
wasm-pack loginto login to the npm (or any other) registry.
-
exit early on failure - mgattozzi, pull/90
Until now,
wasm-packwould 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-bindgencan 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-cliby force installingwasm-bindgen-clito 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 installto install wasm-pack, but now you can find pre-built Linux and Mac binaries in the Releases tab of our GitHub repo.
-
remove
quiclidependency - mgattozzi, pull/131While
quicliis a great way to get started writing a CLI app in Rust- it's not meant for large, mature applications. Now thatwasm-packis 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
rustfmtchanged! 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
failurecrate, 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!
packandpublish- jamiebuilds, pull/67 You can now runwasm-pack packto generate a tarball of your generated package, as well as runwasm-pack publishto publish your package to the npm registry. Both commands require that you have npm installed, and thepublishcommand requires that you be logged in to the npm client. We're working on wrapping thenpm logincommand so that you can also login directly fromwasm-pack, see pull/100 for more details.
-
package.jsonis pretty printed now - yoshuawuyts, pull/70Previously,
package.jsonwas not very human readable. Now it is pretty printed! -
collaborators- yoshuawuyts, pull/70wasm-packnow will fill out thecollaboratorsfield in yourpackage.jsonfor you based on yourCargo.tomlauthorsdata. For more discussion on how we decided on this v.s. other types ofauthorfields 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!
