aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJakob Odersky <jodersky@gmail.com>2014-04-21 11:34:23 +0200
committerJakob Odersky <jodersky@gmail.com>2014-04-21 11:34:23 +0200
commitc4fc5e0bc6ae58d4cbdd0a26063335d921144850 (patch)
tree244b640e7fee345e5320c6045d5b209221b01b97 /README.md
parent48b8f101cca75126d8afffeba8fb3d13070f168b (diff)
downloadakka-serial-c4fc5e0bc6ae58d4cbdd0a26063335d921144850.tar.gz
akka-serial-c4fc5e0bc6ae58d4cbdd0a26063335d921144850.tar.bz2
akka-serial-c4fc5e0bc6ae58d4cbdd0a26063335d921144850.zip
update documentation
Diffstat (limited to 'README.md')
-rw-r--r--README.md28
1 files changed, 26 insertions, 2 deletions
diff --git a/README.md b/README.md
index 4837a73..816b5f2 100644
--- a/README.md
+++ b/README.md
@@ -9,9 +9,33 @@ For a short guide on how to use flow see the file [documentation/basics.md](docu
Flow is built and its examples run with SBT. To get started, include a dependency to flow in your project:
- libraryDependencies += "com.github.jodersky" %% "flow" % "2.0.0-RC2"
+ libraryDependencies += "com.github.jodersky" %% "flow" % "2.0.0-RC3" (repository pending)
-ATTENTION: flow uses native libraries to back serial communication, therefore before you can run any application depending on flow you must include flow's native library in the JVM library path. Check out section 'build' on how this may be done.
+ATTENTION: flow uses native libraries to back serial communication, therefore before you can run any application depending on flow you must include flow's native library! To do so, you have two options.
+
+1. The easy way: add a second dependency to your project:
+
+ libraryDependencies += "com.github.jodersky" %% "flow-native" % "2.0.0-RC3" (repository pending)
+
+ This will add a jar to your classpath containing native libraries for various platforms. At run time, the correct library for the current platform is selected, extracted and loaded. This solution enables running applications seamlessly, as if they were pure JVM applications. However, since the JVM does not enable full determination of the current platform (only OS and rough architecture are known), only a couple of platforms can be supported through this solution at the same time. Currently, these are given in the table below.
+
+ | OS | Architecture | Notes |
+ |-------------------|----------------------|------------------------------------------------------------------------|
+ | Linux | x86<br>x86_64<br>ARM (v7, hardfloat ABI) | A user accessing a serial port may need to be in the dialout group <br> ARM may work on other versions too, any feedback is welcome!<br>|
+ | Mac OS X | x86_64 | Use /dev/cu* device instead of /dev/tty*. |
+
+
+2. Maximum scalability: do not include the second dependency above. Instead, for every end-user application that relies on flow, manually add the native library for the current platform to the JVM's library path. This can be achieved through various ways, notably:
+ - Per application:
+ Run your program with the command-line option ```-Djava.library.path=".:<folder containing libflow.so>"```. E.g. ```java -Djava.library.path=".:/home/<folder containing libflow.so>" -jar your-app.jar```
+
+ - System- or user-wide:
+ - Copy the native library to a place that is on the default java library path and run your application normally. Such places usually include /usr/lib and /usr/local/lib.
+ - Use a provided installer (currently debian archive and mac .pkg, available in releases)
+
+ The native library can either be obtained by building flow (see section Build) or by taking a pre-compiled one, found in releases in the github project.
+
+It is recomended that you use the first option only for testing purposes or end-user applications. The second option is recomended for libraries, since it leaves more choice to the end-user.
## Examples
Examples on flow's usage are located in the flow-samples directory. The examples may be run by switching to the corresponding project in sbt: `project flow-samples-<sample_name>` and typing `run`. Be sure to connect a serial device before running an example.