First compilation

Last updated 10 days ago

Do you first compilation with NectarJS

Hello World

Compiling a hello world for your platform is simple.

Open your console, and follow these steps :

$ echo "console.log('Hello World !');" > hello.js
nectar --run --single hello.js

Once done, you should see in your console :

Hello World !

That's all. You compiled JS.

Hello World for another system

Now, we want to compile our Hello World example for another system. Why not Linux 32 bits ?

nectar --single --target linux-x86-32 hello.js

Yeah ! It's done !

You could have more information about compilation with --verbose :

nectar --single --target linux-x85-32 --verbose hello.js

Now, you can compile this example for Mac or Windows with the same syntax.