From 0d6e605c33d3314eb275bd4007de98db03cc96ac Mon Sep 17 00:00:00 2001 From: guillemcordoba Date: Mon, 18 Nov 2024 10:41:04 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20darksoil?= =?UTF-8?q?-studio/p2p-shipyard@13f9f66a7a07f836e2e82b1914dc20fec1d7fa80?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- ...js => documentation_android_developing.md.DuPgODjH.js} | 2 +- ... documentation_android_developing.md.DuPgODjH.lean.js} | 2 +- ...=> documentation_android_project-setup.md.CtEqtQxC.js} | 2 +- ...cumentation_android_project-setup.md.CtEqtQxC.lean.js} | 0 ...Y.js => documentation_android_shipping.md.KpCXQwX1.js} | 4 ++-- ...=> documentation_android_shipping.md.KpCXQwX1.lean.js} | 2 +- ...=> documentation_getting-to-know-tauri.md.v-TNTI9S.js} | 2 +- ...cumentation_getting-to-know-tauri.md.v-TNTI9S.lean.js} | 0 ...tion_how-to-create-a-holochain-runtime.md.BiKbRLJQ.js} | 4 ++-- ...how-to-create-a-holochain-runtime.md.BiKbRLJQ.lean.js} | 0 ...ntation_how-to-create-an-end-user-happ.md.PTlcKzoP.js} | 4 ++-- ...on_how-to-create-an-end-user-happ.md.PTlcKzoP.lean.js} | 0 ...TD.js => documentation_troubleshooting.md.QqR30i_C.js} | 2 +- ... => documentation_troubleshooting.md.QqR30i_C.lean.js} | 0 documentation/android/developing.html | 6 +++--- documentation/android/device-setup.html | 2 +- documentation/android/project-setup.html | 6 +++--- documentation/android/shipping.html | 6 +++--- documentation/desktop/shipping.html | 2 +- documentation/faqs.html | 2 +- documentation/getting-to-know-tauri.html | 6 +++--- documentation/how-to-create-a-holochain-runtime.html | 8 ++++---- documentation/how-to-create-an-end-user-happ.html | 8 ++++---- documentation/troubleshooting.html | 6 +++--- hashmap.json | 2 +- index.html | 2 +- license/license.html | 2 +- 28 files changed, 42 insertions(+), 42 deletions(-) rename assets/{documentation_android_developing.md.BJ0n2n08.js => documentation_android_developing.md.DuPgODjH.js} (93%) rename assets/{documentation_android_developing.md.BJ0n2n08.lean.js => documentation_android_developing.md.DuPgODjH.lean.js} (86%) rename assets/{documentation_android_project-setup.md.C8l3Hu-v.js => documentation_android_project-setup.md.CtEqtQxC.js} (98%) rename assets/{documentation_android_project-setup.md.C8l3Hu-v.lean.js => documentation_android_project-setup.md.CtEqtQxC.lean.js} (100%) rename assets/{documentation_android_shipping.md.C4sk0AzY.js => documentation_android_shipping.md.KpCXQwX1.js} (90%) rename assets/{documentation_android_shipping.md.C4sk0AzY.lean.js => documentation_android_shipping.md.KpCXQwX1.lean.js} (86%) rename assets/{documentation_getting-to-know-tauri.md.pOAII-n7.js => documentation_getting-to-know-tauri.md.v-TNTI9S.js} (90%) rename assets/{documentation_getting-to-know-tauri.md.pOAII-n7.lean.js => documentation_getting-to-know-tauri.md.v-TNTI9S.lean.js} (100%) rename assets/{documentation_how-to-create-a-holochain-runtime.md.D33KdDWW.js => documentation_how-to-create-a-holochain-runtime.md.BiKbRLJQ.js} (94%) rename assets/{documentation_how-to-create-a-holochain-runtime.md.D33KdDWW.lean.js => documentation_how-to-create-a-holochain-runtime.md.BiKbRLJQ.lean.js} (100%) rename assets/{documentation_how-to-create-an-end-user-happ.md.Ca1qhSO7.js => documentation_how-to-create-an-end-user-happ.md.PTlcKzoP.js} (96%) rename assets/{documentation_how-to-create-an-end-user-happ.md.Ca1qhSO7.lean.js => documentation_how-to-create-an-end-user-happ.md.PTlcKzoP.lean.js} (100%) rename assets/{documentation_troubleshooting.md.DD1r5KTD.js => documentation_troubleshooting.md.QqR30i_C.js} (97%) rename assets/{documentation_troubleshooting.md.DD1r5KTD.lean.js => documentation_troubleshooting.md.QqR30i_C.lean.js} (100%) diff --git a/404.html b/404.html index ee288f64..0f7a0dcb 100644 --- a/404.html +++ b/404.html @@ -15,7 +15,7 @@
- + \ No newline at end of file diff --git a/assets/documentation_android_developing.md.BJ0n2n08.js b/assets/documentation_android_developing.md.DuPgODjH.js similarity index 93% rename from assets/documentation_android_developing.md.BJ0n2n08.js rename to assets/documentation_android_developing.md.DuPgODjH.js index ca81635d..2cd60399 100644 --- a/assets/documentation_android_developing.md.BJ0n2n08.js +++ b/assets/documentation_android_developing.md.DuPgODjH.js @@ -1 +1 @@ -import{_ as e,c as a,o as i,a1 as s}from"./chunks/framework.rLYnVynv.js";const k=JSON.parse('{"title":"Developing for Android","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/android/developing.md","filePath":"documentation/android/developing.md"}'),t={name:"documentation/android/developing.md"},n=s('

Developing for Android

While developing a hApp, it's not that useful to just have one agent to test your hApp with. Instead, you usually need a couple of peers to be able to interact with one another.

The scaffolding setup steps in how to create an end-user hApp and how to create a holochain runtime create a new script in the top level package.json file called network:android. This script runs an agent in your local computer and another in an Android device, and enables communication between them.

Since we want to develop for the Android platform, we need to be inside the androidDev devShell:

bash
nix develop .#androidDev

Run all the following commands inside this terminal shell.

Before running the network:android command, make sure your Android device is connected to your computer via a USB cable and accessible to the tauri tooling by running:

bash
adb devices

You should see your device listed in the output of that command.

Also make sure that your Android device is in the same wifi network as your computer. This is necessary for them to see each other and connect in a small holochain network.

NOTE

If you haven't setup your Android device yet, head over to Android device setup to do so.

We are now ready to run the command:

bash
npm run network:android
bash
yarn network:android
bash
pnpm network:android

If you want to see logs coming from your rust backend, you can run this command:

bash
adb logcat

That's it! Have fun while building your hApp. When you are satisfied with what you have and want to release a new production version of your app, go to Shipping.

',17),o=[n];function d(p,l,h,r,c,u){return i(),a("div",null,o)}const b=e(t,[["render",d]]);export{k as __pageData,b as default}; +import{_ as e,c as a,o as i,a1 as s}from"./chunks/framework.rLYnVynv.js";const k=JSON.parse('{"title":"Developing for Android","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/android/developing.md","filePath":"documentation/android/developing.md"}'),t={name:"documentation/android/developing.md"},n=s('

Developing for Android

While developing a hApp, it's not that useful to just have one agent to test your hApp with. Instead, you usually need a couple of peers to be able to interact with one another.

The scaffolding setup steps in how to create an end-user hApp and how to create a holochain runtime create a new script in the top level package.json file called network:android. This script runs an agent in your local computer and another in an Android device, and enables communication between them.

Since we want to develop for the Android platform, we need to be inside the androidDev devShell:

bash
nix develop .#androidDev

Run all the following commands inside this terminal shell.

Before running the network:android command, make sure your Android device is connected to your computer via a USB cable and accessible to the tauri tooling by running:

bash
adb devices

You should see your device listed in the output of that command.

Also make sure that your Android device is in the same wifi network as your computer. This is necessary for them to see each other and connect in a small holochain network.

NOTE

If you haven't setup your Android device yet, head over to Android device setup to do so.

We are now ready to run the command:

bash
npm run network:android
bash
yarn network:android
bash
pnpm network:android

If you want to see logs coming from your rust backend, you can run this command:

bash
adb logcat

That's it! Have fun while building your hApp. When you are satisfied with what you have and want to release a new production version of your app, go to Shipping.

',17),o=[n];function d(p,l,h,r,c,u){return i(),a("div",null,o)}const v=e(t,[["render",d]]);export{k as __pageData,v as default}; diff --git a/assets/documentation_android_developing.md.BJ0n2n08.lean.js b/assets/documentation_android_developing.md.DuPgODjH.lean.js similarity index 86% rename from assets/documentation_android_developing.md.BJ0n2n08.lean.js rename to assets/documentation_android_developing.md.DuPgODjH.lean.js index a6565dc6..9468c925 100644 --- a/assets/documentation_android_developing.md.BJ0n2n08.lean.js +++ b/assets/documentation_android_developing.md.DuPgODjH.lean.js @@ -1 +1 @@ -import{_ as e,c as a,o as i,a1 as s}from"./chunks/framework.rLYnVynv.js";const k=JSON.parse('{"title":"Developing for Android","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/android/developing.md","filePath":"documentation/android/developing.md"}'),t={name:"documentation/android/developing.md"},n=s("",17),o=[n];function d(p,l,h,r,c,u){return i(),a("div",null,o)}const b=e(t,[["render",d]]);export{k as __pageData,b as default}; +import{_ as e,c as a,o as i,a1 as s}from"./chunks/framework.rLYnVynv.js";const k=JSON.parse('{"title":"Developing for Android","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/android/developing.md","filePath":"documentation/android/developing.md"}'),t={name:"documentation/android/developing.md"},n=s("",17),o=[n];function d(p,l,h,r,c,u){return i(),a("div",null,o)}const v=e(t,[["render",d]]);export{k as __pageData,v as default}; diff --git a/assets/documentation_android_project-setup.md.C8l3Hu-v.js b/assets/documentation_android_project-setup.md.CtEqtQxC.js similarity index 98% rename from assets/documentation_android_project-setup.md.C8l3Hu-v.js rename to assets/documentation_android_project-setup.md.CtEqtQxC.js index 2980904b..6199f8aa 100644 --- a/assets/documentation_android_project-setup.md.C8l3Hu-v.js +++ b/assets/documentation_android_project-setup.md.CtEqtQxC.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.rLYnVynv.js";const F=JSON.parse('{"title":"Project Setup for Android Development","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/android/project-setup.md","filePath":"documentation/android/project-setup.md"}'),t={name:"documentation/android/project-setup.md"},p=n(`

Project Setup for Android Development

NOTE

This guide assumes that you have already gone through either how to create an end-user hApp or how to create a holochain runtime.

  1. In the root folder of your repository, run:
bash
npm run tauri android init
bash
yarn tauri android init
bash
pnpm tauri android init

This should initialize all the necessary android files for your app.

  1. Go in the src-tauri/gen/android/app/build.gradle.kts that was generated in the previous step, and set the "usesCleartextTraffic" to true:
kotlin
plugins {
+import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.rLYnVynv.js";const F=JSON.parse('{"title":"Project Setup for Android Development","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/android/project-setup.md","filePath":"documentation/android/project-setup.md"}'),t={name:"documentation/android/project-setup.md"},p=n(`

Project Setup for Android Development

NOTE

This guide assumes that you have already gone through either how to create an end-user hApp or how to create a holochain runtime.

  1. In the root folder of your repository, run:
bash
npm run tauri android init
bash
yarn tauri android init
bash
pnpm tauri android init

This should initialize all the necessary android files for your app.

  1. Go in the src-tauri/gen/android/app/build.gradle.kts that was generated in the previous step, and set the "usesCleartextTraffic" to true:
kotlin
plugins {
     id("com.android.application")
     id("org.jetbrains.kotlin.android")
     id("rust")
diff --git a/assets/documentation_android_project-setup.md.C8l3Hu-v.lean.js b/assets/documentation_android_project-setup.md.CtEqtQxC.lean.js
similarity index 100%
rename from assets/documentation_android_project-setup.md.C8l3Hu-v.lean.js
rename to assets/documentation_android_project-setup.md.CtEqtQxC.lean.js
diff --git a/assets/documentation_android_shipping.md.C4sk0AzY.js b/assets/documentation_android_shipping.md.KpCXQwX1.js
similarity index 90%
rename from assets/documentation_android_shipping.md.C4sk0AzY.js
rename to assets/documentation_android_shipping.md.KpCXQwX1.js
index 6ae28182..219aa461 100644
--- a/assets/documentation_android_shipping.md.C4sk0AzY.js
+++ b/assets/documentation_android_shipping.md.KpCXQwX1.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,o as s,a1 as e}from"./chunks/framework.rLYnVynv.js";const u=JSON.parse('{"title":"Shipping your app for Android","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/android/shipping.md","filePath":"documentation/android/shipping.md"}'),t={name:"documentation/android/shipping.md"},n=e(`

Shipping your app for Android

To build a production version of your app, you just need to run this very simple command inside the androidDev devShell:

bash
nix develop .#androidDev
+import{_ as i,c as a,o as s,a1 as e}from"./chunks/framework.rLYnVynv.js";const u=JSON.parse('{"title":"Shipping your app for Android","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/android/shipping.md","filePath":"documentation/android/shipping.md"}'),t={name:"documentation/android/shipping.md"},n=e(`

Shipping your app for Android

To build a production version of your app, you just need to run this very simple command inside the androidDev devShell:

bash
nix develop .#androidDev
 npm run tauri android build
bash
nix develop .#androidDev
 yarn tauri android build
bash
nix develop .#androidDev
-pnpm tauri android build

Take into account that this will compile your app for all the different Android target architectures: it will take a long time.

That's it! When the command finishes, you can copy the resulting Android App Bundle and publish it on the Google Play Store, or the release method of your choosing.

`,5),p=[n];function d(l,h,o,r,k,c){return s(),a("div",null,p)}const F=i(t,[["render",d]]);export{u as __pageData,F as default}; +pnpm tauri android build

Take into account that this will compile your app for all the different Android target architectures: it will take a long time.

That's it! When the command finishes, you can copy the resulting Android App Bundle and publish it on the Google Play Store, or the release method of your choosing.

`,5),p=[n];function d(l,o,h,r,k,c){return s(),a("div",null,p)}const F=i(t,[["render",d]]);export{u as __pageData,F as default}; diff --git a/assets/documentation_android_shipping.md.C4sk0AzY.lean.js b/assets/documentation_android_shipping.md.KpCXQwX1.lean.js similarity index 86% rename from assets/documentation_android_shipping.md.C4sk0AzY.lean.js rename to assets/documentation_android_shipping.md.KpCXQwX1.lean.js index 07afd5a0..2862fabe 100644 --- a/assets/documentation_android_shipping.md.C4sk0AzY.lean.js +++ b/assets/documentation_android_shipping.md.KpCXQwX1.lean.js @@ -1 +1 @@ -import{_ as i,c as a,o as s,a1 as e}from"./chunks/framework.rLYnVynv.js";const u=JSON.parse('{"title":"Shipping your app for Android","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/android/shipping.md","filePath":"documentation/android/shipping.md"}'),t={name:"documentation/android/shipping.md"},n=e("",5),p=[n];function d(l,h,o,r,k,c){return s(),a("div",null,p)}const F=i(t,[["render",d]]);export{u as __pageData,F as default}; +import{_ as i,c as a,o as s,a1 as e}from"./chunks/framework.rLYnVynv.js";const u=JSON.parse('{"title":"Shipping your app for Android","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/android/shipping.md","filePath":"documentation/android/shipping.md"}'),t={name:"documentation/android/shipping.md"},n=e("",5),p=[n];function d(l,o,h,r,k,c){return s(),a("div",null,p)}const F=i(t,[["render",d]]);export{u as __pageData,F as default}; diff --git a/assets/documentation_getting-to-know-tauri.md.pOAII-n7.js b/assets/documentation_getting-to-know-tauri.md.v-TNTI9S.js similarity index 90% rename from assets/documentation_getting-to-know-tauri.md.pOAII-n7.js rename to assets/documentation_getting-to-know-tauri.md.v-TNTI9S.js index 2c10957b..3e218285 100644 --- a/assets/documentation_getting-to-know-tauri.md.pOAII-n7.js +++ b/assets/documentation_getting-to-know-tauri.md.v-TNTI9S.js @@ -1 +1 @@ -import{_ as a,c as i,o as s,a1 as t}from"./chunks/framework.rLYnVynv.js";const b=JSON.parse('{"title":"Getting to know Tauri","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/getting-to-know-tauri.md","filePath":"documentation/getting-to-know-tauri.md"}'),e={name:"documentation/getting-to-know-tauri.md"},n=t('

Getting to know Tauri

What is Tauri?

Tauri is a rust-based engine that allows the creation of cross-platform apps that have a web frontend and a rust-based backend. As such, it is an alternative to electron, or flutter, that can target both mobile and desktop platforms.

Although it's still young, tauri already has a wide ecosystem of plugins that enable common desktop and mobile use cases.

You can learn more about it in the official Tauri documentation.

Backend

As we just learned, the backend for a Tauri app is written in rust. Let's understand how that backend works, so that you can edit its behavior to suit your needs, if necessary.

It's important that you take a look at the file src-tauri/src/lib.rs. This is now the main starting point for your hApp, which includes the tauri-plugin-holochain plugin. This plugin will run holochain under the hood, and converts the Tauri app in to a full holochain runtime.

Still in that file, take a closer look at the .setup() hook. This is the initialization code that will be run when your end-user app is executed. You can see that the scaffolded code already contains a simple initialization logic, that you can extend to any need you have to

Refer to the rust documentation for the tauri-plugin-holochain to learn all the commands that the plugin offers.

CLI

Tauri includes a powerful CLI that allows us to execute the different commands we need in our development lifecycle:

  • To start a development version of our app, run:
bash
npm run tauri dev
bash
yarn tauri dev
bash
pnpm tauri dev

WARNING

In the case of an end-user hApp, this command won't actually work, since it needs environment variables to connect to the holochain local services to be set. Use npm start instead.

  • To create a production build for the current platform, run:
bash
npm run tauri build
bash
yarn tauri build
bash
pnpm tauri build

NOTE

This is the command you need to run in order to create a release build for your app.

  • Generate the necessary icons for your app with:
bash
npm run tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
yarn tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
pnpm tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>

WARNING

Until you run this command with your icon, your app won't compile.

  • See all the available CLI commands with:
bash
npm run tauri
bash
yarn tauri
bash
pnpm tauri

And learn more about the CLI in the official Tauri guide.

Mobile

After the initial set up and scaffolding, our Tauri app can only be built for desktop apps. To enable mobile support, there is a bit more work that needs to be done.

Android Setup

Continue to the Android setup.

iOS Setup

WARNING

Coming soon! Holochain working on iOS is blocked by wasmer having an interpreter wasm engine...

Learn more about current mobile support in the FAQs.

',30),l=[n];function p(o,h,r,d,c,u){return s(),i("div",null,l)}const g=a(e,[["render",p]]);export{b as __pageData,g as default}; +import{_ as a,c as i,o as s,a1 as t}from"./chunks/framework.rLYnVynv.js";const b=JSON.parse('{"title":"Getting to know Tauri","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/getting-to-know-tauri.md","filePath":"documentation/getting-to-know-tauri.md"}'),e={name:"documentation/getting-to-know-tauri.md"},n=t('

Getting to know Tauri

What is Tauri?

Tauri is a rust-based engine that allows the creation of cross-platform apps that have a web frontend and a rust-based backend. As such, it is an alternative to electron, or flutter, that can target both mobile and desktop platforms.

Although it's still young, tauri already has a wide ecosystem of plugins that enable common desktop and mobile use cases.

You can learn more about it in the official Tauri documentation.

Backend

As we just learned, the backend for a Tauri app is written in rust. Let's understand how that backend works, so that you can edit its behavior to suit your needs, if necessary.

It's important that you take a look at the file src-tauri/src/lib.rs. This is now the main starting point for your hApp, which includes the tauri-plugin-holochain plugin. This plugin will run holochain under the hood, and converts the Tauri app in to a full holochain runtime.

Still in that file, take a closer look at the .setup() hook. This is the initialization code that will be run when your end-user app is executed. You can see that the scaffolded code already contains a simple initialization logic, that you can extend to any need you have to

Refer to the rust documentation for the tauri-plugin-holochain to learn all the commands that the plugin offers.

CLI

Tauri includes a powerful CLI that allows us to execute the different commands we need in our development lifecycle:

  • To start a development version of our app, run:
bash
npm run tauri dev
bash
yarn tauri dev
bash
pnpm tauri dev

WARNING

In the case of an end-user hApp, this command won't actually work, since it needs environment variables to connect to the holochain local services to be set. Use npm start instead.

  • To create a production build for the current platform, run:
bash
npm run tauri build
bash
yarn tauri build
bash
pnpm tauri build

NOTE

This is the command you need to run in order to create a release build for your app.

  • Generate the necessary icons for your app with:
bash
npm run tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
yarn tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
pnpm tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>

WARNING

Until you run this command with your icon, your app won't compile.

  • See all the available CLI commands with:
bash
npm run tauri
bash
yarn tauri
bash
pnpm tauri

And learn more about the CLI in the official Tauri guide.

Mobile

After the initial set up and scaffolding, our Tauri app can only be built for desktop apps. To enable mobile support, there is a bit more work that needs to be done.

Android Setup

Continue to the Android setup.

iOS Setup

WARNING

Coming soon! Holochain working on iOS is blocked by wasmer having an interpreter wasm engine...

Learn more about current mobile support in the FAQs.

',30),l=[n];function p(o,h,r,d,c,u){return s(),i("div",null,l)}const g=a(e,[["render",p]]);export{b as __pageData,g as default}; diff --git a/assets/documentation_getting-to-know-tauri.md.pOAII-n7.lean.js b/assets/documentation_getting-to-know-tauri.md.v-TNTI9S.lean.js similarity index 100% rename from assets/documentation_getting-to-know-tauri.md.pOAII-n7.lean.js rename to assets/documentation_getting-to-know-tauri.md.v-TNTI9S.lean.js diff --git a/assets/documentation_how-to-create-a-holochain-runtime.md.D33KdDWW.js b/assets/documentation_how-to-create-a-holochain-runtime.md.BiKbRLJQ.js similarity index 94% rename from assets/documentation_how-to-create-a-holochain-runtime.md.D33KdDWW.js rename to assets/documentation_how-to-create-a-holochain-runtime.md.BiKbRLJQ.js index 9eac2b6c..198c37a5 100644 --- a/assets/documentation_how-to-create-a-holochain-runtime.md.D33KdDWW.js +++ b/assets/documentation_how-to-create-a-holochain-runtime.md.BiKbRLJQ.js @@ -1,5 +1,5 @@ -import{_ as i,c as a,o as e,a1 as s}from"./chunks/framework.rLYnVynv.js";const g=JSON.parse('{"title":"How to create a holochain runtime","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/how-to-create-a-holochain-runtime.md","filePath":"documentation/how-to-create-a-holochain-runtime.md"}'),t={name:"documentation/how-to-create-a-holochain-runtime.md"},n=s(`

How to create a holochain runtime

A holochain runtime is an end-user application that is able to install and open holochain apps and web-apps. Examples of existing runtimes include the launcher and moss.

Scaffolding

WARNING

p2p Shipyard relies heavily on nix to achieve reproducible environments. Unfortunately, nix does not support Windows. So if you have a Windows OS, you will need to install Windows Subsystem Linux and run all the steps in this guide inside of its environment.

  1. If you haven't already, install the nix package manager with:
bash
sh <(curl -L https://nixos.org/nix/install) --daemon
bash
sh <(curl -L https://nixos.org/nix/install)

And follow along its instructions and prompts.

  1. Add the appropriate nix caches to your environment:
bash
nix run nixpkgs#cachix use holochain-ci
-nix run nixpkgs#cachix use darksoil-studio
  1. In the folder where you want to create your new holochain runtime, run this command:
bash
nix run github:darksoil-studio/p2p-shipyard#scaffold-holochain-runtime

And follow along its instructions and prompts.

  1. Take a look into the repository structure that the scaffold command created, specially:
  • flake.nix: with the p2p-shipyard input and its devShells.
  • package.json: added set up scripts and some devDependencies.
  • src-tauri: here is where the code for the backend of the tauri app lives. For now it's a simple Tauri app that includes the tauri-plugin-holochain.
  • index.html: main index.html file that will be displayed when the app is opened.
  • src: this is where the code for the UI lives.
    • The scaffolded template contains a very bare bones vanilla JS app. Look in src/main.ts to see how the frontend for your runtime can connect to the AdminWebsocket.

That's it! We now have a working skeleton for a holochain runtime.

WARNING

The scaffolded tauri app is missing icons, which are needed for the app to compile. Run through the rest of this guide and the following one ("Getting to know Tauri") to be able to generate the icons for your Tauri app.

Development Environment

The scaffold-holochain-apps has added the necessary nix devShells to your flake.nix file so that you don't need to follow install anything to get the tauri or Android development environment.

NOTE

Nix devShells are packages that describe development environments, with all their dependencies and environment variables, so that the developer does not need to configure manually their setup.

As usual, run this command to enter the development environment:

bash
nix develop

This can take a while while it builds all the required dependencies.

Next, run these commands:

bash
npm install
+import{_ as i,c as a,o as e,a1 as s}from"./chunks/framework.rLYnVynv.js";const g=JSON.parse('{"title":"How to create a holochain runtime","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/how-to-create-a-holochain-runtime.md","filePath":"documentation/how-to-create-a-holochain-runtime.md"}'),t={name:"documentation/how-to-create-a-holochain-runtime.md"},n=s(`

How to create a holochain runtime

A holochain runtime is an end-user application that is able to install and open holochain apps and web-apps. Examples of existing runtimes include the launcher and moss.

Scaffolding

WARNING

p2p Shipyard relies heavily on nix to achieve reproducible environments. Unfortunately, nix does not support Windows. So if you have a Windows OS, you will need to install Windows Subsystem Linux and run all the steps in this guide inside of its environment.

  1. If you haven't already, install the nix package manager with:
bash
sh <(curl -L https://nixos.org/nix/install) --daemon
bash
sh <(curl -L https://nixos.org/nix/install)

And follow along its instructions and prompts.

  1. Add the appropriate nix caches to your environment:
bash
nix run nixpkgs#cachix use holochain-ci
+nix run nixpkgs#cachix use darksoil-studio
  1. In the folder where you want to create your new holochain runtime, run this command:
bash
nix run github:darksoil-studio/p2p-shipyard#scaffold-holochain-runtime

And follow along its instructions and prompts.

  1. Take a look into the repository structure that the scaffold command created, specially:
  • flake.nix: with the p2p-shipyard input and its devShells.
  • package.json: added set up scripts and some devDependencies.
  • src-tauri: here is where the code for the backend of the tauri app lives. For now it's a simple Tauri app that includes the tauri-plugin-holochain.
  • index.html: main index.html file that will be displayed when the app is opened.
  • src: this is where the code for the UI lives.
    • The scaffolded template contains a very bare bones vanilla JS app. Look in src/main.ts to see how the frontend for your runtime can connect to the AdminWebsocket.

That's it! We now have a working skeleton for a holochain runtime.

WARNING

The scaffolded tauri app is missing icons, which are needed for the app to compile. Run through the rest of this guide and the following one ("Getting to know Tauri") to be able to generate the icons for your Tauri app.

Development Environment

The scaffold-holochain-apps has added the necessary nix devShells to your flake.nix file so that you don't need to follow install anything to get the tauri or Android development environment.

NOTE

Nix devShells are packages that describe development environments, with all their dependencies and environment variables, so that the developer does not need to configure manually their setup.

As usual, run this command to enter the development environment:

bash
nix develop

This can take a while while it builds all the required dependencies.

Next, run these commands:

bash
npm install
 npm run tauri dev
bash
yarn install
 yarn tauri dev
bash
pnpm install
 pnpm tauri dev

This will start an instance of the app.

Under the hood, these commands are running tauri CLI commands. As such, we should get to know Tauri a bit better to be comfortable while developing the app. Go to Getting to know Tauri to familiarize yourself with it.

`,26),l=[n];function o(h,p,d,r,c,k){return e(),a("div",null,l)}const b=i(t,[["render",o]]);export{g as __pageData,b as default}; diff --git a/assets/documentation_how-to-create-a-holochain-runtime.md.D33KdDWW.lean.js b/assets/documentation_how-to-create-a-holochain-runtime.md.BiKbRLJQ.lean.js similarity index 100% rename from assets/documentation_how-to-create-a-holochain-runtime.md.D33KdDWW.lean.js rename to assets/documentation_how-to-create-a-holochain-runtime.md.BiKbRLJQ.lean.js diff --git a/assets/documentation_how-to-create-an-end-user-happ.md.Ca1qhSO7.js b/assets/documentation_how-to-create-an-end-user-happ.md.PTlcKzoP.js similarity index 96% rename from assets/documentation_how-to-create-an-end-user-happ.md.Ca1qhSO7.js rename to assets/documentation_how-to-create-an-end-user-happ.md.PTlcKzoP.js index 9bf68100..a393f095 100644 --- a/assets/documentation_how-to-create-an-end-user-happ.md.Ca1qhSO7.js +++ b/assets/documentation_how-to-create-an-end-user-happ.md.PTlcKzoP.js @@ -1,6 +1,6 @@ -import{_ as e,c as a,o as s,a1 as i}from"./chunks/framework.rLYnVynv.js";const g=JSON.parse('{"title":"How to create an end-user hApp","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/how-to-create-an-end-user-happ.md","filePath":"documentation/how-to-create-an-end-user-happ.md"}'),t={name:"documentation/how-to-create-an-end-user-happ.md"},n=i(`

How to create an end-user hApp

This guide describes how to create a hApp that can be directly installed and executed by the end users, for both desktop and mobile platforms.

Motivation

The scaffolding tool is a great way to create and package holochain applications. However, its built-in templates don't produce an end-user installable application. They produce a .webhapp file that needs to be installed in a holochain runtime, which is the actual app that is being executed in the OS of the end-user (eg. the launcher).

We need a way to create end-users applications for mobile platforms to create simple experiences similar to what users are used to in the existing app stores.

NOTE

This is also what kangaroo accomplishes. However, the approach that kangaroo takes is to serve as a template for you to clone it. The approach for p2p Shipyard's tauri-plugin-holochain is just to be another Tauri plugin, which means that apps will get bug fixes and new features automatically when upgrading to a new version of the plugin.

Scaffolding the end-user app

WARNING

p2p Shipyard relies heavily on nix to achieve reproducible environments. Unfortunately, nix does not support Windows. So if you have a Windows OS, you will need to install Windows Subsystem Linux and run all the steps in this guide inside of its environment.

  1. If you haven't already, install the nix package manager with:
bash
sh <(curl -L https://nixos.org/nix/install) --daemon
bash
sh <(curl -L https://nixos.org/nix/install)

And follow along its instructions and prompts.

  1. Add the appropriate nix caches to your environment:
bash
nix run nixpkgs#cachix use holochain-ci
+import{_ as e,c as a,o as s,a1 as i}from"./chunks/framework.rLYnVynv.js";const g=JSON.parse('{"title":"How to create an end-user hApp","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/how-to-create-an-end-user-happ.md","filePath":"documentation/how-to-create-an-end-user-happ.md"}'),t={name:"documentation/how-to-create-an-end-user-happ.md"},n=i(`

How to create an end-user hApp

This guide describes how to create a hApp that can be directly installed and executed by the end users, for both desktop and mobile platforms.

Motivation

The scaffolding tool is a great way to create and package holochain applications. However, its built-in templates don't produce an end-user installable application. They produce a .webhapp file that needs to be installed in a holochain runtime, which is the actual app that is being executed in the OS of the end-user (eg. the launcher).

We need a way to create end-users applications for mobile platforms to create simple experiences similar to what users are used to in the existing app stores.

NOTE

This is also what kangaroo accomplishes. However, the approach that kangaroo takes is to serve as a template for you to clone it. The approach for p2p Shipyard's tauri-plugin-holochain is just to be another Tauri plugin, which means that apps will get bug fixes and new features automatically when upgrading to a new version of the plugin.

Scaffolding the end-user app

WARNING

p2p Shipyard relies heavily on nix to achieve reproducible environments. Unfortunately, nix does not support Windows. So if you have a Windows OS, you will need to install Windows Subsystem Linux and run all the steps in this guide inside of its environment.

  1. If you haven't already, install the nix package manager with:
bash
sh <(curl -L https://nixos.org/nix/install) --daemon
bash
sh <(curl -L https://nixos.org/nix/install)

And follow along its instructions and prompts.

  1. Add the appropriate nix caches to your environment:
bash
nix run nixpkgs#cachix use holochain-ci
 nix run nixpkgs#cachix use darksoil-studio
  1. Scaffold your hApp using the scaffolding tool.

After it completes, make sure you execute its lasts steps:

bash
nix develop
-npm install

NOTE

If you already have a hApp that you want to convert to a tauri end-user app, you can skip this step.

  1. Run this command inside the repository of your web-hApp:
bash
nix run github:darksoil-studio/p2p-shipyard#scaffold-tauri-happ

And follow along to answer all the necessary prompts.

This will execute all the required steps to convert your previously scaffolded hApp to an end-user Tauri app.

  1. Take a look into the files that the scaffold command edited, and adapt them if necessary:
  • flake.nix: added the p2p-shipyard input and its devShells.
  • package.json: added set up scripts and some devDependencies.
  • ui/vite.config.ts: set the server configuration necessary for Tauri.
  • src-tauri: here is where the code for the backend of the tauri app lives.
    • For now it's a simple Tauri app that includes the tauri-plugin-holochain, and installs your app when it's first launched.
    • The tauri app will just use the UI that the scaffolding tool produced as its own UI.

WARNING

The scaffold-tauri-happ command assumes that you have scaffolded your app using the scaffolding tool.

It also tries to make smart guesses about the structure of your project, but it can be tricky to support every repository structure. Please open an issue in the github repository if you find any bugs in it!

That's it! We now have an end-user, cross-platform hApp.

WARNING

The scaffolded tauri app is missing icons, which are needed for the app to compile. Run through the rest of this guide and the following one (Getting to know Tauri) to be able to generate the icons for your Tauri app.

Development Environment

The scaffold-tauri-happ has added the necessary nix devShells to your flake.nix file so that you don't need to follow install anything to get the tauri or Android development environment.

NOTE

Nix devShells are packages that describe development environments, with all their dependencies and environment variables, so that the developer does not need to configure manually their setup.

As usual, run this command to enter the development environment:

bash
nix develop

This can take a while while it builds all the required dependencies.

Next, run these commands:

bash
npm install
+npm install

NOTE

If you already have a hApp that you want to convert to a tauri end-user app, you can skip this step.

  1. Run this command inside the repository of your web-hApp:
bash
nix run github:darksoil-studio/p2p-shipyard#scaffold-tauri-happ

And follow along to answer all the necessary prompts.

This will execute all the required steps to convert your previously scaffolded hApp to an end-user Tauri app.

  1. Take a look into the files that the scaffold command edited, and adapt them if necessary:
  • flake.nix: added the p2p-shipyard input and its devShells.
  • package.json: added set up scripts and some devDependencies.
  • ui/vite.config.ts: set the server configuration necessary for Tauri.
  • src-tauri: here is where the code for the backend of the tauri app lives.
    • For now it's a simple Tauri app that includes the tauri-plugin-holochain, and installs your app when it's first launched.
    • The tauri app will just use the UI that the scaffolding tool produced as its own UI.

WARNING

The scaffold-tauri-happ command assumes that you have scaffolded your app using the scaffolding tool.

It also tries to make smart guesses about the structure of your project, but it can be tricky to support every repository structure. Please open an issue in the github repository if you find any bugs in it!

That's it! We now have an end-user, cross-platform hApp.

WARNING

The scaffolded tauri app is missing icons, which are needed for the app to compile. Run through the rest of this guide and the following one (Getting to know Tauri) to be able to generate the icons for your Tauri app.

Development Environment

The scaffold-tauri-happ has added the necessary nix devShells to your flake.nix file so that you don't need to follow install anything to get the tauri or Android development environment.

NOTE

Nix devShells are packages that describe development environments, with all their dependencies and environment variables, so that the developer does not need to configure manually their setup.

As usual, run this command to enter the development environment:

bash
nix develop

This can take a while while it builds all the required dependencies.

Next, run these commands:

bash
npm install
 npm start
bash
yarn install
 yarn start
bash
pnpm install
 pnpm start

This will start two agents connected to each other.

Under the hood, these commands are running tauri CLI commands. As such, we should get to know Tauri a bit better to be comfortable while developing the app. Go to Getting to know Tauri to familiarize yourself with it.

`,36),o=[n];function l(p,h,r,d,c,u){return s(),a("div",null,o)}const b=e(t,[["render",l]]);export{g as __pageData,b as default}; diff --git a/assets/documentation_how-to-create-an-end-user-happ.md.Ca1qhSO7.lean.js b/assets/documentation_how-to-create-an-end-user-happ.md.PTlcKzoP.lean.js similarity index 100% rename from assets/documentation_how-to-create-an-end-user-happ.md.Ca1qhSO7.lean.js rename to assets/documentation_how-to-create-an-end-user-happ.md.PTlcKzoP.lean.js diff --git a/assets/documentation_troubleshooting.md.DD1r5KTD.js b/assets/documentation_troubleshooting.md.QqR30i_C.js similarity index 97% rename from assets/documentation_troubleshooting.md.DD1r5KTD.js rename to assets/documentation_troubleshooting.md.QqR30i_C.js index ee2279d2..d1992184 100644 --- a/assets/documentation_troubleshooting.md.DD1r5KTD.js +++ b/assets/documentation_troubleshooting.md.QqR30i_C.js @@ -1 +1 @@ -import{_ as s,c as a,o as i,a1 as e}from"./chunks/framework.rLYnVynv.js";const g=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/troubleshooting.md","filePath":"documentation/troubleshooting.md"}'),t={name:"documentation/troubleshooting.md"},n=e('

Troubleshooting

Tauri Issues

tauri::generate_context!() panics

If you get this error:

   Compiling holochain_cascade v0.3.1\nerror: proc macro panicked\n  --> src-tauri/src/lib.rs:47:14\n   |\n47 |         .run(tauri::generate_context!())\n   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: message: failed to read icon /tmp/forum-scaffold-tauri-happ/src-tauri/icons/32x32.png: No such file or directory (os error 2)\n\nerror: could not compile `forum-scaffold-tauri-happ` (lib) due to previous error\n    Error failed to build app: failed to build app

It means that you haven't generated the Tauri icons for your app yet. Follow these steps:

  1. Create or download the icon for your app. **It must be a square PNG image.

  2. In the root of your project, run this command:

bash
npm run tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
yarn tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
pnpm tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>

Error Have you installed the Android SDK?

If you get this error:

Error Have you installed the Android SDK? The `ANDROID_HOME` environment variable isn't set, and is required: environment variable not found: environment variable not found\nnpm run tauri android dev exited with code 1

It means you are trying to run your app in an Android device, but you are not inside your androidDev devShell, which is the one that includes the Android development environment and tooling.

Enter the androidDev devShell with:

bash
nix develop .#androidDev

And try again.


Error Android Studio project directory src-tauri/gen/android doesn't exist.

If you get this error:

 Error Android Studio project directory src-tauri/gen/android doesn't exist. Please run `tauri android init` and try again.

It means you haven't initialized your project for Android developm̀ent yet. You can do so by running:

bash
npm run tauri android init

And then try running your command again.

NixOS Issues

Connect to devices

In NixOS, the command adb devices needs root permissions, so you need to run it like this:

bash
sudo adb devices

Firewall

In NixOS, the firewall is enabled by default, which means that you can't directly run npm run network:android and have your Android device connect to the vite server running on your computer.

Disable the firewall to enable your Android device to connect to it:

  1. Identify firewall rule number:
bash
sudo iptables -L INPUT --line-numbers

Choose the firewall rule number that's blocking the connection (there is usually just one rule, if so pick that one).

  1. Remove firewall rule:
bash
sudo iptables -D INPUT <RULE_NUM>
',35),o=[n];function l(r,p,d,h,c,u){return i(),a("div",null,o)}const b=s(t,[["render",l]]);export{g as __pageData,b as default}; +import{_ as s,c as a,o as i,a1 as e}from"./chunks/framework.rLYnVynv.js";const g=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{},"headers":[],"relativePath":"documentation/troubleshooting.md","filePath":"documentation/troubleshooting.md"}'),t={name:"documentation/troubleshooting.md"},n=e('

Troubleshooting

Tauri Issues

tauri::generate_context!() panics

If you get this error:

   Compiling holochain_cascade v0.3.1\nerror: proc macro panicked\n  --> src-tauri/src/lib.rs:47:14\n   |\n47 |         .run(tauri::generate_context!())\n   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: message: failed to read icon /tmp/forum-scaffold-tauri-happ/src-tauri/icons/32x32.png: No such file or directory (os error 2)\n\nerror: could not compile `forum-scaffold-tauri-happ` (lib) due to previous error\n    Error failed to build app: failed to build app

It means that you haven't generated the Tauri icons for your app yet. Follow these steps:

  1. Create or download the icon for your app. **It must be a square PNG image.

  2. In the root of your project, run this command:

bash
npm run tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
yarn tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
pnpm tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>

Error Have you installed the Android SDK?

If you get this error:

Error Have you installed the Android SDK? The `ANDROID_HOME` environment variable isn't set, and is required: environment variable not found: environment variable not found\nnpm run tauri android dev exited with code 1

It means you are trying to run your app in an Android device, but you are not inside your androidDev devShell, which is the one that includes the Android development environment and tooling.

Enter the androidDev devShell with:

bash
nix develop .#androidDev

And try again.


Error Android Studio project directory src-tauri/gen/android doesn't exist.

If you get this error:

 Error Android Studio project directory src-tauri/gen/android doesn't exist. Please run `tauri android init` and try again.

It means you haven't initialized your project for Android developm̀ent yet. You can do so by running:

bash
npm run tauri android init

And then try running your command again.

NixOS Issues

Connect to devices

In NixOS, the command adb devices needs root permissions, so you need to run it like this:

bash
sudo adb devices

Firewall

In NixOS, the firewall is enabled by default, which means that you can't directly run npm run network:android and have your Android device connect to the vite server running on your computer.

Disable the firewall to enable your Android device to connect to it:

  1. Identify firewall rule number:
bash
sudo iptables -L INPUT --line-numbers

Choose the firewall rule number that's blocking the connection (there is usually just one rule, if so pick that one).

  1. Remove firewall rule:
bash
sudo iptables -D INPUT <RULE_NUM>
',35),o=[n];function l(r,p,d,h,c,u){return i(),a("div",null,o)}const b=s(t,[["render",l]]);export{g as __pageData,b as default}; diff --git a/assets/documentation_troubleshooting.md.DD1r5KTD.lean.js b/assets/documentation_troubleshooting.md.QqR30i_C.lean.js similarity index 100% rename from assets/documentation_troubleshooting.md.DD1r5KTD.lean.js rename to assets/documentation_troubleshooting.md.QqR30i_C.lean.js diff --git a/documentation/android/developing.html b/documentation/android/developing.html index 9d5dee9d..7cfc5ec2 100644 --- a/documentation/android/developing.html +++ b/documentation/android/developing.html @@ -12,13 +12,13 @@ - + -
Skip to content

Developing for Android

While developing a hApp, it's not that useful to just have one agent to test your hApp with. Instead, you usually need a couple of peers to be able to interact with one another.

The scaffolding setup steps in how to create an end-user hApp and how to create a holochain runtime create a new script in the top level package.json file called network:android. This script runs an agent in your local computer and another in an Android device, and enables communication between them.

Since we want to develop for the Android platform, we need to be inside the androidDev devShell:

bash
nix develop .#androidDev

Run all the following commands inside this terminal shell.

Before running the network:android command, make sure your Android device is connected to your computer via a USB cable and accessible to the tauri tooling by running:

bash
adb devices

You should see your device listed in the output of that command.

Also make sure that your Android device is in the same wifi network as your computer. This is necessary for them to see each other and connect in a small holochain network.

NOTE

If you haven't setup your Android device yet, head over to Android device setup to do so.

We are now ready to run the command:

bash
npm run network:android
bash
yarn network:android
bash
pnpm network:android

If you want to see logs coming from your rust backend, you can run this command:

bash
adb logcat

That's it! Have fun while building your hApp. When you are satisfied with what you have and want to release a new production version of your app, go to Shipping.

- +
Skip to content

Developing for Android

While developing a hApp, it's not that useful to just have one agent to test your hApp with. Instead, you usually need a couple of peers to be able to interact with one another.

The scaffolding setup steps in how to create an end-user hApp and how to create a holochain runtime create a new script in the top level package.json file called network:android. This script runs an agent in your local computer and another in an Android device, and enables communication between them.

Since we want to develop for the Android platform, we need to be inside the androidDev devShell:

bash
nix develop .#androidDev

Run all the following commands inside this terminal shell.

Before running the network:android command, make sure your Android device is connected to your computer via a USB cable and accessible to the tauri tooling by running:

bash
adb devices

You should see your device listed in the output of that command.

Also make sure that your Android device is in the same wifi network as your computer. This is necessary for them to see each other and connect in a small holochain network.

NOTE

If you haven't setup your Android device yet, head over to Android device setup to do so.

We are now ready to run the command:

bash
npm run network:android
bash
yarn network:android
bash
pnpm network:android

If you want to see logs coming from your rust backend, you can run this command:

bash
adb logcat

That's it! Have fun while building your hApp. When you are satisfied with what you have and want to release a new production version of your app, go to Shipping.

+ \ No newline at end of file diff --git a/documentation/android/device-setup.html b/documentation/android/device-setup.html index 17c72fac..c06ee753 100644 --- a/documentation/android/device-setup.html +++ b/documentation/android/device-setup.html @@ -18,7 +18,7 @@
Skip to content

Device Setup

NOTE

In this guide you will learn how to test your app directly using an Android device connected via USB to your computer.

  1. In your Android device, enable the developer options.

  2. After you have enabled the developer options, enable USB debbuging.

  3. Connect your Android device to your computer with a USB cable, and confirm in your Android device that you allow USB debugging from this computer.

  4. In the root folder of your repository, run:

bash
nix develop .#androidDev

This is a replacement command for the usual nix develop, which includes Android Studio, and all the necessary tooling that you need for Android development. Every time you want to test or build for the Android platform, you will need to enter the nix devShell this way and then your command from inside of it.

WARNING

The first time this is run, it will take some time. This is because nix has to download and build all the necessary Android tooling. After the first time, it will be almost instant.

  1. Inside your androidDev devShell, run:
bash
adb devices

If all the previous steps were successful, you should see your device in the list of devices.


That's it! You can now take a look at developing for Android to know what commands to use when targeting Android.

- + \ No newline at end of file diff --git a/documentation/android/project-setup.html b/documentation/android/project-setup.html index c56c2214..51065adc 100644 --- a/documentation/android/project-setup.html +++ b/documentation/android/project-setup.html @@ -12,12 +12,12 @@ - + -
Skip to content

Project Setup for Android Development

NOTE

This guide assumes that you have already gone through either how to create an end-user hApp or how to create a holochain runtime.

  1. In the root folder of your repository, run:
bash
npm run tauri android init
bash
yarn tauri android init
bash
pnpm tauri android init

This should initialize all the necessary android files for your app.

  1. Go in the src-tauri/gen/android/app/build.gradle.kts that was generated in the previous step, and set the "usesCleartextTraffic" to true:
kotlin
plugins {
+    
Skip to content

Project Setup for Android Development

NOTE

This guide assumes that you have already gone through either how to create an end-user hApp or how to create a holochain runtime.

  1. In the root folder of your repository, run:
bash
npm run tauri android init
bash
yarn tauri android init
bash
pnpm tauri android init

This should initialize all the necessary android files for your app.

  1. Go in the src-tauri/gen/android/app/build.gradle.kts that was generated in the previous step, and set the "usesCleartextTraffic" to true:
kotlin
plugins {
     id("com.android.application")
     id("org.jetbrains.kotlin.android")
     id("rust")
@@ -78,7 +78,7 @@
 }
 
 apply(from = "tauri.build.gradle.kts")

That's it! Your project is now ready to develop for the Android platform.

Continue to Device Setup to learn how to setup an Android device for testing your hApp.

- + \ No newline at end of file diff --git a/documentation/android/shipping.html b/documentation/android/shipping.html index 2fa3a322..eddd140a 100644 --- a/documentation/android/shipping.html +++ b/documentation/android/shipping.html @@ -12,16 +12,16 @@ - + -
Skip to content

Shipping your app for Android

To build a production version of your app, you just need to run this very simple command inside the androidDev devShell:

bash
nix develop .#androidDev
+    
Skip to content

Shipping your app for Android

To build a production version of your app, you just need to run this very simple command inside the androidDev devShell:

bash
nix develop .#androidDev
 npm run tauri android build
bash
nix develop .#androidDev
 yarn tauri android build
bash
nix develop .#androidDev
 pnpm tauri android build

Take into account that this will compile your app for all the different Android target architectures: it will take a long time.

That's it! When the command finishes, you can copy the resulting Android App Bundle and publish it on the Google Play Store, or the release method of your choosing.

- + \ No newline at end of file diff --git a/documentation/desktop/shipping.html b/documentation/desktop/shipping.html index 177a6103..ffe94fd1 100644 --- a/documentation/desktop/shipping.html +++ b/documentation/desktop/shipping.html @@ -18,7 +18,7 @@
Skip to content

Shipping for desktop platforms

The best way to create a release build targeting MacOs, Linux and Windows is to use the "release-tauri-happ" github action that was scaffolded with the scaffold-tauri-happ and scaffold-holochain-runtime commands.

Whenever you are ready to create a release build, simply create a git tag with the format v0.1.0. This will trigger a release workflow for your app, targeting MacOs, Linux and Windows.

Take a closer look at the workflow file at .github/workflows/release-tauri-app.yaml to understand the step it takes, and edit it to your particular needs if necessary.


That's it! You are now ready to ship your tauri app to desktop platforms.

- + \ No newline at end of file diff --git a/documentation/faqs.html b/documentation/faqs.html index f1e36d1b..d8919fbb 100644 --- a/documentation/faqs.html +++ b/documentation/faqs.html @@ -18,7 +18,7 @@
Skip to content

Frequently Asked Questions

Does this mean that holochain already supports mobile?

Well, not quite. Let's break it down to the two main mobile platforms:

Android

Holochain has experimental support for Android. This means that holochain works as expected on Android, except for these issues:

iOS

In development, holochain works as expected in iOS. But Apple prevents JIT compilation in iOS devices, so when a holochain app is published in the iOS store, it does not work. Thankfully there is already work in progress done by wasmer to address this issue. Stay tuned for updates!

Well, okey... Then how does p2p Shipyard help me now?

For now, you can build a desktop end-user hApp that your users can download and use, as all macOS, Linux and Windows are well supported. Furthermore, you can start experimenting with Android support, which has some UX downsides but is workable. After the issues with holochain mobile outlined above are resolved, you will be able to upgrade to a new version of the plugin to automatically get full mobile support in your hApp.

This is the way ourselves at darksoil.studio are building hApps right now. We are monitoring the issues at the core holochain infrastructure level, and in constant communication with the core holochain development team to help get them fixed. We hope that the remaining issues that prevent holochain to work on mobile outlined above get resolved soon, so that we can start deploying our holochain apps to end users.

- + \ No newline at end of file diff --git a/documentation/getting-to-know-tauri.html b/documentation/getting-to-know-tauri.html index 7bca203b..40598367 100644 --- a/documentation/getting-to-know-tauri.html +++ b/documentation/getting-to-know-tauri.html @@ -12,13 +12,13 @@ - + -
Skip to content

Getting to know Tauri

What is Tauri?

Tauri is a rust-based engine that allows the creation of cross-platform apps that have a web frontend and a rust-based backend. As such, it is an alternative to electron, or flutter, that can target both mobile and desktop platforms.

Although it's still young, tauri already has a wide ecosystem of plugins that enable common desktop and mobile use cases.

You can learn more about it in the official Tauri documentation.

Backend

As we just learned, the backend for a Tauri app is written in rust. Let's understand how that backend works, so that you can edit its behavior to suit your needs, if necessary.

It's important that you take a look at the file src-tauri/src/lib.rs. This is now the main starting point for your hApp, which includes the tauri-plugin-holochain plugin. This plugin will run holochain under the hood, and converts the Tauri app in to a full holochain runtime.

Still in that file, take a closer look at the .setup() hook. This is the initialization code that will be run when your end-user app is executed. You can see that the scaffolded code already contains a simple initialization logic, that you can extend to any need you have to

Refer to the rust documentation for the tauri-plugin-holochain to learn all the commands that the plugin offers.

CLI

Tauri includes a powerful CLI that allows us to execute the different commands we need in our development lifecycle:

  • To start a development version of our app, run:
bash
npm run tauri dev
bash
yarn tauri dev
bash
pnpm tauri dev

WARNING

In the case of an end-user hApp, this command won't actually work, since it needs environment variables to connect to the holochain local services to be set. Use npm start instead.

  • To create a production build for the current platform, run:
bash
npm run tauri build
bash
yarn tauri build
bash
pnpm tauri build

NOTE

This is the command you need to run in order to create a release build for your app.

  • Generate the necessary icons for your app with:
bash
npm run tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
yarn tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
pnpm tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>

WARNING

Until you run this command with your icon, your app won't compile.

  • See all the available CLI commands with:
bash
npm run tauri
bash
yarn tauri
bash
pnpm tauri

And learn more about the CLI in the official Tauri guide.

Mobile

After the initial set up and scaffolding, our Tauri app can only be built for desktop apps. To enable mobile support, there is a bit more work that needs to be done.

Android Setup

Continue to the Android setup.

iOS Setup

WARNING

Coming soon! Holochain working on iOS is blocked by wasmer having an interpreter wasm engine...

Learn more about current mobile support in the FAQs.

- +
Skip to content

Getting to know Tauri

What is Tauri?

Tauri is a rust-based engine that allows the creation of cross-platform apps that have a web frontend and a rust-based backend. As such, it is an alternative to electron, or flutter, that can target both mobile and desktop platforms.

Although it's still young, tauri already has a wide ecosystem of plugins that enable common desktop and mobile use cases.

You can learn more about it in the official Tauri documentation.

Backend

As we just learned, the backend for a Tauri app is written in rust. Let's understand how that backend works, so that you can edit its behavior to suit your needs, if necessary.

It's important that you take a look at the file src-tauri/src/lib.rs. This is now the main starting point for your hApp, which includes the tauri-plugin-holochain plugin. This plugin will run holochain under the hood, and converts the Tauri app in to a full holochain runtime.

Still in that file, take a closer look at the .setup() hook. This is the initialization code that will be run when your end-user app is executed. You can see that the scaffolded code already contains a simple initialization logic, that you can extend to any need you have to

Refer to the rust documentation for the tauri-plugin-holochain to learn all the commands that the plugin offers.

CLI

Tauri includes a powerful CLI that allows us to execute the different commands we need in our development lifecycle:

  • To start a development version of our app, run:
bash
npm run tauri dev
bash
yarn tauri dev
bash
pnpm tauri dev

WARNING

In the case of an end-user hApp, this command won't actually work, since it needs environment variables to connect to the holochain local services to be set. Use npm start instead.

  • To create a production build for the current platform, run:
bash
npm run tauri build
bash
yarn tauri build
bash
pnpm tauri build

NOTE

This is the command you need to run in order to create a release build for your app.

  • Generate the necessary icons for your app with:
bash
npm run tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
yarn tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
pnpm tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>

WARNING

Until you run this command with your icon, your app won't compile.

  • See all the available CLI commands with:
bash
npm run tauri
bash
yarn tauri
bash
pnpm tauri

And learn more about the CLI in the official Tauri guide.

Mobile

After the initial set up and scaffolding, our Tauri app can only be built for desktop apps. To enable mobile support, there is a bit more work that needs to be done.

Android Setup

Continue to the Android setup.

iOS Setup

WARNING

Coming soon! Holochain working on iOS is blocked by wasmer having an interpreter wasm engine...

Learn more about current mobile support in the FAQs.

+ \ No newline at end of file diff --git a/documentation/how-to-create-a-holochain-runtime.html b/documentation/how-to-create-a-holochain-runtime.html index 2c06d073..4691dafd 100644 --- a/documentation/how-to-create-a-holochain-runtime.html +++ b/documentation/how-to-create-a-holochain-runtime.html @@ -12,17 +12,17 @@ - + -
Skip to content

How to create a holochain runtime

A holochain runtime is an end-user application that is able to install and open holochain apps and web-apps. Examples of existing runtimes include the launcher and moss.

Scaffolding

WARNING

p2p Shipyard relies heavily on nix to achieve reproducible environments. Unfortunately, nix does not support Windows. So if you have a Windows OS, you will need to install Windows Subsystem Linux and run all the steps in this guide inside of its environment.

  1. If you haven't already, install the nix package manager with:
bash
sh <(curl -L https://nixos.org/nix/install) --daemon
bash
sh <(curl -L https://nixos.org/nix/install)

And follow along its instructions and prompts.

  1. Add the appropriate nix caches to your environment:
bash
nix run nixpkgs#cachix use holochain-ci
-nix run nixpkgs#cachix use darksoil-studio
  1. In the folder where you want to create your new holochain runtime, run this command:
bash
nix run github:darksoil-studio/p2p-shipyard#scaffold-holochain-runtime

And follow along its instructions and prompts.

  1. Take a look into the repository structure that the scaffold command created, specially:
  • flake.nix: with the p2p-shipyard input and its devShells.
  • package.json: added set up scripts and some devDependencies.
  • src-tauri: here is where the code for the backend of the tauri app lives. For now it's a simple Tauri app that includes the tauri-plugin-holochain.
  • index.html: main index.html file that will be displayed when the app is opened.
  • src: this is where the code for the UI lives.
    • The scaffolded template contains a very bare bones vanilla JS app. Look in src/main.ts to see how the frontend for your runtime can connect to the AdminWebsocket.

That's it! We now have a working skeleton for a holochain runtime.

WARNING

The scaffolded tauri app is missing icons, which are needed for the app to compile. Run through the rest of this guide and the following one ("Getting to know Tauri") to be able to generate the icons for your Tauri app.

Development Environment

The scaffold-holochain-apps has added the necessary nix devShells to your flake.nix file so that you don't need to follow install anything to get the tauri or Android development environment.

NOTE

Nix devShells are packages that describe development environments, with all their dependencies and environment variables, so that the developer does not need to configure manually their setup.

As usual, run this command to enter the development environment:

bash
nix develop

This can take a while while it builds all the required dependencies.

Next, run these commands:

bash
npm install
+    
Skip to content

How to create a holochain runtime

A holochain runtime is an end-user application that is able to install and open holochain apps and web-apps. Examples of existing runtimes include the launcher and moss.

Scaffolding

WARNING

p2p Shipyard relies heavily on nix to achieve reproducible environments. Unfortunately, nix does not support Windows. So if you have a Windows OS, you will need to install Windows Subsystem Linux and run all the steps in this guide inside of its environment.

  1. If you haven't already, install the nix package manager with:
bash
sh <(curl -L https://nixos.org/nix/install) --daemon
bash
sh <(curl -L https://nixos.org/nix/install)

And follow along its instructions and prompts.

  1. Add the appropriate nix caches to your environment:
bash
nix run nixpkgs#cachix use holochain-ci
+nix run nixpkgs#cachix use darksoil-studio
  1. In the folder where you want to create your new holochain runtime, run this command:
bash
nix run github:darksoil-studio/p2p-shipyard#scaffold-holochain-runtime

And follow along its instructions and prompts.

  1. Take a look into the repository structure that the scaffold command created, specially:
  • flake.nix: with the p2p-shipyard input and its devShells.
  • package.json: added set up scripts and some devDependencies.
  • src-tauri: here is where the code for the backend of the tauri app lives. For now it's a simple Tauri app that includes the tauri-plugin-holochain.
  • index.html: main index.html file that will be displayed when the app is opened.
  • src: this is where the code for the UI lives.
    • The scaffolded template contains a very bare bones vanilla JS app. Look in src/main.ts to see how the frontend for your runtime can connect to the AdminWebsocket.

That's it! We now have a working skeleton for a holochain runtime.

WARNING

The scaffolded tauri app is missing icons, which are needed for the app to compile. Run through the rest of this guide and the following one ("Getting to know Tauri") to be able to generate the icons for your Tauri app.

Development Environment

The scaffold-holochain-apps has added the necessary nix devShells to your flake.nix file so that you don't need to follow install anything to get the tauri or Android development environment.

NOTE

Nix devShells are packages that describe development environments, with all their dependencies and environment variables, so that the developer does not need to configure manually their setup.

As usual, run this command to enter the development environment:

bash
nix develop

This can take a while while it builds all the required dependencies.

Next, run these commands:

bash
npm install
 npm run tauri dev
bash
yarn install
 yarn tauri dev
bash
pnpm install
 pnpm tauri dev

This will start an instance of the app.

Under the hood, these commands are running tauri CLI commands. As such, we should get to know Tauri a bit better to be comfortable while developing the app. Go to Getting to know Tauri to familiarize yourself with it.

- + \ No newline at end of file diff --git a/documentation/how-to-create-an-end-user-happ.html b/documentation/how-to-create-an-end-user-happ.html index de7aa690..23620c7d 100644 --- a/documentation/how-to-create-an-end-user-happ.html +++ b/documentation/how-to-create-an-end-user-happ.html @@ -12,18 +12,18 @@ - + -
Skip to content

How to create an end-user hApp

This guide describes how to create a hApp that can be directly installed and executed by the end users, for both desktop and mobile platforms.

Motivation

The scaffolding tool is a great way to create and package holochain applications. However, its built-in templates don't produce an end-user installable application. They produce a .webhapp file that needs to be installed in a holochain runtime, which is the actual app that is being executed in the OS of the end-user (eg. the launcher).

We need a way to create end-users applications for mobile platforms to create simple experiences similar to what users are used to in the existing app stores.

NOTE

This is also what kangaroo accomplishes. However, the approach that kangaroo takes is to serve as a template for you to clone it. The approach for p2p Shipyard's tauri-plugin-holochain is just to be another Tauri plugin, which means that apps will get bug fixes and new features automatically when upgrading to a new version of the plugin.

Scaffolding the end-user app

WARNING

p2p Shipyard relies heavily on nix to achieve reproducible environments. Unfortunately, nix does not support Windows. So if you have a Windows OS, you will need to install Windows Subsystem Linux and run all the steps in this guide inside of its environment.

  1. If you haven't already, install the nix package manager with:
bash
sh <(curl -L https://nixos.org/nix/install) --daemon
bash
sh <(curl -L https://nixos.org/nix/install)

And follow along its instructions and prompts.

  1. Add the appropriate nix caches to your environment:
bash
nix run nixpkgs#cachix use holochain-ci
+    
Skip to content

How to create an end-user hApp

This guide describes how to create a hApp that can be directly installed and executed by the end users, for both desktop and mobile platforms.

Motivation

The scaffolding tool is a great way to create and package holochain applications. However, its built-in templates don't produce an end-user installable application. They produce a .webhapp file that needs to be installed in a holochain runtime, which is the actual app that is being executed in the OS of the end-user (eg. the launcher).

We need a way to create end-users applications for mobile platforms to create simple experiences similar to what users are used to in the existing app stores.

NOTE

This is also what kangaroo accomplishes. However, the approach that kangaroo takes is to serve as a template for you to clone it. The approach for p2p Shipyard's tauri-plugin-holochain is just to be another Tauri plugin, which means that apps will get bug fixes and new features automatically when upgrading to a new version of the plugin.

Scaffolding the end-user app

WARNING

p2p Shipyard relies heavily on nix to achieve reproducible environments. Unfortunately, nix does not support Windows. So if you have a Windows OS, you will need to install Windows Subsystem Linux and run all the steps in this guide inside of its environment.

  1. If you haven't already, install the nix package manager with:
bash
sh <(curl -L https://nixos.org/nix/install) --daemon
bash
sh <(curl -L https://nixos.org/nix/install)

And follow along its instructions and prompts.

  1. Add the appropriate nix caches to your environment:
bash
nix run nixpkgs#cachix use holochain-ci
 nix run nixpkgs#cachix use darksoil-studio
  1. Scaffold your hApp using the scaffolding tool.

After it completes, make sure you execute its lasts steps:

bash
nix develop
-npm install

NOTE

If you already have a hApp that you want to convert to a tauri end-user app, you can skip this step.

  1. Run this command inside the repository of your web-hApp:
bash
nix run github:darksoil-studio/p2p-shipyard#scaffold-tauri-happ

And follow along to answer all the necessary prompts.

This will execute all the required steps to convert your previously scaffolded hApp to an end-user Tauri app.

  1. Take a look into the files that the scaffold command edited, and adapt them if necessary:
  • flake.nix: added the p2p-shipyard input and its devShells.
  • package.json: added set up scripts and some devDependencies.
  • ui/vite.config.ts: set the server configuration necessary for Tauri.
  • src-tauri: here is where the code for the backend of the tauri app lives.
    • For now it's a simple Tauri app that includes the tauri-plugin-holochain, and installs your app when it's first launched.
    • The tauri app will just use the UI that the scaffolding tool produced as its own UI.

WARNING

The scaffold-tauri-happ command assumes that you have scaffolded your app using the scaffolding tool.

It also tries to make smart guesses about the structure of your project, but it can be tricky to support every repository structure. Please open an issue in the github repository if you find any bugs in it!

That's it! We now have an end-user, cross-platform hApp.

WARNING

The scaffolded tauri app is missing icons, which are needed for the app to compile. Run through the rest of this guide and the following one (Getting to know Tauri) to be able to generate the icons for your Tauri app.

Development Environment

The scaffold-tauri-happ has added the necessary nix devShells to your flake.nix file so that you don't need to follow install anything to get the tauri or Android development environment.

NOTE

Nix devShells are packages that describe development environments, with all their dependencies and environment variables, so that the developer does not need to configure manually their setup.

As usual, run this command to enter the development environment:

bash
nix develop

This can take a while while it builds all the required dependencies.

Next, run these commands:

bash
npm install
+npm install

NOTE

If you already have a hApp that you want to convert to a tauri end-user app, you can skip this step.

  1. Run this command inside the repository of your web-hApp:
bash
nix run github:darksoil-studio/p2p-shipyard#scaffold-tauri-happ

And follow along to answer all the necessary prompts.

This will execute all the required steps to convert your previously scaffolded hApp to an end-user Tauri app.

  1. Take a look into the files that the scaffold command edited, and adapt them if necessary:
  • flake.nix: added the p2p-shipyard input and its devShells.
  • package.json: added set up scripts and some devDependencies.
  • ui/vite.config.ts: set the server configuration necessary for Tauri.
  • src-tauri: here is where the code for the backend of the tauri app lives.
    • For now it's a simple Tauri app that includes the tauri-plugin-holochain, and installs your app when it's first launched.
    • The tauri app will just use the UI that the scaffolding tool produced as its own UI.

WARNING

The scaffold-tauri-happ command assumes that you have scaffolded your app using the scaffolding tool.

It also tries to make smart guesses about the structure of your project, but it can be tricky to support every repository structure. Please open an issue in the github repository if you find any bugs in it!

That's it! We now have an end-user, cross-platform hApp.

WARNING

The scaffolded tauri app is missing icons, which are needed for the app to compile. Run through the rest of this guide and the following one (Getting to know Tauri) to be able to generate the icons for your Tauri app.

Development Environment

The scaffold-tauri-happ has added the necessary nix devShells to your flake.nix file so that you don't need to follow install anything to get the tauri or Android development environment.

NOTE

Nix devShells are packages that describe development environments, with all their dependencies and environment variables, so that the developer does not need to configure manually their setup.

As usual, run this command to enter the development environment:

bash
nix develop

This can take a while while it builds all the required dependencies.

Next, run these commands:

bash
npm install
 npm start
bash
yarn install
 yarn start
bash
pnpm install
 pnpm start

This will start two agents connected to each other.

Under the hood, these commands are running tauri CLI commands. As such, we should get to know Tauri a bit better to be comfortable while developing the app. Go to Getting to know Tauri to familiarize yourself with it.

- + \ No newline at end of file diff --git a/documentation/troubleshooting.html b/documentation/troubleshooting.html index 9cd91b95..5672455b 100644 --- a/documentation/troubleshooting.html +++ b/documentation/troubleshooting.html @@ -12,7 +12,7 @@ - + @@ -27,9 +27,9 @@ = help: message: failed to read icon /tmp/forum-scaffold-tauri-happ/src-tauri/icons/32x32.png: No such file or directory (os error 2) error: could not compile `forum-scaffold-tauri-happ` (lib) due to previous error - Error failed to build app: failed to build app

It means that you haven't generated the Tauri icons for your app yet. Follow these steps:

  1. Create or download the icon for your app. **It must be a square PNG image.

  2. In the root of your project, run this command:

bash
npm run tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
yarn tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
pnpm tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>

Error Have you installed the Android SDK?

If you get this error:

Error Have you installed the Android SDK? The `ANDROID_HOME` environment variable isn't set, and is required: environment variable not found: environment variable not found
+    Error failed to build app: failed to build app

It means that you haven't generated the Tauri icons for your app yet. Follow these steps:

  1. Create or download the icon for your app. **It must be a square PNG image.

  2. In the root of your project, run this command:

bash
npm run tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
yarn tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
bash
pnpm tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>

Error Have you installed the Android SDK?

If you get this error:

Error Have you installed the Android SDK? The `ANDROID_HOME` environment variable isn't set, and is required: environment variable not found: environment variable not found
 npm run tauri android dev exited with code 1

It means you are trying to run your app in an Android device, but you are not inside your androidDev devShell, which is the one that includes the Android development environment and tooling.

Enter the androidDev devShell with:

bash
nix develop .#androidDev

And try again.


Error Android Studio project directory src-tauri/gen/android doesn't exist.

If you get this error:

 Error Android Studio project directory src-tauri/gen/android doesn't exist. Please run `tauri android init` and try again.

It means you haven't initialized your project for Android developm̀ent yet. You can do so by running:

bash
npm run tauri android init

And then try running your command again.

NixOS Issues

Connect to devices

In NixOS, the command adb devices needs root permissions, so you need to run it like this:

bash
sudo adb devices

Firewall

In NixOS, the firewall is enabled by default, which means that you can't directly run npm run network:android and have your Android device connect to the vite server running on your computer.

Disable the firewall to enable your Android device to connect to it:

  1. Identify firewall rule number:
bash
sudo iptables -L INPUT --line-numbers

Choose the firewall rule number that's blocking the connection (there is usually just one rule, if so pick that one).

  1. Remove firewall rule:
bash
sudo iptables -D INPUT <RULE_NUM>
- + \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index c40ca552..35d10ede 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"documentation_android_shipping.md":"C4sk0AzY","documentation_how-to-create-an-end-user-happ.md":"Ca1qhSO7","documentation_desktop_shipping.md":"G2_tgN8G","index.md":"D_nZdwiT","documentation_faqs.md":"CvZRgl5J","documentation_android_developing.md":"BJ0n2n08","documentation_android_device-setup.md":"BkD5xPhH","documentation_how-to-create-a-holochain-runtime.md":"D33KdDWW","documentation_android_project-setup.md":"C8l3Hu-v","documentation_getting-to-know-tauri.md":"pOAII-n7","license_license.md":"Bgmh-vqY","documentation_troubleshooting.md":"DD1r5KTD"} +{"documentation_android_developing.md":"DuPgODjH","documentation_android_shipping.md":"KpCXQwX1","documentation_getting-to-know-tauri.md":"v-TNTI9S","documentation_android_device-setup.md":"BkD5xPhH","license_license.md":"Bgmh-vqY","index.md":"D_nZdwiT","documentation_android_project-setup.md":"CtEqtQxC","documentation_troubleshooting.md":"QqR30i_C","documentation_faqs.md":"CvZRgl5J","documentation_desktop_shipping.md":"G2_tgN8G","documentation_how-to-create-an-end-user-happ.md":"PTlcKzoP","documentation_how-to-create-a-holochain-runtime.md":"BiKbRLJQ"} diff --git a/index.html b/index.html index d27a58f6..0aa98fcd 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@
Skip to content

p2p Shipyard

ship cross-platform p2p apps

Combining Tauri and p2p frameworks to ship end-user apps to Android, Linux, MacOS and Windows

- + \ No newline at end of file diff --git a/license/license.html b/license/license.html index a1566595..99bf76bc 100644 --- a/license/license.html +++ b/license/license.html @@ -18,7 +18,7 @@
Skip to content

License

The p2p Shipyard is currently Source-Available, and once our retroactive crowdfunding goal is reached, it will be Free and Open Source, Forever.

Until then, you just have to reach out to us to work out a contribution towards the retroactive crowdfunding goal in exchange for a license to use it. We’re committed to making it accessible, so don’t hesitate to reach out.

Once the retroactive crowdfunding goal is met, no one will ever have to ask anyone to use it again.

If you need support for integration, bug fixes, or feature requests for the p2p Shipyard, we will be offering support tickets here.

Reach out to us here!

Support the p2p Shipyard on Open Collective!

Support with ETH or HOT:

Ethereum Address: 0x848e32fA8FBf3402C0d191E918cE50103eE76A4D

Crypto Address

(all crypto contributions will also count towards the retroactive crowdfunding Goal on Open Collective)


Learn more about our approach in our substack post, and contribute to our crowdfunding in our Open Collective page.

- + \ No newline at end of file