8/8/26 20:27
This commit is contained in:
@@ -1,17 +1,18 @@
|
|||||||
param(
|
param(
|
||||||
[ValidateSet("run","build","debug","test","clean")]
|
[ValidateSet("run","build","debug","test","clean", "golib")]
|
||||||
[string]$Command = "build"
|
[string]$Command = "build"
|
||||||
)
|
)
|
||||||
|
|
||||||
$src = "."
|
$src = "."
|
||||||
|
$outtest = "bin\test.exe"
|
||||||
$out = "bin\server.exe"
|
$out = "bin\server.exe"
|
||||||
|
|
||||||
switch ($Command) {
|
switch ($Command) {
|
||||||
"run" { odin run $src }
|
"run" { odin run $src -out:$outtest }
|
||||||
"build" { odin build $src -out:$out -o:speed }
|
"build" { odin build $src -out:$out -o:speed }
|
||||||
"debug" { odin build $src -out:$out -debug }
|
"debug" { odin build $src -out:$out -debug }
|
||||||
"test" { odin test .\tests\ -all-packages }
|
"test" { odin test .\tests\ -all-packages }
|
||||||
"clean" { Remove-Item -Recurse -Force bin -ErrorAction SilentlyContinue }
|
"clean" { Remove-Item -Recurse -Force bin -ErrorAction SilentlyContinue }
|
||||||
"golib" { go build -buildmode=c-shared -o libgoldmark.dll parser.go }
|
"golib" { go build -buildmode=c-shared -o parser/libgoldmark.dll parser/parser.go }
|
||||||
"libc" { lib /def:libgoldmark.def /out:libgoldmark.lib /machine:x64 }
|
"libc" { lib /def:libgoldmark.def /out:libgoldmark.lib /machine:x64 }
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
+1
-2
@@ -8,7 +8,7 @@ import "core:path/filepath"
|
|||||||
import "core:strings"
|
import "core:strings"
|
||||||
import http "submodules/odin-http"
|
import http "submodules/odin-http"
|
||||||
|
|
||||||
foreign import goldmark "libgoldmark.lib"
|
foreign import goldmark "parser/libgoldmark.lib"
|
||||||
|
|
||||||
foreign goldmark {
|
foreign goldmark {
|
||||||
MarkdownToHTML :: proc(source: cstring) -> cstring ---
|
MarkdownToHTML :: proc(source: cstring) -> cstring ---
|
||||||
@@ -26,7 +26,6 @@ state := State {
|
|||||||
}
|
}
|
||||||
|
|
||||||
main :: proc() {
|
main :: proc() {
|
||||||
|
|
||||||
markdown, err1 := os.read_entire_file_from_path("test.markdown", context.temp_allocator)
|
markdown, err1 := os.read_entire_file_from_path("test.markdown", context.temp_allocator)
|
||||||
|
|
||||||
src_c := strings.clone_to_cstring(string(markdown))
|
src_c := strings.clone_to_cstring(string(markdown))
|
||||||
|
|||||||
Reference in New Issue
Block a user