Commit e3a08e66 authored by Kenton Varda's avatar Kenton Varda

More docs.

parent a296ddd8
......@@ -41,6 +41,32 @@
<li><a href="otherlang.html">Other Languages</a></li>
</ul>
</section>
<script type="text/javascript">
// Highlight the current page in the sidebar, and make the sidebar items easy to click.
(function () {
var pathname = document.location.pathname;
var last = pathname.lastIndexOf('/');
var filename = pathname.substring(last);
if (filename == "/") {
filename = "/index.html";
}
var menu = document.getElementById("menu");
var items = menu.getElementsByTagName("li");
for (var i = 0; i < items.length; i++) {
var href = items[i].getElementsByTagName("a")[0].href;
if (href.lastIndexOf(filename) >= 0) {
items[i].className = "selected";
}
items[i].onclick = (function(url) {
return function() {
window.location.href = url;
}
})(href);
}
})();
</script>
<section id="main_content" class="inner">
{{ content }}
</section>
......
......@@ -68,7 +68,10 @@ Glad you asked!
**_Why do you pick on Protocol Buffers so much?_**
Because it's easy to pick on myself. :) I, Kenton Varda, was the primary author of Protocol Buffers version 2, which is the version that Google released open source. Cap'n Proto is the result of years of experience working on Protobufs, listening to user feedback, and thinking about how things could be done better.
Because it's easy to pick on myself. :) I, Kenton Varda, was the primary author of Protocol Buffers
version 2, which is the version that Google released open source. Cap'n Proto is the result of
years of experience working on Protobufs, listening to user feedback, and thinking about how
things could be done better.
I am no longer employed by Google. Cap'n Proto is not affiliated with Google or any other company.
......@@ -76,18 +79,10 @@ I am no longer employed by Google. Cap'n Proto is not affiliated with Google or
_As of this writing, the RPC system is not yet implemented._
Cap'n Proto defines a [capability-based](http://en.wikipedia.org/wiki/Capability-based_security) RPC protocol. In such a system, any message passed over the wire can itself contain references to callable objects. Passing such a reference over the wire implies granting the recipient permission to call the referenced object -- until a reference is sent, the recipient has no way of addressing it in order to form a request to it, or even knowing that it exists.
Cap'n Proto defines a [capability-based](http://en.wikipedia.org/wiki/Capability-based_security)
RPC protocol. In such a system, any message passed over the wire can itself contain references to
callable objects. Passing such a reference over the wire implies granting the recipient permission
to call the referenced object -- until a reference is sent, the recipient has no way of addressing
it in order to form a request to it, or even knowing that it exists.
Such a system makes it very easy to define stateful, secure object-oriented protocols.
# Cap'n Proto is EXPERIMENTAL
As of this writing, Cap'n Proto is in the very early stages of development. It is still missing many essential features:
* **Security:** There are almost certainly a few exploitable security bugs in the Cap'n Proto code. You should not use Cap'n Proto on untrusted data until a proper security review has been completed.
* **Stability:** The Cap'n Proto format is still changing. Any data written today probably won't be understood by future versions. Additionally, the programming interface is still evolving, so code written today probably won't work with future versions.
* **Performance:** While already beating the pants off other systems, Cap'n Proto has not yet undergone serious profiling and optimization.
* **RPC:** The RPC protocol has not yet been specified, much less implemented.
* **Support for languages other than C++:** Hasn't been started yet.
Would you like to contribute? Join the [discussion group](https://groups.google.com/group/capnproto) and let us know!
---
layout: page
---
# Installation
## Cap'n Proto IS NOT READY
As of this writing, Cap'n Proto is in the very early stages of development. It is still missing
many essential features:
* **Security:** There are almost certainly a few exploitable security bugs in the Cap'n Proto
code. You should not use Cap'n Proto on untrusted data until a proper security review has been
completed.
* **Stability:** The Cap'n Proto format is still changing. Any data written today probably won't
be understood by future versions. Additionally, the programming interface is still evolving, so
code written today probably won't work with future versions.
* **Performance:** While already beating the pants off other systems, Cap'n Proto has not yet
undergone serious profiling and optimization.
* **RPC:** The RPC protocol has not yet been specified, much less implemented.
* **Support for languages other than C++:** Hasn't been started yet.
Therefore, you should only be installing Cap'n Proto at this time if you just want to play around
with it or help develop it. If so, great! Please report your findings to the
[discussion group](https://groups.google.com/group/capnproto).
## Installing the C++ Runtime
### Recent Compiler Needed
If you are using GCC, you MUST use at least version 4.7 as Cap'n Proto uses recently-implemented
C++11 features. If you are using some other compiler... good luck.
### Building with Ekam
Ekam is a build system I wrote a while back that automatically figures out how to build your C++
code without instructions. It also supports continuous builds, where it watches the filesystem for
changes (via inotify) and immediately rebuilds as necessary. Instant feedback is key to
productivity, so I really like using Ekam.
Unfortunately it's very much unfinished. It works (for me), but it is very quirky. It only works
on Linux, and is best used together with Eclipse.
The Cap'n Proto repo includes a script which will attempt to set up Ekam for you.
git clone https://github.com/kentonv/capnproto.git
cd capnproto/c++
./setup-ekam.sh
If all goes well, this downloads the Ekam code into `.ekam` and adds some symlinks under src.
It also imports the [Google Test](https://googletest.googlecode.com) and
[Protobuf](http://protobuf.googlecode.com) source code, so you can compile tests and benchmarks.
Once Ekam is installed, you can do:
make -f Makefile.ekam continuous
If you use Eclipse, you should use the Ekam Eclipse plugin to get build results fed back into your
editor. Build the plugin like so:
1. Open the `.ekam/eclipse` directory as an Eclipse project.
2. File -> Export -> Plug-in Development -> Deployable Plug-ins and Fragments.
3. Choose the Ekam Dashboard project and export to your Eclipse directory, or export to another
directory and copy the files into your Eclipse directory.
4. Restart Eclipse.
5. Make sure you have some sort of project in your work space containing your Ekam source tree. It
should be rooted at the directory containing "src", "tmp", etc. The plugin will mark errors
within this project.
6. Window -> Show View -> Other -> Ekam -> Ekam Dashboard
The dashboard view lets you browse the whole tree and also populates your editor with error
markers.
### Building With Automake
If setting up Ekam is too much work for you, you can also build with Automake.
1. Make sure the [Google Test](https://googletest.googlecode.com/) headers are in your include
path and `libgtest.a` and `libgtest_main.a` are in your library path. Google Test has
apparently decided that `make install` is evil so you have to do this somewhat manually. :(
wget https://googletest.googlecode.com/files/gtest-1.6.0.zip
unzip gtest-1.6.0.zip
cd gtest-1.6.0
./configure
make
cp -r include/gtest $PREFIX/include/gtest
cp ./lib/.libs/*.a $PREFIX/lib
2. Clone and build the Cap'n Proto code.
git clone https://github.com/kentonv/capnproto.git
cd capnproto/c++
autoreconf -i
./configure
make check
console.log('This would be the main JS file.');
......@@ -80,7 +80,7 @@ h1 {
h2 {
padding-bottom: 10px;
font-size: 32px;
font-size: 28px;
background: url('../images/bg_hr.png') repeat-x bottom;
}
......@@ -200,17 +200,16 @@ blockquote {
}
ul, ol, dl {
margin-bottom: 15px
margin-bottom: 15px;
padding-left: 30px;
}
ul li {
list-style: inside;
padding-left: 20px;
list-style: outside;
}
ol li {
list-style: decimal inside;
padding-left: 20px;
list-style: decimal outside;
}
dl dt {
......@@ -434,6 +433,7 @@ Small Device Styles
/*******************************************************************************
Sidbar style borrowed from cldoc by jessevdk, because I thought it looked good.
I modified it a little bit to make the links more clickable.
*******************************************************************************/
div.maruku_toc {
......@@ -478,7 +478,11 @@ div.maruku_toc {
color: #fff;
}
#menu li:hover {
background-color: #2a2a2a;
cursor: pointer;
}
#menu a:hover {
#menu li:hover a {
color: #eee;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment