A self-guided learning project that includes Rust + Wasm together

Overview

Rust Web-Assembly

A self-guided learning project that includes Rust + Wasm together. Who knows, maybe Typescript and React joins too..

Build Status

🚴 Usage

🐑 Use cargo generate to Clone this Template

Learn more about cargo generate here.

cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project
cd my-project

🛠️ Build with wasm-pack build

wasm-pack build

🔬 Test in Headless Browsers with wasm-pack test

wasm-pack test --headless --firefox

🎁 Publish to NPM with wasm-pack publish

wasm-pack publish

🔋 Batteries Included

🚴 Ta Da!!

img

Comments
  • Got Segmentation Fault when calling estimate_alpha_knn

    Got Segmentation Fault when calling estimate_alpha_knn

    Got this error both on macOS 10.14 and Ubuntu 16.04

    When installing the package I used --ignore-installed llvmlite flag for pip because I got Cannot uninstall 'llvmlite'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.. I am not sure if this is relevant.

    pytest
    ============================================================================== test session starts ===============================================================================
    platform darwin -- Python 3.7.4, pytest-5.2.1, py-1.8.0, pluggy-0.13.0
    rootdir: /Users/user/pymatting-master
    plugins: arraydiff-0.3, remotedata-0.3.2, doctestplus-0.4.0, openfiles-0.4.0
    collected 11 items                                                                                                                                                               
    
    tests/test_boxfilter.py .                                                                                                                                                  [  9%]
    tests/test_cg.py .                                                                                                                                                         [ 18%]
    tests/test_estimate_alpha.py F                                                                                                                                             [ 27%]
    tests/test_foreground.py .                                                                                                                                                 [ 36%]
    tests/test_ichol.py .                                                                                                                                                      [ 45%]
    tests/test_kdtree.py Fatal Python error: Segmentation fault
    
    Current thread 0x00000001086d7dc0 (most recent call first):
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pymatting/util/kdtree.py", line 280 in __init__
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pymatting/util/kdtree.py", line 347 in knn
      File "/Users/user/pymatting-master/tests/test_kdtree.py", line 20 in run_kdtree
      File "/Users/user/pymatting-master/tests/test_kdtree.py", line 46 in test_kdtree
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/python.py", line 170 in pytest_pyfunc_call
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/manager.py", line 86 in <lambda>
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/manager.py", line 92 in _hookexec
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/python.py", line 1423 in runtest
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/runner.py", line 125 in pytest_runtest_call
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/manager.py", line 86 in <lambda>
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/manager.py", line 92 in _hookexec
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/runner.py", line 201 in <lambda>
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/runner.py", line 229 in from_call
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/runner.py", line 201 in call_runtest_hook
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/runner.py", line 176 in call_and_report
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/runner.py", line 95 in runtestprotocol
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/runner.py", line 80 in pytest_runtest_protocol
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/manager.py", line 86 in <lambda>
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/manager.py", line 92 in _hookexec
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/main.py", line 256 in pytest_runtestloop
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/manager.py", line 86 in <lambda>
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/manager.py", line 92 in _hookexec
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/main.py", line 235 in _main
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/main.py", line 191 in wrap_session
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/main.py", line 228 in pytest_cmdline_main
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/manager.py", line 86 in <lambda>
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/manager.py", line 92 in _hookexec
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
      File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/_pytest/config/__init__.py", line 90 in main
      File "/Users/user/opt/anaconda3/bin/pytest", line 11 in <module>
    [1]    99661 segmentation fault  pytest
    
    opened by ntuLC 10
  • [Question❓] Tests for GPU implementation skipped, because of missing packages

    [Question❓] Tests for GPU implementation skipped, because of missing packages

    Hi

    I have setup the pymatting under container environment and executed the test. Pytest was able to complete it however I got following warnings:

    tests/test_foreground.py::test_foreground /pymatting/tests/test_foreground.py:32: UserWarning: Tests for GPU implementation skipped, because of missing packages. "Tests for GPU implementation skipped, because of missing packages."

    -- Docs: https://docs.pytest.org/en/stable/warnings.html

    I noticed that similar issue was reported earlier as well but couldn't find conclusion

    I have got Nvidia GPUs but somehow it is not being detected. I have individually installed cuPy, pyopencl, libcutensor and some other output on installed cuda packages:

    root@10e16f343455:/pymatting# dpkg --list | grep cuda
    ii  cuda-command-line-tools-10-2  10.2.89-1                           amd64        CUDA command-line tools
    ii  cuda-compat-10-2              440.95.01-1                         amd64        CUDA Compatibility Platform
    ii  cuda-compiler-10-2            10.2.89-1                           amd64        CUDA compiler
    ii  cuda-cudart-10-2              10.2.89-1                           amd64        CUDA Runtime native Libraries
    ii  cuda-cudart-dev-10-2          10.2.89-1                           amd64        CUDA Runtime native dev links, headers
    ii  cuda-cufft-10-2               10.2.89-1                           amd64        CUFFT native runtime libraries
    ii  cuda-cufft-dev-10-2           10.2.89-1                           amd64        CUFFT native dev links, headers
    ii  cuda-cuobjdump-10-2           10.2.89-1                           amd64        CUDA cuobjdump
    ii  cuda-cupti-10-2               10.2.89-1                           amd64        CUDA profiling tools runtime libs.
    ii  cuda-cupti-dev-10-2           10.2.89-1                           amd64        CUDA profiling tools interface.
    ii  cuda-curand-10-2              10.2.89-1                           amd64        CURAND native runtime libraries
    ii  cuda-curand-dev-10-2          10.2.89-1                           amd64        CURAND native dev links, headers
    ii  cuda-cusolver-10-2            10.2.89-1                           amd64        CUDA solver native runtime libraries
    ii  cuda-cusolver-dev-10-2        10.2.89-1                           amd64        CUDA solver native dev links, headers
    ii  cuda-cusparse-10-2            10.2.89-1                           amd64        CUSPARSE native runtime libraries
    ii  cuda-cusparse-dev-10-2        10.2.89-1                           amd64        CUSPARSE native dev links, headers
    ii  cuda-driver-dev-10-2          10.2.89-1                           amd64        CUDA Driver native dev stub library
    ii  cuda-gdb-10-2                 10.2.89-1                           amd64        CUDA-GDB
    ii  cuda-libraries-10-2           10.2.89-1                           amd64        CUDA Libraries 10.2 meta-package
    ii  cuda-libraries-dev-10-2       10.2.89-1                           amd64        CUDA Libraries 10.2 development meta-package
    ii  cuda-license-10-2             10.2.89-1                           amd64        CUDA licenses
    ii  cuda-memcheck-10-2            10.2.89-1                           amd64        CUDA-MEMCHECK
    ii  cuda-minimal-build-10-2       10.2.89-1                           amd64        Minimal CUDA 10.2 toolkit build packages.
    ii  cuda-misc-headers-10-2        10.2.89-1                           amd64        CUDA miscellaneous headers
    ii  cuda-npp-10-2                 10.2.89-1                           amd64        NPP native runtime libraries
    ii  cuda-npp-dev-10-2             10.2.89-1                           amd64        NPP native dev links, headers
    ii  cuda-nvcc-10-2                10.2.89-1                           amd64        CUDA nvcc
    ii  cuda-nvdisasm-10-2            10.2.89-1                           amd64        CUDA disassembler
    ii  cuda-nvgraph-10-2             10.2.89-1                           amd64        NVGRAPH native runtime libraries
    ii  cuda-nvgraph-dev-10-2         10.2.89-1                           amd64        NVGRAPH native dev links, headers
    ii  cuda-nvjpeg-10-2              10.2.89-1                           amd64        NVJPEG native runtime libraries
    ii  cuda-nvjpeg-dev-10-2          10.2.89-1                           amd64        NVJPEG native dev links, headers
    ii  cuda-nvml-dev-10-2            10.2.89-1                           amd64        NVML native dev links, headers
    ii  cuda-nvprof-10-2              10.2.89-1                           amd64        CUDA Profiler tools
    ii  cuda-nvprune-10-2             10.2.89-1                           amd64        CUDA nvprune
    ii  cuda-nvrtc-10-2               10.2.89-1                           amd64        NVRTC native runtime libraries
    ii  cuda-nvrtc-dev-10-2           10.2.89-1                           amd64        NVRTC native dev links, headers
    ii  cuda-nvtx-10-2                10.2.89-1                           amd64        NVIDIA Tools Extension
    ii  cuda-sanitizer-api-10-2       10.2.89-1                           amd64        CUDA Sanitizer API
    hi  libcudnn7                     7.6.5.32-1+cuda10.2                 amd64        cuDNN runtime libraries
    ii  libcudnn7-dev                 7.6.5.32-1+cuda10.2                 amd64        cuDNN development libraries and headers
    hi  libnccl-dev                   2.7.8-1+cuda10.2                    amd64        NVIDIA Collectives Communication Library (NCCL) Development Files
    hi  libnccl2                      2.7.8-1+cuda10.2                    amd64        NVIDIA Collectives Communication Library (NCCL) Runtime
    

    Could you please advise on what package might be missing? Thank you.

    opened by ghazni123 6
  • pytest Error: tests/test_lkm.py:81: AssertionError

    pytest Error: tests/test_lkm.py:81: AssertionError

    === warnings summary ===

    tests/test_foreground.py::test_foreground /home/ferg/git/pymatting/tests/test_foreground.py:31: UserWarning: Tests for GPU implementation skipped, because of missing packages.

    I'm on Fedora 31 and here are my pip 3 package versions which above the required dependencies.

    Requirement already satisfied: numpy in /usr/lib64/python3.7/site-packages (1.17.4) Requirement already satisfied: pillow in /usr/lib64/python3.7/site-packages (6.1.0) Requirement already satisfied: numba in /home/ferg/.local/lib/python3.7/site-packages (0.48.0) Requirement already satisfied: scipy in /home/ferg/.local/lib/python3.7/site-packages (1.4.1)

    opened by 3dsf 5
  • ValueError on import

    ValueError on import

    Hi, I installed the lib but there are a problem with the importation of your package.

    I am using python 3.8.1 with : numpy=1.18.1 (>=1.16.0) pillow=6.2.1 (>=5.2.0) numba=0.47.0 (>=0.44.0) scipy=1.3.3 (>=1.1.0)

    *** ValueError: Failed in nopython mode pipeline (step: convert to parfors) Cannot add edge as dest node 26 not in nodes {130, 132, 262, 264, 528, 30, 418, 302, 564, 565, 566, 568, 322, 450, 196, 452, 324, 340, 212, 86, 214, 348, 94, 228, 356, 494, 118, 246, 248, 378, 380}

    (you can read all here: https://gyazo.com/b6b9756f0c8d75a30a63dada09c5f82e)

    Thank you for your work :+1:

    opened by Mathux 4
  • Speedup[Question❓]

    Speedup[Question❓]

    Thank you very much for your work. I want to know whether can use GPU to accelerate matrix operation!

    opened by hoolizou 4
  • Use scribble.png get bad result

    Use scribble.png get bad result

    i use scribble.png instead of trimap to compute alpha,the result is not good lemur lemur_caotu lemur_alpha what wrong with this?hope for your kindly reply@99991

    opened by lfxx 4
  • [Question❓] Question regarding output of advanced example

    [Question❓] Question regarding output of advanced example

    Thank you for your efforts. I have successfully built the package and was able to execute few examples by following advanced example on https://pymatting.github.io/examples.html and have request for info.

    I am attaching set of images to elaborate for what I am seeing and advice on how to improve the results.

    1: original.png: it is the original file 2: target.png: this file is the manual alpha from photoshop (i was aiming for - might be ambitious) 3: color_bleeding.png, grid.png and cutout.png are the outputs of the pymatting package 4: initial_mask.jpg: that is the rough mask generated by the segmentation framework i.e. detectron2 5: trimap.png: that was generated by following function def gen_trimap(alpha): k_size = random.choice(range(1, 5)) iterations = np.random.randint(1, 20) kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (k_size, k_size)) dilated = cv2.dilate(alpha, kernel, iterations) eroded = cv2.erode(alpha, kernel, iterations) trimap = np.zeros(alpha.shape) trimap.fill(128) trimap[eroded >= 255] = 255 trimap[dilated <= 0] = 0 return trimap

    Q1: is there a way the internal contours can be removed? or maybe not until those are present in trimap as well?

    Q2: advice on what do i need to do in pymatting package to improve the alpha around external contours or hairs etc. given input image, rough mask from segmentation framwork and trimap (calculated in SW like above)?

    Q3: could it also be the case that my testcase is more ambitious and pymatting is more suitable for object with sharp edges e.g. cars

    Thank you.

    opened by ghazni123 3
  • Error in local installation

    Error in local installation

    I am trying to install the repo through: git clone https://github.com/pymatting/pymatting.git cd pymatting pip install . but I met the error below:

      File "setup.py", line 20, in <module>
        long_description=load_text("README.md"),
      File "setup.py", line 6, in load_text
        return f.read()
      File "/ldap_home/bohang.li/.conda/envs/pymatting/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 3305: ordinal not in range(128)```
    
    opened by vandesa003 3
  • Pymatting Image not producing good results. Is here something wrong?

    Pymatting Image not producing good results. Is here something wrong?

    Orignal image, trimap, output image is - woman-standing-and-doing-pose-beside-lake-1468379-removebg-preview trimap_image_improved lemur_cutout

    Hair's for which I was using Pymatting are blurred. Is this some fault from my side? Thanks.

    opened by kashyappiyush1998 3
  • [BUG 🐛] No module named 'pymatting_aot.aot'

    [BUG 🐛] No module named 'pymatting_aot.aot'

    Bug description

    $ python test2.py Failed to import ahead-of-time-compiled modules. This is expected on first import. Compiling modules and trying again (this might take a minute). Traceback (most recent call last): File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting_aot/cc.py", line 21, in import pymatting_aot.aot ModuleNotFoundError: No module named 'pymatting_aot.aot'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "test2.py", line 1, in from pymatting import cutout File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting/init.py", line 2, in import pymatting_aot.cc File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting_aot/cc.py", line 28, in compile_modules() File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting_aot/cc.py", line 6, in compile_modules cc = CC("aot") File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/numba/pycc/cc.py", line 65, in init self._toolchain = Toolchain() File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/numba/pycc/platform.py", line 78, in init self._raise_external_compiler_error() File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/numba/pycc/platform.py", line 121, in _raise_external_compiler_error raise RuntimeError(msg) RuntimeError: Attempted to compile AOT function without the compiler used by numpy.distutils present. If using conda try:

    #> conda install gcc_linux-64 gxx_linux-64

    To Reproduce

    installed pymatting with pip install rembg on Fedora 33 within venv for Python3.8 create test2.py: from pymatting import cutout

    cutout( # input image path "data/lemur/lemur.png", # input trimap path "data/lemur/lemur_trimap.png", # output cutout path "lemur_cutout.png") launch: python test2.py within venv for Python3.8

    Expected behavior

    runed without errors

    Images

    (Add relevant images.)

    Library versions:

    (Run the following commands and paste the result here.)

    python --version --version
    Python 3.8.6 (default, Sep 25 2020, 00:00:00) 
    [GCC 10.2.1 20200826 (Red Hat 10.2.1-3)]
    (envrembg) [sav@localhost envrembg]$ python -c "import numpy; numpy.show_config()"
    
    python -c "import numpy; numpy.show_config()"
    blas_mkl_info:
      NOT AVAILABLE
    blis_info:
      NOT AVAILABLE
    openblas_info:
        libraries = ['openblas', 'openblas']
        library_dirs = ['/usr/local/lib']
        language = c
        define_macros = [('HAVE_CBLAS', None)]
    blas_opt_info:
        libraries = ['openblas', 'openblas']
        library_dirs = ['/usr/local/lib']
        language = c
        define_macros = [('HAVE_CBLAS', None)]
    lapack_mkl_info:
      NOT AVAILABLE
    openblas_lapack_info:
        libraries = ['openblas', 'openblas']
        library_dirs = ['/usr/local/lib']
        language = c
        define_macros = [('HAVE_CBLAS', None)]
    lapack_opt_info:
        libraries = ['openblas', 'openblas']
        library_dirs = ['/usr/local/lib']
        language = c
        define_macros = [('HAVE_CBLAS', None)]
    
    python -c "import scipy;scipy.show_config()"
    lapack_mkl_info:
      NOT AVAILABLE
    openblas_lapack_info:
        libraries = ['openblas', 'openblas']
        library_dirs = ['/usr/local/lib']
        language = c
        define_macros = [('HAVE_CBLAS', None)]
    lapack_opt_info:
        libraries = ['openblas', 'openblas']
        library_dirs = ['/usr/local/lib']
        language = c
        define_macros = [('HAVE_CBLAS', None)]
    blas_mkl_info:
      NOT AVAILABLE
    blis_info:
      NOT AVAILABLE
    openblas_info:
        libraries = ['openblas', 'openblas']
        library_dirs = ['/usr/local/lib']
        language = c
        define_macros = [('HAVE_CBLAS', None)]
    blas_opt_info:
        libraries = ['openblas', 'openblas']
        library_dirs = ['/usr/local/lib']
        language = c
        define_macros = [('HAVE_CBLAS', None)]
    
    python -c "import numba;print('Numba version:', numba.__version__)"
    Numba version: 0.51.2
    
    python -c "import PIL;print('PIL version:', PIL.__version__)"
    PIL version: 8.0.1
    
    python -c "from pymatting.__about__ import __version__;print('PyMatting version:', __version__)"
    Failed to import ahead-of-time-compiled modules. This is expected on first import.
    Compiling modules and trying again (this might take a minute).
    Traceback (most recent call last):
      File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting_aot/cc.py", line 21, in <module>
        import pymatting_aot.aot
    ModuleNotFoundError: No module named 'pymatting_aot.aot'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting/__init__.py", line 2, in <module>
        import pymatting_aot.cc
      File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting_aot/cc.py", line 28, in <module>
        compile_modules()
      File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/pymatting_aot/cc.py", line 6, in compile_modules
        cc = CC("aot")
      File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/numba/pycc/cc.py", line 65, in __init__
        self._toolchain = Toolchain()
      File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/numba/pycc/platform.py", line 78, in __init__
        self._raise_external_compiler_error()
      File "/home/sav/pytest/envrembg/lib64/python3.8/site-packages/numba/pycc/platform.py", line 121, in _raise_external_compiler_error
        raise RuntimeError(msg)
    RuntimeError: Attempted to compile AOT function without the compiler used by `numpy.distutils` present. If using conda try:
    
    #> conda install gcc_linux-64 gxx_linux-64
    
    
    opened by vlsav 3
  • [BUG 🐛] division by zero error in estimate_foreground_ml

    [BUG 🐛] division by zero error in estimate_foreground_ml

    i am getting division by zero errors in estimate_foreground_ml()

    what i tried:

    • pymatting 1.1.1 and 1.1.3
    • making sure both the image and the mask are not uniform (i've seen the error when both have min_val=0 and max_val=1)
    • default parameters and different variations

    the environment is google colab. also sometime this (or something else in pymatting) causes the colab itself to crash and disconnect.

    opened by eyaler 7
  • [BUG 🐛] AttributeError: module 'numba.core.serialize' has no attribute '_

    [BUG 🐛] AttributeError: module 'numba.core.serialize' has no attribute '_ "numba_unpickle'"

    Bug description

    Importing PyMatting triggers the following error:

    AttributeError: module 'numba.core.serialize' has no attribute '_ "numba_unpickle'"

    To Reproduce

    Update PyMatting from 1.0.6? to 1.1.2? and import the library.

    Cause

    This is likely an issue with Numba. It should probably recompile old modules or not crash when importing them.

    Temporary fix

    Locate the ahead-of-time compiled module and delete it. A new import will trigger a recompilation. In my case, the file was located at ~/miniconda3/lib/python3.7/site-packages/pymatting_aot/aot.cpython-37m-x86_64-linux-gnu.so

    opened by 99991 0
Owner
M.Yavuz Yagis
イスラム教徒、プログラマー、父、戦士
M.Yavuz Yagis
Distribute a wasm SPA as HTML by wrapping it as a polyglot "html+wasm+zip"

A packer that adds a webpage to WASM module, making it self-hosted! Motivation At the moment, Browsers can not execute WebAssembly as a native single

Andreas Molzer 3 Jan 2, 2023
Rust based WASM/JS bindings for ur-rust

ur-wasm-js WASM/JS bindings for the ur-rust rust library Getting started Installation Either build the library yourself with wasm-pack or install for

Lightning Digital Entertainment 5 Feb 28, 2024
📦✨ your favorite rust -> wasm workflow tool!

?? ✨ wasm-pack Your favorite Rust → Wasm workflow tool! Docs | Contributing | Chat Built with ?? ?? by The Rust and WebAssembly Working Group About Th

Rust and WebAssembly 4.8k Jan 5, 2023
Gun port in rust & wasm

gun-rs-wasm Rust & WASM port of Gun. For a non-wasm version, check out gun-rs Example (source) Use npm install rusty-gun import { Node as Gun } from "

Martti Malmi 39 Dec 19, 2022
📝 A template for creating WASM + Typescript + Rust workflow libraries.

Create Rust + TypeScript libraries with ease! PR'S WELCOMED! ✨ Inspiration I wanted to create a WebAssembly/Rust library with additional JS features,

Shaoru Ian Huang 25 Dec 24, 2022
Parametric surfaces drawn using the Rust + WASM toolchain with WebGL, React, and TypeScript.

Parametric Surfaces in the Browser My.Movie.3.mp4 Wanted to experiment with WebGL using the Rust + WASM toolchain, with React and TypeScript to glue e

Benji Nguyen 45 Oct 21, 2022
Rust implementation of the Mina protocol, targeting Wasm and ARM architectures.

Mina-rs An implementation of Mina protocol in Rust, with focus on web and Wasm compatibility ** As you can probably tell this is a WIP! Don't use for

ChainSafe 157 Dec 12, 2022
WASM bindings for React - enables you to write and use React components in Rust

This library enables you to write and use React components in Rust, which then can be exported to JS to be reused or rendered.

Yichuan Shen 55 Dec 24, 2022
Realtime audio processing / synthesis using Rust/WASM in the browser.

Rust Audio About This repo is my investigation into using Rust for creative audio coding on various platforms (e.g. desktop, web, etc.), but especiall

Austin Theriot 30 Jan 5, 2023
Rust bindings for the Wasm spec interpreter.

wasm-spec-interpreter This project shows how to use ocaml-interop to call into the Wasm spec interpreter. There are several steps to making this work:

Bytecode Alliance 9 Aug 23, 2022
Spine runtime for Rust (and wasm!) transpiled from the official C Runtime.

rusty_spine Spine runtime for Rust (and wasm!) transpiled from the official C Runtime. Supports Spine 4.1. [dependencies] rusty_spine = "0.4.0" Onlin

jabu 12 Dec 17, 2022
Simple devcontainer for Rust + WASM development

Devcontainer WASM-Rust Simple devcontainer for Rust development Usage Github Codespaces Just click the button: Visual Studio Code Note this assumes th

null 2 Dec 22, 2022
Create WASM plugins easily in Rust.

Scotch Library for creating WASM plugins with Rust. Scotch allows you to pass complex types to/from functions in WASM plugins. It achieves that by enc

null 23 Feb 1, 2023
Fast regex in Rust for Apache Arrow, compiled to WASM

Rust regex in wasm I have been looking for a fast regular expression library in Javascript that runs on Apache Arrow for a few years. Arrow uses UTF-8

Nomic AI 3 May 3, 2023
Facilitating high-level interactions between Wasm modules and JavaScript

wasm-bindgen Facilitating high-level interactions between Wasm modules and JavaScript. Guide | API Docs | Contributing | Chat Built with ?? ?? by The

Rust and WebAssembly 5.9k Jan 8, 2023
Install `wasm-pack` by downloading the executable

wasm-pack-action Install wasm-pack by downloading the executable (much faster than cargo install wasm-pack, seconds vs minutes). Usage - uses: jetli/w

Jet Li 33 Nov 23, 2022
`wasm-snip` replaces a WebAssembly function's body with an `unreachable`

wasm-snip wasm-snip replaces a Wasm function's body with an unreachable instruction. API Docs | Contributing | Chat Built with ?? ?? by The Rust and W

Rust and WebAssembly 177 Dec 28, 2022
gc-sections for wasm

wasm-gc Note: you probably don't need to use this project. This project is no longer necessary to run by hand, nor do you need the wasm-gc executable

Alex Crichton 245 Oct 22, 2022
List the symbols within a wasm file

wasm-nm List the symbols within a wasm file. Library Executable License Contributing Executable To install the wasm-nm executable, run $ cargo install

Nick Fitzgerald 38 Nov 6, 2022