@fxpineau/healpix
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

CDS implementation of the HEALPix tesselation in Rust compiled to WASM. See github repo, more particullar this directory.

Javascript example

Build the library locally from Rust source codes

First install Rust if not already done:

curl https://sh.rustup.rs -sSf | sh

(More details here if you are not using Linux.)

To build the WASM and Javascript files, you need to install wasm-bindgen in addition to the nightly version of Rust:

rustup target add wasm32-unknown-unknown --toolchain nightly
cargo +nightly install wasm-bindgen-cli

To test the demo page, you have to load the WASM/Javascript files from an HTTP server. To start a local HTTP server, you can use (requires python):

# For python 2
python -m SimpleHTTPServer
# For python 3
python -m http.server

Then load in your favourite browser the URL http://localhost:8000/test.html and/or http://localhost:8000/demo.html

/@fxpineau/healpix/

    Package Sidebar

    Install

    npm i @fxpineau/healpix

    Weekly Downloads

    0

    Version

    0.1.3

    License

    none

    Unpacked Size

    140 kB

    Total Files

    6

    Last publish

    Collaborators

    • tboch
    • fxpineau
    • manon_marchand
    • bmatthieu3