Skip to content

NativeScript/sample-native-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

sample-native-module

This repo contains example of NativeScript native module. Regular {N} modules are created in JavaScript and you consume it as follows:

var myModule = require('./myModule.js');

NativeScript native modules are similar to Node.js addons. Native modules provide glue to C and C++ libraries. They are consumed as regular JavaScript modules.

var myModule = require('./libCalc.so');

Because native modules are architecture specific (e.g. ARM, x86, etc.) it is good practice to convey them with regular JavaScript ones that hide the details.

Native modules are useful in performance sensitive scenarios because they avoid JavaScript-to-Java marshalling. Good examples are OpenGL libraries.

You can see Android implementation here.

About

Sample native module for NativeScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages