This is scaffolding to assist in building desktop-based IPFS applications using JS/HTML/CSS /w Tauri.
This is a work in progress, there be 🐉.
Clone the repository, and cd into it.
git clone https://github.com/TheDiscordian/native-ipfs-building-blox.git
cd native-ipfs-building-blox
cargo install tauri-cli
npm install
npm run build
Note that the browserification is done by tools/copyImports.py
, which is very simple. Feel free to implement your own browserification solution if you'd rather.
We need to fetch Kubo, and name it in a way that Tauri is happy with it.
This script should do all the work for you:
./fetch-kubo.sh
If it doesn't work for you refer to the Windows instructions for how to obtain and rename the kubo binary.
Grab the appropriate kubo binary. Ensure you extract the package, pulling the ipfs binary out. Then move it to bin/
naming it according to this guide's parameters (final name will be something like kubo-x86_64-pc-windows-msvc.exe
, probably, check here if you can't figure out your triple).
cargo tauri dev
The default repo path for Kubo is set to .kubo
, you can configure this value in src/main.rs
in REPO_PATH
.
By default copyImports.py
will only work with libs which ultimately generate a dist/index.min.js
file. If your lib does, install it how you normally would (npm install --save <LIB>
), then add it into ui/index.html
like <script src="https://github.com/TheDiscordian/native-ipfs-building-blox/raw/master/<LIB>.min.js"></script>
.
You don't need to use copyImports.py
, if you figure out an easier way to accomplish the same thing, please share.