Looking at projects that are good candidates for being re-written in rust / webassembly!
https://www.npmjs.com/package/moment-timezone
could build off work in rust: https://github.com/chronotope/chrono
const fs = require('fs'); | |
const path = require('path'); | |
const entry = 'src\\index.js'; | |
const importRegex = /^import.+?from ['"]([^'"]+)['"];?\s*$/gm; | |
function resolve(name) { | |
try { |
const fs = require("fs"); | |
const path = require("path"); | |
const glob = require("glob"); | |
const async = require("async"); | |
const zlib = require("zlib"); | |
function gzipFile(src, callback) { | |
console.log(`Compressing ${src}`); | |
const dst = `${src}.gz`; | |
fs.createReadStream(src) |
Looking at projects that are good candidates for being re-written in rust / webassembly!
https://www.npmjs.com/package/moment-timezone
could build off work in rust: https://github.com/chronotope/chrono
package batchchan | |
import "github.com/cheekybits/genny/generic" | |
import ( | |
"fmt" | |
) | |
type T generic.Type |
/** @jsx React.DOM */ | |
// Wrapper around the selectize jQuery plugin. | |
module.exports = React.createClass({ | |
getDefaultProps: function() { | |
return { | |
// HTML attrs | |
disabled: false, | |
multiple: false, |
const PENDING = 0; | |
const FULFILLED = 1; | |
const REJECTED = 2; | |
function PromiseState(component, stateKey, initial) { | |
this.component = component; | |
this.stateKey = stateKey; | |
var self = this; |
function genSelectorType({ count, isParametric, isArraySelector }) { | |
const rmap = fn => { | |
const results = []; | |
for (let i = 2; i <= count; i++) { | |
results.push(fn(i)); | |
} | |
return results; | |
}; |
extern crate rustc_serialize; | |
use std::io; | |
use rustc_serialize::json::Json; | |
fn main() { | |
loop { | |
let mut input = String::new(); | |
io::stdin().read_line(&mut input).unwrap(); |
func pingDatabase(db *sql.DB, seconds int) { | |
errc := make(chan error, 1) | |
go func() { | |
errc <- db.Ping() | |
}() | |
select { | |
case err := <-errc: | |
return err | |
case <-time.After(time.Second * seconds): |
var Tapable = require("tapable"); | |
Tapable.prototype.plugin = function plugin(name, fn) { | |
if(Array.isArray(name)) { | |
name.forEach(function(name) { | |
this.plugin(name, fn); | |
}, this); | |
return; | |
} |