-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vlang is a vlang -> c transpiler, with a wonderful toolchain around transpilation and compilation. There is a demonstration of translating DOOM (yes... that DOOM) from C to V and building it (in under a second!?). It can also transpile V to javascript, or WASM. For a 5-year old language, this is impressive. 33 to go.
- Loading branch information
Showing
5 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# syntax=docker/dockerfile:1 | ||
# escape=\ | ||
FROM 100hellos/050-c:local | ||
|
||
RUN sudo \ | ||
apk add --no-cache \ | ||
build-base | ||
|
||
RUN sudo \ | ||
apk add vlang --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing | ||
|
||
COPY --chown=human:human ./files /hello-world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../Makefile.language-container.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
# This uses the vlang REPL to build the program | ||
chmod +x hello-world.v | ||
|
||
# This transpiles the vlang program to C and also compiles it | ||
# This is the slickest transpilation + compilation combo I've seen so far | ||
./hello-world.v | ||
./hello-world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env v | ||
|
||
fn main() { | ||
println('Hello World!') | ||
} |