
Security News
Free Certified Patch for Critical Rails Active Storage Vulnerability
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.
hello-world-wasm-pack-lib
Advanced tools
🦀 Greeter demo using wasm-pack to create an npm package
|
You can install this package using your favorite npm package manager like npm, Yarn, pnpm, or Bun.
npm install hello-world-wasm-pack-lib
If you're using Deno you can import it straight from npm:
import {} from "npm:hello-world-wasm-pack-lib";
If you prefer to go buildless in the browser you can use an npm CDN like jsDelivr or esm.sh.
<script type="module">
import {} from "https://esm.run/hello-world-wasm-pack-lib";
</script>
You should be able to just import and use this JavaScript package like any other. The WASM magic is hidden behind a really nice wrapper layer.
import { greet, Calculator, get_report } from "hello-world-wasm-pack-lib";
greet("Alan Turing");
//=> 'Hello Alan Turing!'
const report = get_report();
console.log(report);
//=> Report {
// dog_count: 5,
// bouncy_castles: 3,
// fun_percent: 76.8
// }
📚 You can find complete API documentation on the docs website
To build the JavaScript package just run ./just build. Then you can cd into
the pkg/ folder if you want and launch a REPL to try it out!
./just build
cd pkg
node
If you need to edit the pkg.patch file, you can do so via the below command.
It will create two folders: a/ and b/. Edit anything in the b/ folder and
a .patch will be generated against the a/ folder and saved to pkg.patch.
./just generate-patch
# Pauses while you make changes...
FAQs
🦀 Greeter demo using wasm-pack to create an npm package
We found that hello-world-wasm-pack-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.

Security News
/Threat Research
A malicious Ruby gem runs a credential-stealing worm during installation, poisons AI coding tools, and can wipe files when a stolen GitHub token is revoked.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.