All Projects → swiftwasm → swiftwasm-compile-service

swiftwasm / swiftwasm-compile-service

Licence: Apache-2.0 license
Web service for compling Swift to Wasm, used by Try It Now on https://swiftwasm.org

Programming Languages

javascript
184084 projects - #8 most used programming language
Makefile
30231 projects
shell
77523 projects

Compile microservice for the Try It Now feature on https://swiftwasm.org.

Running

npm install
make prebuilt/wabt prebuilt/swift
node local_server.js

Then run

curl -d "{\"src\": \"print(1234)\"}" -H "Content-Type: application/json" http://localhost:3000/v1/compile

Deploying

This service can be deployed as a Firebase Function.

Instructions tested on macOS 10.15.3 with firebase-tools 8.0.2.

$ brew install rpm2cpio
$ npm install firebase-tools -g
make deploy
cd FirebaseFunction/functions
npm install
cd ..
firebase deploy

License

Apache 2.0.

Note that the compilers and libraries fetched by ./downloadPrebuilts.sh have different licenses.

Code of Conduct

This project has adopted the Contributor Covenant, version 1.4.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].