hero_core-wasm
TypeScript icon, indicating that this package has built-in type declarations

0.1.21 • Public • Published

Android

To Build the Android Library

  • Ensure cargo.toml uses [lib] crate-type = ["cdylib"]
  • Type: . ./scripts/build_ios.sh

iOS

To Build the iOS Library

  • Ensure cargo.toml uses [lib] crate-type = ["staticlib"]
  • Open a terminal
  • cd to the project root directory.
  • First Time:
    • Type: cbindgen src/lib.rs -l c > hero_corelib.h
    • Currently, cbindgen will include some unneeded #defines. Open hero_corelib.h in the project root and delete ALL #defines. Do the same for ios/include/hero_corelib.h
  • Every Time:
    • Type: . ./scripts/build_ios.sh

To Use the iOS Library

The library is already set up for use in the xcode project. Just open /ios/hero-designer-ios/hero-designer-ios.xcodeproj in xcode.

NPM

To Build the WASM Package:

  • Ensure cargo.toml uses [lib] crate-type = ["cdylib", "rlib"]
  • Type: wasm-pack build

To Publish the WASM Package to NPM:

  • Open a terminal at the project root directory.
  • Type: cd pkg
  • Edit package.json, changing the package name to hero_core-wasm and bump the version number.
  • https://www.npmjs.com/package/hero_core-wasm
  • Type: npm login
  • username: magicjava password: JazuTKPaaQV2ek+xAlRsub4iIYc= email: magicjtv@gmail.com
  • Type: npm publish

Examples

To Build the Examples

  • Ensure the [lib] section of cargo.toml has all entries commented out
  • Type: cargo run --example [example_name]

Deploy To Heroku

To deploy

  • Ensure the [lib] section of cargo.toml has all entries commented out
  • Ensure code is pushed to git
  • Type: git push heroku master
  • uscomics@protonmail.com
  • heroku git:remote -a gentle-dusk-67062

Resources

Android Resources

iOS Resources

Rust Resources

Add examples to your Rust libraries Heroku buildpack for Rust How to publish packages to npm (the way the industry does things)

  • WASM Resources

Readme

Keywords

none

Package Sidebar

Install

npm i hero_core-wasm

Weekly Downloads

21

Version

0.1.21

License

none

Unpacked Size

734 kB

Total Files

5

Last publish

Collaborators

  • magicjava