1
0
mirror of https://github.com/rclone/rclone.git synced 2025-01-13 20:38:12 +02:00
rclone/fs/rc/js
João Henrique Franco 92ffcf9f86
wasm: fix walltime link error by adding up-to-date wasm_exec.js
Solves link error while running rclone's wasm version. Go's `walltime1` function was renamed to `walltime`. This commit updates wasm_exec.js with the new name.
2022-11-07 12:13:23 +00:00
..
.gitignore
index.html
loader.js fs/rc/js: correct RC method names 2022-04-22 12:44:04 +01:00
main.go Remove github.com/pkg/errors and replace with std library version 2021-11-07 11:53:30 +00:00
Makefile
README.md
serve.go
wasm_exec.js wasm: fix walltime link error by adding up-to-date wasm_exec.js 2022-11-07 12:13:23 +00: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.