To generate mobile bindings for Android and iOS, follow these steps:
-
Navigate to the
aptos-mobile
folder. -
Inside the
aptos-mobile
directory, locate the subdirectories that contain the platform-specific binding scripts. -
Run the respective scripts for each platform:
- Android: Execute
build-android.sh
in each subdirectory../build-android.sh
- iOS: Execute
build-ios.sh
in each subdirectory../build-ios.sh
- Android: Execute
-
Repeat the above steps for all subdirectories within the
aptos-mobile
folder.
These scripts will generate the necessary bindings and artifacts for the respective platforms, making the mobile integration seamless.
To generate WASM bindings, follow these steps:
-
Navigate to the
aptos-wasm
folder. -
Inside the
aptos-wasm
directory, locate the subdirectories that contain the platform-specific scripts for WASM generation. -
Run the respective scripts for each platform:
-
macOS: Ensure Docker is installed on your machine, then execute
build-wasm.sh
in each subdirectory../build-wasm.sh
-
Linux: Use
wasm-pack
to build the bindings in each subdirectory by running the following command:wasm-pack build --release --target web -d "$dir/pkg"
Replace
$dir
with the name of the specific subdirectory you are working in.
-
-
Once WASM bindings have been generated in all subdirectories, you can create a unified package by running the
gen-npm-pkg.sh
script at the root of the project:./gen-npm-pkg.sh
These steps will generate the necessary WASM bindings and artifacts for the respective platforms, providing a seamless integration experience.