Skip to content

clone from the hg repo - only the necessary stuff to build the iOS version

License

Notifications You must be signed in to change notification settings

mschulkind/spidermonkey

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

The SpiderMonkey JavaScript VM for iOS

How to make it work

First, you need Xcode >= 4.3.1. After that, you need autoconf213 (I recommend macports), then it's easy:

git clone git://github.com/funkaster/spidermonkey.git
cd spidermonkey/js/src
autoconf213
cd build-ios
sh build_ios_fat.sh
file libjs_static.a
> libjs_static.a: Mach-O universal binary with 2 architectures
> libjs_static.a (for architecture i386):	current ar archive random library
> libjs_static.a (for architecture armv7):	current ar archive random library

After that you would get a fat (i386 + armv7) library named libjs_static.a and a directory named dist, full of symlinks. To use that you can just cp -RL the dist directory and place it wherever you want:

cp -RL dist ~/Desktop/testmonkey/libs/spidermonkey

Then, in your iOS app, make sure you add the right header search path (libs/spidermonkey/include) and lib search path (libs/spidermonkey/libs) and add the linker flag "-ljs_static".

Enjoy!

About

clone from the hg repo - only the necessary stuff to build the iOS version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 59.0%
  • C++ 22.5%
  • C 15.9%
  • Shell 1.0%
  • Assembly 0.8%
  • Python 0.6%
  • Other 0.2%