Skip to content

Serialization of compressed UUIDs implemented in Rust

Notifications You must be signed in to change notification settings

noencke/uuid-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uuid Cluster

Setup

Setup Rust, wasm-pack and NodeJS as directed in https://developer.mozilla.org/en-US/docs/WebAssembly/Rust_to_wasm

Installing wasm-pack on windows may be easier via: https://rustwasm.github.io/wasm-pack/installer/

run:

  1. cargo test to make sure rust is setup
  2. cd ./site
  3. npm run build to wasm-pack for both bundler and nodejs, and compile site's test.ts file with tsc
  4. npm run webpack to test that webpack works with the wasm module and our typescript settings
  5. npm run test:ts-node run nodejs via ts-mocha
  6. npm run test:node run node with the compiled js file
  7. npm run serve serve webpacked data with webpack dev server

To make this all work, we run wasm pack twice and combine the results into one package (workaround for not having rustwasm/wasm-pack#313) This is done in ./site's build script. It deletes the inner package.json (which is unneeded). Excluding those nested package.json files using gitignore or npmignore does not work. Deleting these nested package.json files causes the .gitignore in the nested folders to over ride the top level files list, so we delete those as well.

I tried to copy the readme into the cop level package with copyfiles -V ../pkg_combo/bundler/README.md ../pkg_combo/

but that fails to do anything useful:

unglobed path: ../pkg_combo/bundler/README.md
copy from: ../pkg_combo/bundler/README.md
copy to: ../pkg_combo/bundler/README.md

so no package readme for now.

Issues:

microsoft/TypeScript#46452

rustwasm/wasm-pack#1039

Publishing

  1. cd ./site
  2. Update version in Cargo.toml
  3. npm run build
  4. cd ../pkg_combo
  5. Update version in pkg_combo\package.json
  6. npm publish (I recommend npm publish --dry-run first)

If you see an error like

npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/uuid-cluster - Not found
npm ERR! 404
npm ERR! 404  'uuid-cluster@0.2.1' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

This means you need to npm login.

About

Serialization of compressed UUIDs implemented in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published