sandstorm-io / sandstorm-rawapi-example Goto Github PK
View Code? Open in Web Editor NEWExample Sandstorm app using only the raw Cap'n Proto API.
Example Sandstorm app using only the raw Cap'n Proto API.
Question:
sourcePath = "empty"
in sandstorm-pkgdef.capnp? See: https://github.com/sandstorm-io/sandstorm-rawapi-example/blob/master/sandstorm-pkgdef.capnp#L57Context:
When I was helping David Benson revise the draw.io package recently, we ran into an issue where this empty
directory did not exist.
Eventually, we noticed that in a vagrant-spk context, we should use a sourceMap
of:
sourceMap = (
# Here we defined where to look for files to copy into your package. The
# `spk dev` command actually figures out what files your app needs
# automatically by running it on a FUSE filesystem. So, the mappings
# here are only to tell it where to find files that the app wants.
searchPath = [
( sourcePath = "." ), # Search this directory first.
( sourcePath = "/", # Then search the system root directory.
hidePaths = [ "home", "proc", "sys",
"etc/passwd", "etc/hosts", "etc/host.conf",
"etc/nsswitch.conf", "etc/resolv.conf" ]
# You probably don't want the app pulling files from these places,
# so we hide them. Note that /dev, /var, and /tmp are implicitly
# hidden because Sandstorm itself provides them.
)
]
),
I don't remember if we used that full long value as the sourceMap
but anyway, after removing empty
we were able to run spk pack
. Interestingly this error only shows up at spk pack
time, I believe, so it resulted in a somewhat inscrutable C++ exception without any function names because Sandstorm binaries don't have debug info. I had to video-call David to figure out what was going on.
If the empty
hack isn't needed anymore, then I'd love to see it removed from this repo.
Related: perhaps "rawapi" should be a vagrant-spk
platform stack? Curious if you would find that interesting, @kentonv .
I cloned the repo and followed the instructions in the Readme. Running make dev
gives this error:
$ make dev
capnp compile --src-prefix=/opt/sandstorm/latest/usr/include -oc++:tmp /opt/sandstorm/latest/usr/include/sandstorm/*.capnp
/opt/sandstorm/latest/usr/include/sandstorm/grain.capnp:179:37-47: error: Not defined: Capability
/opt/sandstorm/latest/usr/include/sandstorm/grain.capnp:159:17-27: error: Not defined: Capability
/opt/sandstorm/latest/usr/include/sandstorm/grain.capnp:620:47-57: error: Not defined: Capability
/opt/sandstorm/latest/usr/include/sandstorm/supervisor.capnp:69:37-47: error: Not defined: Capability
/opt/sandstorm/latest/usr/include/sandstorm/supervisor.capnp:98:36-67: error: Too many generic parameters.
Makefile:18: recipe for target 'tmp/genfiles' failed
make: *** [tmp/genfiles] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.