picrin/README.md

89 lines
3.0 KiB
Markdown
Raw Normal View History

2014-09-11 11:19:54 -04:00
<img width="500" src="https://raw.githubusercontent.com/picrin-scheme/picrin/master/etc/picrin-logo-fin01-02.png"></img>
[![Build Status](https://travis-ci.org/picrin-scheme/picrin.png)](https://travis-ci.org/picrin-scheme/picrin)
2014-09-13 09:13:47 -04:00
[![Docs Status](https://readthedocs.org/projects/picrin/badge/?version=latest)](https://picrin.readthedocs.org/)
2014-01-17 07:11:43 -05:00
2014-08-31 12:58:47 -04:00
Picrin is a lightweight scheme implementation intended to comply with full R7RS specification. Its code is written in pure C99 and does not require any special external libraries installed on the platform.
2013-10-17 01:09:39 -04:00
2014-05-25 23:07:32 -04:00
## Documentation
2014-02-14 22:50:17 -05:00
2014-05-25 23:07:32 -04:00
See http://picrin.readthedocs.org/
2014-04-05 12:11:14 -04:00
2013-10-19 14:20:41 -04:00
## Homepage
Currently picrin is hosted on Github. You can freely send a bug report or pull-request, and fork the repository.
2014-08-29 00:27:31 -04:00
https://github.com/picrin-scheme/picrin
2013-10-19 14:20:41 -04:00
## IRC
2014-06-01 19:26:29 -04:00
There is a chat room on chat.freenode.org, channel #picrin. IRC logs here: https://botbot.me/freenode/picrin/
2013-10-17 01:09:39 -04:00
## How to use it
To build picrin, you need some build tools installed on your platform.
2014-06-15 13:22:09 -04:00
- cmake (>= 2.6)
2014-06-15 13:12:05 -04:00
### Generate Makefile
2014-03-01 22:54:37 -05:00
2015-01-03 23:16:10 -05:00
Change directory to `build` then run `cmake` to create Makefile. Once `Makefile` is generated you can run `make` command to build picrin.
2014-03-01 22:54:37 -05:00
2014-06-15 13:12:05 -04:00
$ cd build
2015-01-03 23:16:10 -05:00
$ cmake ..
2014-03-01 22:54:37 -05:00
2015-01-03 23:16:10 -05:00
Actually you don't necessarily need to move to `build` directory before running `cmake` (in that case `$ cmake .`), but I strongly recommend to follow above instruction.
2014-03-01 22:54:37 -05:00
2014-06-20 22:07:48 -04:00
Before generating Makefile, you can change some compilation switches to enable or disable optional features. Take *NAN_BOXING* for example, when you turn on "Use C11 feature" flag and the platform supports addresses of 48bit length, it is enabled.
### Build
2013-10-17 01:09:39 -04:00
2014-06-15 13:12:05 -04:00
A built executable binary will be under bin/ directory and shared libraries under lib/.
2014-03-01 22:54:37 -05:00
2014-06-15 13:12:05 -04:00
$ make
2013-11-28 10:15:10 -05:00
2014-06-15 13:12:05 -04:00
If you are building picrin on other systems than x86_64, PIC_NAN_BOXING flag is automatically turned on (see include/picrin/config.h for detail).
2013-10-17 01:09:39 -04:00
### Install
2014-04-05 23:41:31 -04:00
2015-01-03 23:16:10 -05:00
Just running `make install`, picrin library, headers, and runtime binary are install on your system, by default into `/usr/local` directory. You can change this value via cmake.
2014-04-05 23:41:31 -04:00
2014-06-15 13:12:05 -04:00
$ make install
2014-04-05 23:41:31 -04:00
### Run
2013-10-17 01:09:39 -04:00
2014-06-15 13:12:05 -04:00
Before installing picrin, you can try picrin without breaking any of your system. Simply directly run the binary `bin/picrin` from terminal, or you can use `make` to execute it like this.
2013-10-17 01:09:39 -04:00
2014-06-15 13:12:05 -04:00
$ make run
2013-11-13 23:57:28 -05:00
2015-01-03 23:20:06 -05:00
### Run Test
To run all the test including contribs, execute this.
$ make test
To test only R7RS features,
$ make test-r7rs
### Debug run
2013-10-17 01:09:39 -04:00
2014-06-15 13:12:05 -04:00
If you execute `cmake` with debug flag `-DCMAKE_BUILD_TYPE=Debug`, it builds the binary with all debug flags enabled (PIC_GC_STRESS, VM_DEBUG, DEBUG).
2013-11-28 10:15:10 -05:00
2014-06-15 13:12:05 -04:00
$ cmake -DCMAKE_BUILD_TYPE=Debug ..
2013-11-28 10:15:10 -05:00
2013-10-17 07:58:01 -04:00
## Requirement
2014-03-31 08:40:00 -04:00
Picrin scheme depends on some external libraries to build the binary:
2013-10-17 07:58:01 -04:00
2014-05-18 20:01:26 -04:00
- perl
2014-05-25 23:06:16 -04:00
- libedit (optional)
- regex.h of POSIX.1 (optional)
2013-10-17 07:58:01 -04:00
2014-03-02 00:34:02 -05:00
Optional libraries are, if cmake detected them, automatically enabled.
2014-03-01 22:54:37 -05:00
The compilation is tested only on Mac OSX and Ubuntu. I think (or hope) it'll be ok to compile and run on other operating systems such as Arch or Windows, but I don't guarantee :(
2013-10-17 01:09:39 -04:00
## Authors
2014-01-17 07:02:31 -05:00
See `AUTHORS`