Last active
March 9, 2018 06:30
-
-
Save mizdra/e71b62f0ee839c8ad58ef679f2db747b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { add } from './math.rs' | |
console.log(add(1, 2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[no_mangle] | |
pub fn add(a: i32, b: i32) -> i32 { | |
a + b | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "parcel-wasm-for-node", | |
"version": "0.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"scripts": { | |
"build": "parcel build -t node -o dist/bundle.js index.js", | |
"start": "node dist/bundle.js", | |
"prestart": "npm run build" | |
}, | |
"devDependencies": { | |
"parcel-bundler": "^1.6.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment