Closed pnkfelix closed 2 years ago
Hey Felix,
Yes, you are right the documentation is out-of-date --- sorry about that. I will try to update it shortly! The easiest way to try Whiley right now is through whileylabs. To get the WDK setup, here are the minimal steps:
test
)src
(e.g. test/src
)test/wy.toml
with this:
[package]
name="test"
[build] platforms=["whiley"]
4. Create example file (e.g. `test/src/main.whiley`) such as:
```whiley
public method main():
assert false
wy build
should produce a file test/bin/test.wyil
At this point, we can now enable verification by adding the following to our wy.toml
file:
[build.whiley]
verify=true
And running wy build
again should produce an error indicating the assertion failed. A few caveats:
boogie
as a platform after whiley
in wy.toml
wy.toml
file. Unfortunately, I'm in the middle of changes which meant some binary incompatibility. So, I don't think dependencies will work for you. I obviously need to figure out a migration approach for this kind of thing.I should add, great that you're interested in trying out Whiley!! Do not hesitate to post questions here, or even email me directly. A few examples you might find interesting to look at:
Thanks @DavePearce !
Hey @pnkfelix,
Thought you might be interested in this:
cargo install whiley
Its very rough at this stage, but tested on Mac and Linux. To do anything useful you need a minimum project (as above). It requires java to be installed somewhere, as it is basically just a wrapper for the existing java codebase. However, my plan is to migrate the Whiley compiler from Java into Rust over the course of the next year.
Right, am closing this issue now as it no longer applies to the latest released version v0.6.1
which now uses cargo
as the primary deployment mechanism. See here.
The README for wdk 0.5.3 (and perhaps earlier) has a "Run" section that says the following:
When I tried to follow these instructions, I encountered a few problems.
First: The instructions say to go into an
examples/
directory. But, perhaps due to a typo, there is no such directory. There is anexample/
directory.Second: Once in the
example/
directory, runningwy compile hello-world.whiley
produces the following result:To be fair, the
example/
directory does not have any file namedhello-world.whiley
. There is a source fileexample/src/main.whiley
...Third: Even if one does attempt
wy compile src/main.whiley
from thatexample/
directory, you still get the same Internal failure.(Was the README written for a different source code repository or something?)