npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tvmsdk/lib-web

v2.0.1

Published

TVM Client WASM module for browsers

Downloads

4

Readme

Building ever-sdk-js WASM

cd packages/lib-web/build
cargo build
cargo run

Troubleshooting

If you encounter error "No available targets are compatible with triple "wasm32-unknown-unknown" follow the solution from this issue https://github.com/rust-lang/libz-sys/issues/103.

I.E. you need to install llvm with brew and then follow the installation tips to make this llvm primary:

If you need to have llvm first in your PATH, run
  echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> /Users/ekaterinapantaz/.zshrc

For compilers to find llvm you may need to set:
  export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"

How to check what compiler is used

Here is a bash command that will help you see all the paths to all the compilers on your system

for compiler in cc c++ gcc g++ clang clang++
do
which $compiler
$compiler --version
done

By default the result will look like this:

*/usr/bin/cc*
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
/usr/bin/c++
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
/usr/bin/gcc
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
/usr/bin/g++
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
/usr/bin/clang
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
/usr/bin/clang++
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

We need clang here - you can see that it takes clang from /Library/Developer/CommandLineTools/usr/bin - THIS IS NOT WHAT WE NEED.

After making the brew clang compiler path a primary one the result will look like this

/usr/bin/cc
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
/usr/bin/c++
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
/usr/bin/gcc
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
/usr/bin/g++
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
/opt/homebrew/opt/llvm/bin/clang
Homebrew clang version 18.1.8
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin
/opt/homebrew/opt/llvm/bin/clang++
Homebrew clang version 18.1.8
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin

If your clang and clang++ compiler paths look like this the build command should be successful.

(DEPRECATED) Building ever-sdk-js WASM inside docker

To build WASM you need clang v8. Use this workaround if you encounter a problem when building wasm binaries on your platform (MacOSX or Windows).

Pulling build image

docker pull tonlabs/build-tonclient-wasm

Change your current location to ever-sdk-js project. It is important because the next command will use this location to mount the volume with source code inside the docker container with build environment.

cd ever-sdk-js

Run build container in background. First attempt will take a long time.

docker run -v $(pwd):/tonlabs/TON-SDK --name build-tonclient-wasm -dt build-tonclient-wasm tail -f /dev/null

Build WASM

docker exec -ti build-tonclient-wasm "build-tonclient-wasm.sh"

Location of binaries

After successful build process, binaries will be located here

ever-sdk-js/packages/lib-web/index.js
ever-sdk-js/packages/lib-web/eversdk.wasm
Compressed
ever-sdk-js/packages/lib-web/publish/eversdk_1_31_wasm.gz
ever-sdk-js/packages/lib-web/publish/eversdk_1_31_wasm_js.gz