Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added web app demo #55

Merged
merged 20 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 60 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Build directories
build/
out/
dist/
cmake-build-*/

# IDE and editor files
.vscode/
.idea/
.vs/
*.swp
*.swo
*~
.DS_Store
.env
.env.local

# C++ specific
# Prerequisites
*.d

Expand Down Expand Up @@ -30,32 +48,58 @@
*.exe
*.out
*.app
nasal
nasal.exe

# VS C++ sln
# Visual Studio specific
*.sln
*.vcxproj
*.vcxproj.filters
*.vcxproj.user
.vs
x64
x64/
CMakePresents.json
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# nasal executable
nasal
nasal.exe
# CMake
CMakeCache.txt
CMakeFiles/
cmake_install.cmake
install_manifest.txt
CTestTestfile.cmake
_deps/

# misc
.vscode
dump
# Node.js specific (for the web app)
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log
package-lock.json

# Project specific
dump/
fgfs.log
.temp.*
*.ppm

# build dir
build
out
# Logs and databases
*.log
*.sqlite
*.sqlite3
*.db

# macOS special cache directory
# OS generated files
.DS_Store

# ppm picture generated by ppmgen.nas
*.ppm
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,15 @@ target_link_libraries(mat module-used-object)
add_library(nasock SHARED ${CMAKE_SOURCE_DIR}/module/nasocket.cpp)
target_include_directories(nasock PRIVATE ${CMAKE_SOURCE_DIR}/src)
target_link_libraries(nasock module-used-object)

# Add web library
add_library(nasal-web SHARED
src/nasal_web.cpp
${NASAL_OBJECT_SOURCE_FILE}
)
target_include_directories(nasal-web PRIVATE ${CMAKE_SOURCE_DIR}/src)
set_target_properties(nasal-web PROPERTIES
C_VISIBILITY_PRESET hidden
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON
)
16 changes: 16 additions & 0 deletions nasal-web-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "nasal-web-app",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.21.1",
"ffi-napi": "^4.0.3"
}
}
Loading
Loading