Closed syrusakbary closed 2 years ago
Ok, let me explain a little to make sense of what's going on.
bin/
and /bin/dev
are wrappers around the v3c
compile command that add command-line options and the requisite runtime files (from rt/<target>/
) for a given target. aeneas bootstrap
on a fresh checkout. I suspect the above validation error is because of that.The first one is a combination of (1) and a documentation failure on my part. Because of (1), running v3c-wasi
adds the runtime files associated with the wasi
target to the compiler. But the -run
option instructs the compiler to run the program in the built-in interpreter. There's a conflict for which of them defines the System
component--and the wasi
target code wins...which tries to call something even lower-level (probably a wasm import), which doesn't exist. Thus the crash. So you want either v3c -run HelloWorld.v3
or v3c-wasi HelloWorld.v3
, but not the combination.
I just tried HelloWorld
with v3c-wasi
running on wasm3
, wizard
, and node
, and it seems to work.
I'm currently working on a test suite in test/wasi
and fixing things as I go.
Oh, I might be missing something.
Sorry if this question is too obvious. I haven't been able to properly run it.
I have an Aeneas.jar
jar file in /bin/Aeneas.jar
. But locally I have no aeneas
binary. Is it the same as ./bin/stable/jar/Aeneas
? If not, do you know how I can set it up? (I tried running ./bin/stable/jar/Aeneas boostrap
but it seems nothing happened locally)
Note: I'm working in a macOS M1 (so I think the bootstrap will only work through the JVM initially).
No worries. There is a script bin/dev/aeneas
. I normally just put both virgil/bin
and virgil/bin/dev
in my path. All of the executables in these directories figure out their own location and the location of the repository automatically, so you can just run aeneas
, v3c
, v3c-<target>
, etc, and they will find each other and the runtime code without the need for further setup.
Just run aeneas bootstrap
and it will generate a new compiler in bin/current
and link it from bin/
.
And if you are wondering, typically alongside every mydir/Foo.jar
generated there is a little script mydir/Foo
that just invokes java
with the right arguments to run the .jar
.
Awesome. I was able to get a basic program compiling. Closing the issue. Thanks!
Hi,
I'm starting to trial Virgil a little bit more, and I was unable to get an application compiling to WASI.
Here's what I'm doing (in latest
master
)I also tried to compile and then run it with Wasmer, but it seems that the Wasm file is not valid:
Did I miss some steps here? What can I do to help fix the issue?