Comments (4)
This is the same as option 2 in #182. I think that issue is a better overview into this problem (even if it came later) -- maybe close this one as duplicate?
from capnproto-rust.
Interesting suggestion! I guess we could basically follow the pattern of libgit2-sys and add a submodule pointing to the capnp compiler source code. I think it would make sense to bundle this as part of the capnpc crate rather than create an entirely new crate. Note that the -sys
suffix usually implies linking to native libraries and using the foreign function interface --- which capnpc does not do. Rather, it is a "schema compiler plugin", and invokes the upstream capnp
as an executable, not a library.
Note also that building the capnp
executable requires a recent-ish c++ compiler plus autotools or cmake. So it's not like we'd be completely eliminating the dependencies on non-Rust things.
from capnproto-rust.
I guess we could basically follow the pattern of libgit2-sys and add a submodule pointing to the capnp compiler source code. I think it would make sense to bundle this as part of the capnpc crate rather than create an entirely new crate.
I think that's a good idea. The crates that @alexcrichton works on also tend to use pkg-config
and a few other heuristics to see if a library is installed. This could be used to see if capnp is installed.
Note that the -sys suffix usually implies linking to native libraries and using the foreign function interface --- which capnpc does not do. Rather, it is a "schema compiler plugin", and invokes the upstream capnp as an executable, not a library.
I hadn't realized that when I made the ticket. I'm not sure how that is/should be handled.
Note also that building the capnp executable requires a recent-ish c++ compiler plus autotools or cmake. So it's not like we'd be completely eliminating the dependencies on non-Rust things.
Maybe just sticking the dependencies and required versions in the README.md will be 70-80% of the solution.
from capnproto-rust.
Closing as a duplicate of #182.
from capnproto-rust.
Related Issues (20)
- Primitive list panicks if the list type is `Void` HOT 1
- Null values for non active union members HOT 3
- Switch Allocator to act more like an owned arena HOT 8
- Reader fails with out of bounds pointer error when reading from compressed stream HOT 1
- Revert text setter ergonomics pessification; add raw_set methods HOT 6
- calculator example fails with java server: Cannot read capability pointer without capTable HOT 2
- c++.capnp compiles to unusable module name HOT 6
- How to send generated readers across threads HOT 3
- From bytes to TypedReader HOT 6
- Allowing construction of NoAllocSliceSegments with buffer and NoAllocBufferSegmentType HOT 7
- Kudos to builders of this Rust library - Every single one of you. HOT 3
- [Question]How to extract generic type values HOT 5
- capnp_rpc does not work on monoio HOT 4
- Dynamic parsing of fields may panic HOT 1
- traits.ListIter incorrectly implementing ExactSizeIterator HOT 1
- oc
- Using same schema file for both Rust and C++ HOT 1
- doc: read_message_from_flat_slice_no_alloc docstring bad autocomplete HOT 1
- Making rust capn proto fully async HOT 2
- Is there any reason why Rc<RefCell> is used compared to Arc<Mutex>?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capnproto-rust.