Difference between revisions of "Forth Bridge"

From Infinity Wiki
Jump to navigation Jump to search
(Created page with "Forth Bridge is the fourth full-system preview release of Infinity. Forth Bridge showcases low-level Python bindings for libi8x, which are used by the note tester [I8X] and th...")
(No difference)

Revision as of 03:13, 10 July 2017

Forth Bridge is the fourth full-system preview release of Infinity. Forth Bridge showcases low-level Python bindings for libi8x, which are used by the note tester [I8X] and the note compiler's testsuite. Forth Bridge will be released July 10, 2017.


Changes since Infinity Third Eye

libi8x

  • libi8x now has low-level Python bindings (to be supplemented by a high-level layer in a future release.)
  • The relocation interface has changed.
  • Userdata is now immutable once set.
  • A number of bugs in the LEB128 decoders and function unregistration are now fixed.
  • A number of previously-internal functions are now public.
  • A new error code I8X_NATCALL_FAILED has been introduced.

I8C

  • I8X now uses libi8x to execute Infinity functions if libi8x and its Python bindings are installed.
  • Infinity functions provided by testcases must now be identified using the @TestCase.provide decorator.
  • The function TestCase.implement has been removed.
  • The interpreter context is no longer accessible as TestCase.i8ctx. Infinity functions should now be executed using TestCase.call.

glibc

  • All testcases have been updated to use @TestCase.provide.


Building Infinity Forth Bridge

Build libi8x with the shim libthread_db

To build libi8x with the shim libthread_db you first need to install the elfutils libelf development files. For Fedora and RHEL this is the elfutils-libelf-devel RPM. For Debian and Ubuntu the package you need is libelf-dev. Either way, once done you should see /usr/include/libelf.h on your system.

Once that's there, clone and build libi8x:

 git clone https://gitlab.com/gbenson/libi8x.git
 cd libi8x
 git branch forth-bridge infinity-forth-bridge
 git checkout forth-bridge
 ./autogen.sh
 ./configure
 make
 make check  # optional

You should see an examples/libthread_db.so.1 symbolic link if it worked.


Install libi8x Python bindings

Now you need to build and install the Python bindings that the note compiler needs:

 cd python
 python setup.py test  # optional
 python setup.py install --user

You should be able to execute import _libi8x in Python without error if this step worked.