Skip to content

Commit 17e0f16

Browse files
authored
Rename luau binaries and build targets to SLua (#38)
Signed-off-by: WolfGangS <flamin2k8@gmail.com>
1 parent d6659a2 commit 17e0f16

7 files changed

Lines changed: 49 additions & 44 deletions

File tree

.github/workflows/build.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,26 +60,26 @@ jobs:
6060
sudo apt-get install g++-multilib
6161
- name: make tests
6262
run: |
63-
LDFLAGS=-m${{matrix.addrsize}} CXXFLAGS="-m${{matrix.addrsize}} ${{matrix.cflags}}" CFLAGS="-m${{matrix.addrsize}} ${{matrix.cflags}}" make -j4 config=sanitize ${{ matrix.addrsize == '64' && 'native=1' || ''}} luau-tests
63+
LDFLAGS=-m${{matrix.addrsize}} CXXFLAGS="-m${{matrix.addrsize}} ${{matrix.cflags}}" CFLAGS="-m${{matrix.addrsize}} ${{matrix.cflags}}" make -j4 config=sanitize ${{ matrix.addrsize == '64' && 'native=1' || ''}} slua-tests
6464
- name: run tests
6565
run: |
66-
./luau-tests
67-
./luau-tests --fflags=true
66+
./slua-tests
67+
./slua-tests --fflags=true
6868
- name: run extra conformance tests
6969
if: matrix.os.name != 'ubuntu-32bit'
7070
run: |
71-
./luau-tests -ts=Conformance -O2
72-
./luau-tests -ts=Conformance -O2 --fflags=true
73-
./luau-tests -ts=Conformance --codegen
74-
./luau-tests -ts=Conformance --codegen --fflags=true
75-
./luau-tests -ts=Conformance --codegen -O2
76-
./luau-tests -ts=Conformance --codegen -O2 --fflags=true
71+
./slua-tests -ts=Conformance -O2
72+
./slua-tests -ts=Conformance -O2 --fflags=true
73+
./slua-tests -ts=Conformance --codegen
74+
./slua-tests -ts=Conformance --codegen --fflags=true
75+
./slua-tests -ts=Conformance --codegen -O2
76+
./slua-tests -ts=Conformance --codegen -O2 --fflags=true
7777
- name: make cli
7878
run: |
79-
LDFLAGS=-m${{matrix.addrsize}} CXXFLAGS="-m${{matrix.addrsize}} ${{matrix.cflags}} -DHARDSTACKTESTS=1" CFLAGS="-m${{matrix.addrsize}} ${{matrix.cflags}}" make -j4 config=sanitize ${{ matrix.addrsize == '64' && 'native=1' || ''}} werror=1 luau luau-analyze luau-compile # match config with tests to improve build time
80-
./luau tests/conformance/assert.luau
81-
./luau-analyze tests/conformance/assert.luau
82-
./luau-compile tests/conformance/assert.luau
79+
LDFLAGS=-m${{matrix.addrsize}} CXXFLAGS="-m${{matrix.addrsize}} ${{matrix.cflags}} -DHARDSTACKTESTS=1" CFLAGS="-m${{matrix.addrsize}} ${{matrix.cflags}}" make -j4 config=sanitize ${{ matrix.addrsize == '64' && 'native=1' || ''}} werror=1 slua slua-analyze slua-compile # match config with tests to improve build time
80+
./slua tests/conformance/assert.luau
81+
./slua-analyze tests/conformance/assert.luau
82+
./slua-compile tests/conformance/assert.luau
8383
8484
windows:
8585
runs-on: windows-2022
@@ -122,9 +122,9 @@ jobs:
122122
shell: bash # necessary for fail-fast
123123
run: |
124124
cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI Luau.Compile.CLI --config RelWithDebInfo # match config with tests to improve build time
125-
RelWithDebInfo/luau tests/conformance/assert.luau
126-
RelWithDebInfo/luau-analyze tests/conformance/assert.luau
127-
RelWithDebInfo/luau-compile tests/conformance/assert.luau
125+
RelWithDebInfo/slua tests/conformance/assert.luau
126+
RelWithDebInfo/slua-analyze tests/conformance/assert.luau
127+
RelWithDebInfo/slua-compile tests/conformance/assert.luau
128128
129129
coverage:
130130
runs-on: ubuntu-22.04

.github/workflows/build_release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ jobs:
2222
run: cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI Luau.Compile.CLI Luau.Ast.CLI --config Release -j 2
2323
- name: pack
2424
if: matrix.os.name != 'windows'
25-
run: zip luau-${{github.event.release.tag_name}}-${{matrix.os.name}}.zip luau*
25+
run: zip slua-${{github.event.release.tag_name}}-${{matrix.os.name}}.zip slua*
2626
- name: pack
2727
if: matrix.os.name == 'windows'
28-
run: 7z a luau-${{github.event.release.tag_name}}-${{matrix.os.name}}.zip .\Release\luau*.exe
28+
run: 7z a slua-${{github.event.release.tag_name}}-${{matrix.os.name}}.zip .\Release\slua*.exe
2929
- uses: actions/upload-release-asset@v1
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232
with:
3333
upload_url: ${{ github.event.release.upload_url }}
34-
asset_path: luau-${{github.event.release.tag_name}}-${{matrix.os.name}}.zip
35-
asset_name: luau-${{github.event.release.tag_name}}-${{matrix.os.name}}.zip
34+
asset_path: slua-${{github.event.release.tag_name}}-${{matrix.os.name}}.zip
35+
asset_name: slua-${{github.event.release.tag_name}}-${{matrix.os.name}}.zip
3636
asset_content_type: application/octet-stream
3737

3838
package:
@@ -131,5 +131,5 @@ jobs:
131131
with:
132132
upload_url: ${{ github.event.release.upload_url }}
133133
asset_path: Luau.Web.js
134-
asset_name: Luau.Web.js
134+
asset_name: SLua.Web.js
135135
asset_content_type: application/octet-stream

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
/luau-analyze
1616
/luau-bytecode
1717
/luau-compile
18+
/slua
19+
/slua-tests
20+
/slua-analyze
21+
/slua-bytecode
22+
/slua-compile
1823
__pycache__
1924
/stage
2025
.cache

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ if(LUAU_BUILD_CLI)
6464
add_executable(Luau.Bytecode.CLI)
6565

6666
# This also adds target `name` on Linux/macOS and `name.exe` on Windows
67-
set_target_properties(Luau.Repl.CLI PROPERTIES OUTPUT_NAME luau)
68-
set_target_properties(Luau.Analyze.CLI PROPERTIES OUTPUT_NAME luau-analyze)
69-
set_target_properties(Luau.Ast.CLI PROPERTIES OUTPUT_NAME luau-ast)
70-
set_target_properties(Luau.Reduce.CLI PROPERTIES OUTPUT_NAME luau-reduce)
71-
set_target_properties(Luau.Compile.CLI PROPERTIES OUTPUT_NAME luau-compile)
72-
set_target_properties(Luau.Bytecode.CLI PROPERTIES OUTPUT_NAME luau-bytecode)
67+
set_target_properties(Luau.Repl.CLI PROPERTIES OUTPUT_NAME slua)
68+
set_target_properties(Luau.Analyze.CLI PROPERTIES OUTPUT_NAME slua-analyze)
69+
set_target_properties(Luau.Ast.CLI PROPERTIES OUTPUT_NAME slua-ast)
70+
set_target_properties(Luau.Reduce.CLI PROPERTIES OUTPUT_NAME slua-reduce)
71+
set_target_properties(Luau.Compile.CLI PROPERTIES OUTPUT_NAME slua-compile)
72+
set_target_properties(Luau.Bytecode.CLI PROPERTIES OUTPUT_NAME slua-bytecode)
7373
endif()
7474

7575
if(LUAU_BUILD_TESTS)

Makefile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,23 @@ ISOCLINE_TARGET=$(BUILD)/libisocline.a
5454

5555
TESTS_SOURCES=$(wildcard tests/*.cpp) CLI/src/FileUtils.cpp CLI/src/Flags.cpp CLI/src/Profiler.cpp CLI/src/Coverage.cpp CLI/src/Repl.cpp CLI/src/ReplRequirer.cpp CLI/src/VfsNavigator.cpp CLI/src/LSLBuiltins.cpp
5656
TESTS_OBJECTS=$(TESTS_SOURCES:%=$(BUILD)/%.o)
57-
TESTS_TARGET=$(BUILD)/luau-tests
57+
TESTS_TARGET=$(BUILD)/slua-tests
5858

5959
REPL_CLI_SOURCES=CLI/src/FileUtils.cpp CLI/src/Flags.cpp CLI/src/Profiler.cpp CLI/src/Coverage.cpp CLI/src/Repl.cpp CLI/src/ReplEntry.cpp CLI/src/ReplRequirer.cpp CLI/src/VfsNavigator.cpp CLI/src/LSLBuiltins.cpp
6060
REPL_CLI_OBJECTS=$(REPL_CLI_SOURCES:%=$(BUILD)/%.o)
61-
REPL_CLI_TARGET=$(BUILD)/luau
61+
REPL_CLI_TARGET=$(BUILD)/slua
6262

6363
ANALYZE_CLI_SOURCES=CLI/src/FileUtils.cpp CLI/src/Flags.cpp CLI/src/Analyze.cpp CLI/src/AnalyzeRequirer.cpp CLI/src/VfsNavigator.cpp
6464
ANALYZE_CLI_OBJECTS=$(ANALYZE_CLI_SOURCES:%=$(BUILD)/%.o)
65-
ANALYZE_CLI_TARGET=$(BUILD)/luau-analyze
65+
ANALYZE_CLI_TARGET=$(BUILD)/slua-analyze
6666

6767
COMPILE_CLI_SOURCES=CLI/src/FileUtils.cpp CLI/src/Flags.cpp CLI/src/Compile.cpp CLI/src/LSLBuiltins.cpp
6868
COMPILE_CLI_OBJECTS=$(COMPILE_CLI_SOURCES:%=$(BUILD)/%.o)
69-
COMPILE_CLI_TARGET=$(BUILD)/luau-compile
69+
COMPILE_CLI_TARGET=$(BUILD)/slua-compile
7070

7171
BYTECODE_CLI_SOURCES=CLI/src/FileUtils.cpp CLI/src/Flags.cpp CLI/src/Bytecode.cpp
7272
BYTECODE_CLI_OBJECTS=$(BYTECODE_CLI_SOURCES:%=$(BUILD)/%.o)
73-
BYTECODE_CLI_TARGET=$(BUILD)/luau-bytecode
73+
BYTECODE_CLI_TARGET=$(BUILD)/slua-bytecode
7474

7575
FUZZ_SOURCES=$(wildcard fuzz/*.cpp) fuzz/luau.pb.cpp
7676
FUZZ_OBJECTS=$(FUZZ_SOURCES:%=$(BUILD)/%.o)
@@ -84,7 +84,7 @@ ifneq ($(opt),)
8484
endif
8585

8686
OBJECTS=$(COMMON_OBJECTS) $(AST_OBJECTS) $(COMPILER_OBJECTS) $(CONFIG_OBJECTS) $(ANALYSIS_OBJECTS) $(EQSAT_OBJECTS) $(CODEGEN_OBJECTS) $(VM_OBJECTS) $(CJSON_OBJECTS) $(APR_OBJECTS) $(REQUIRE_OBJECTS) $(ISOCLINE_OBJECTS) $(TESTS_OBJECTS) $(REPL_CLI_OBJECTS) $(ANALYZE_CLI_OBJECTS) $(COMPILE_CLI_OBJECTS) $(BYTECODE_CLI_OBJECTS) $(FUZZ_OBJECTS)
87-
EXECUTABLE_ALIASES = luau luau-analyze luau-compile luau-bytecode luau-tests
87+
EXECUTABLE_ALIASES = slua slua-analyze slua-compile slua-bytecode slua-tests
8888

8989
# common flags
9090
# We have to do tailslide builds for `make`-based builds, conditionally including the LSL compiler is annoying in `make`.
@@ -212,9 +212,9 @@ coverage: $(TESTS_TARGET) $(COMPILE_CLI_TARGET)
212212
mv default.profraw codegen-x64.profraw
213213
llvm-profdata merge *.profraw -o default.profdata
214214
rm *.profraw
215-
llvm-cov show -format=html -show-instantiations=false -show-line-counts=true -show-region-summary=false -ignore-filename-regex=\(tests\|extern\|CLI\)/.* -output-dir=coverage --instr-profile default.profdata -object build/coverage/luau-tests -object build/coverage/luau-compile
216-
llvm-cov report -ignore-filename-regex=\(tests\|extern\|CLI\|stage\)/.* -show-region-summary=false --instr-profile default.profdata -object build/coverage/luau-tests -object build/coverage/luau-compile
217-
llvm-cov export -ignore-filename-regex=\(tests\|extern\|CLI\|stage\)/.* -format lcov --instr-profile default.profdata -object build/coverage/luau-tests -object build/coverage/luau-compile >coverage.info
215+
llvm-cov show -format=html -show-instantiations=false -show-line-counts=true -show-region-summary=false -ignore-filename-regex=\(tests\|extern\|CLI\)/.* -output-dir=coverage --instr-profile default.profdata -object build/coverage/slua-tests -object build/coverage/slua-compile
216+
llvm-cov report -ignore-filename-regex=\(tests\|extern\|CLI\|stage\)/.* -show-region-summary=false --instr-profile default.profdata -object build/coverage/slua-tests -object build/coverage/slua-compile
217+
llvm-cov export -ignore-filename-regex=\(tests\|extern\|CLI\|stage\)/.* -format lcov --instr-profile default.profdata -object build/coverage/slua-tests -object build/coverage/slua-compile >coverage.info
218218

219219
format:
220220
git ls-files '*.h' '*.cpp' | xargs clang-format-11 -i
@@ -228,19 +228,19 @@ check-source:
228228
git ls-files '*.h' ':!:extern' | xargs -I+ sh -c 'grep -L "#pragma once" +'
229229

230230
# executable target aliases
231-
luau: $(REPL_CLI_TARGET)
231+
slua: $(REPL_CLI_TARGET)
232232
ln -fs $^ $@
233233

234-
luau-analyze: $(ANALYZE_CLI_TARGET)
234+
slua-analyze: $(ANALYZE_CLI_TARGET)
235235
ln -fs $^ $@
236236

237-
luau-compile: $(COMPILE_CLI_TARGET)
237+
slua-compile: $(COMPILE_CLI_TARGET)
238238
ln -fs $^ $@
239239

240-
luau-bytecode: $(BYTECODE_CLI_TARGET)
240+
slua-bytecode: $(BYTECODE_CLI_TARGET)
241241
ln -fs $^ $@
242242

243-
luau-tests: $(TESTS_TARGET)
243+
slua-tests: $(TESTS_TARGET)
244244
ln -fs $^ $@
245245

246246
# executable targets

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ cmake --build . --target Luau.Analyze.CLI --config RelWithDebInfo
5252
Alternatively, on Linux and macOS, you can also use `make`:
5353

5454
```sh
55-
make config=release luau luau-analyze
55+
make config=release slua slua-analyze
5656
```
5757

5858
To integrate SLua into your CMake application projects as a library, at the minimum, you'll need to depend on `Luau.Compiler` and `Luau.VM` projects. From there you need to create a new Luau state (using Lua 5.x API such as `lua_newstate`), compile source to bytecode and load it into the VM like this:

build-cmd.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pushd "$top"
8080
cp -v "Release/Luau.VM.lib" "$stage/lib/release/"
8181
cp -v "Release/Luau.Common.lib" "$stage/lib/release/"
8282

83-
cp -v Release/luau.exe "$stage/bin/"
83+
cp -v Release/slua.exe "$stage/bin/"
8484
;;
8585
darwin*|linux*)
8686
# Continue compiling with asserts for now
@@ -101,7 +101,7 @@ pushd "$top"
101101
cp -v "libLuau.Config.a" "$stage/lib/release"
102102
cp -v "libLuau.VM.a" "$stage/lib/release"
103103

104-
cp -v "luau" "$stage/bin/"
104+
cp -v "slua" "$stage/bin/"
105105

106106
# Run the conformance test for good measure
107107
"${stage}/build/Luau.Conformance"

0 commit comments

Comments
 (0)