1
mirror of https://github.com/rclone/rclone synced 2024-11-17 17:30:37 +01:00
rclone/fs/rc/js
Nick Craig-Wood aab9aa8a2e js: add experimental interface for integrating rclone into browsers
This works by compiling rclone to wasm and exporting the RC api to
javascript.
2020-08-10 17:32:21 +01:00
..
.gitignore js: add experimental interface for integrating rclone into browsers 2020-08-10 17:32:21 +01:00
index.html js: add experimental interface for integrating rclone into browsers 2020-08-10 17:32:21 +01:00
loader.js js: add experimental interface for integrating rclone into browsers 2020-08-10 17:32:21 +01:00
main.go js: add experimental interface for integrating rclone into browsers 2020-08-10 17:32:21 +01:00
Makefile js: add experimental interface for integrating rclone into browsers 2020-08-10 17:32:21 +01:00
README.md js: add experimental interface for integrating rclone into browsers 2020-08-10 17:32:21 +01:00
serve.go js: add experimental interface for integrating rclone into browsers 2020-08-10 17:32:21 +01:00
wasm_exec.js js: add experimental interface for integrating rclone into browsers 2020-08-10 17:32:21 +01:00

Rclone as WASM

This directory contains files to use the rclone rc as a library in the browser.

This works by compiling rclone to WASM and loading that in via javascript.

This contains the following files

  • index.html - test web page to load the module
  • loader.js - java script to load the module - see here for usage
  • main.go - main go code exporting the rclone rc
  • Makefile - test makefile
  • README.md - this readme
  • serve.go - test program to serve the web page
  • wasm_exec.js - interface code from the go source - don't edit

Compiling

This can be compiled by using make or alternatively GOARCH=wasm GOOS=js go build -o rclone.wasm

Running

Run the test server with make serve and examine the page at http://localhost:3000/ - look at the javascript console and look at the end of loader.js for how that works.