File tree Expand file tree Collapse file tree 8 files changed +117
-0
lines changed
Expand file tree Collapse file tree 8 files changed +117
-0
lines changed Original file line number Diff line number Diff line change 1+ root = true
2+
3+ [* ]
4+ indent_style = space
5+ indent_size = 2
6+ end_of_line = lf
7+ charset = utf-8
8+ trim_trailing_whitespace = true
9+ insert_final_newline = true
10+
11+ [* .md ]
12+ trim_trailing_whitespace = false
13+
14+ [* .rs ]
15+ indent_style = space
16+ indent_size = 4
17+
18+ [* .toml ]
19+ indent_style = space
20+ indent_size = 4
Original file line number Diff line number Diff line change 1+ node_modules
2+ meta.json
3+
4+ # Logs
5+ logs
6+ * .log
7+
8+ # Runtime data
9+ pids
10+ * .pid
11+ * .seed
12+
13+ # Directory for instrumented libs generated by jscoverage/JSCover
14+ lib-cov
15+
16+ # Coverage directory used by tools like istanbul
17+ coverage
18+
19+ # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
20+ .grunt
21+
22+ # node-waf configuration
23+ .lock-wscript
24+
25+ # Compiled binary addons (http://nodejs.org/api/addons.html)
26+ build /Release
27+ .eslintcache
28+
29+ # Dependency directory
30+ # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
31+ node_modules
32+
33+ # OSX
34+ .DS_Store
35+
36+ .idea
37+ npm-debug.log. *
38+ target
39+ index.node
40+ artifacts.json
41+ package-lock.json
Original file line number Diff line number Diff line change 1+ # sqlite
2+
3+
Original file line number Diff line number Diff line change 1+ var addon = require ( '../native' ) ;
2+
3+ console . log ( addon . hello ( ) ) ;
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " sqlite"
3+ version = " 0.1.0"
4+ authors = [
" Amila Welihinda <[email protected] >" ]
5+ license = " MIT"
6+ build = " build.rs"
7+ exclude = [" artifacts.json" , " index.node" ]
8+
9+ [lib ]
10+ name = " sqlite"
11+ crate-type = [" dylib" ]
12+
13+ [build-dependencies ]
14+ neon-build = " 0.2.0"
15+
16+ [dependencies ]
17+ neon = " 0.2.0"
Original file line number Diff line number Diff line change 1+ extern crate neon_build;
2+
3+ fn main ( ) {
4+ neon_build:: setup ( ) ; // must be called in build.rs
5+
6+ // add project-specific build logic here...
7+ }
Original file line number Diff line number Diff line change 1+ #[ macro_use]
2+ extern crate neon;
3+
4+ use neon:: prelude:: * ;
5+
6+ fn hello ( mut cx : FunctionContext ) -> JsResult < JsString > {
7+ Ok ( cx. string ( "hello node" ) )
8+ }
9+
10+ register_module ! ( mut cx, {
11+ cx. export_function( "hello" , hello)
12+ } ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " sqlite" ,
3+ "version" : " 0.1.0" ,
4+ "description" : " " ,
5+ "main" : " lib/index.js" ,
6+ "author" :
" Amila Welihinda <[email protected] >" ,
7+ "license" : " MIT" ,
8+ "dependencies" : {
9+ "neon-cli" : " ^0.2.0"
10+ },
11+ "scripts" : {
12+ "install" : " neon build"
13+ }
14+ }
You can’t perform that action at this time.
0 commit comments