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