This short doc shows how to build rust to be used by flutter/android app.
Inspired by hyousef's work but added some details for the workflow.
Docs:
buildscript { | |
dependencies { | |
classpath 'org.asciidoctor:asciidoctorj:1.5.4.1' | |
} | |
} | |
plugins { | |
id 'org.asciidoctor.convert' version '1.5.3' | |
id 'com.github.jruby-gradle.base' version '1.3.3' | |
} |
package main | |
import ( | |
"log" | |
"bufio" | |
"time" | |
"os" | |
"fmt" | |
"io" | |
"net" |
var child_process = require('child_process'); | |
exports.handler = function(event, context) { | |
var proc = spawn('./test', [ JSON.stringify(event) ], { stdio: 'inherit' }); | |
proc.on('close', function(code){ | |
if(code !== 0) { | |
return context.done(new Error("Process exited with non-zero status code")); | |
} |
2014-03-04 | 15dfb8e6cc4111e3a5bb600308919594 | 11 | |
---|---|---|---|
2014-03-06 | 81da510acc4111e387f3600308919594 | 61 |
-- PostgreSQL 9.2 beta (for the new JSON datatype) | |
-- You can actually use an earlier version and a TEXT type too | |
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8 | |
-- Inspired by | |
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html | |
-- http://ssql-pgaustin.herokuapp.com/#1 | |
-- JSON Types need to be mapped into corresponding PG types | |
-- |
// ... rest of Config.groovy content goes above this line to ensure that | |
// the JSON overrides existing settings. | |
ConfigLoader.addEntries(loadJson(fetchJson()), this) | |
def fetchJson() { return System.getenv("GRAILS_APP_CONFIG") } | |
def loadJson(content) { return content ? grails.converters.JSON.parse(content) : [:] } |
apply plugin: 'groovy' | |
repositories { | |
mavenCentral() | |
// vertxHome must be defined in gradle.properties | |
flatDir { dirs "${vertxHome}/lib/jars" } | |
} | |
dependencies { | |
groovy 'org.codehaus.groovy:groovy:1.8.6' |
curl https://raw.github.com/gist/1588091/8b7b7a203074231f3dc75bdee48b3017078fb621/CentOS-Base.repo -o /etc/yum.repos.d/CentOS-Base.repo | |
curl https://raw.github.com/gist/1588091/2e5ab750cd0603dd7210ea7a999d15f9aadae711/epel.repo -o /etc/yum.repos.d/epel.repo |