Skip to content

Commit

Permalink
+ moving to rust lang
Browse files Browse the repository at this point in the history
  • Loading branch information
illyrius666 committed Sep 4, 2024
1 parent 4f401ea commit 13efa09
Show file tree
Hide file tree
Showing 30 changed files with 109 additions and 2,657 deletions.
15 changes: 2 additions & 13 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"image": "python:3.12-bullseye",
"image": "mcr.microsoft.com/devcontainers/rust",
"remoteUser": "root",
"hostRequirements": {
"gpu": true
Expand All @@ -15,30 +15,19 @@
"customizations": {
"vscode": {
"extensions": [
"charliermarsh.ruff",
"esbenp.prettier-vscode",
"formulahendry.code-runner",
"github.copilot",
"github.vscode-github-actions",
"jock.svg",
"ms-vscode.cpptools",
"ms-vscode.live-server",
"ms-python.python",
"ms-python.vscode-pylance",
"pkief.material-icon-theme",
"qwtel.sqlite-viewer",
"seanwu.vscode-qt-for-python",
"tamasfe.even-better-toml",
"usernamehw.errorlens",
"visualstudioexptteam.vscodeintellicode",
"vsls-contrib.gistfs"
]
}
},
"onCreateCommand": {
"pipCommand": "pip install -r requirements.txt",
"aptCommand": "sudo apt-get update && sudo apt-get install -y gdb && sudo apt-get install -y libgl1-mesa-glx libxkbcommon0 libegl1-mesa libdbus-1-3 libxcb-cursor0 libxcb-xinerama0 libqt5x11extras5"
},
"postCreateCommand": "export QT_QPA_PLATFORM=xcb",
"onCreateCommand": { "installMaturin": "cargo install --locked maturin" },
"shutdownAction": "stopContainer"
}
84 changes: 58 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,50 +1,82 @@
# Rust
/target/
Cargo.lock

# Wiki
_build/
_modules/

# Database
*.sqlite3
*.db

# Byte-compiled / optimized / DLL files
__pycache__/
.pytest_cache/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
.venv/
env/
bin/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
include/
man/
venv/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
pip-selfcheck.json

# Wiki
_build/
_modules/
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# IFC
*.ifc
# Translations
*.mo

# Database
*.sqlite3
*.db
# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Rope
.ropeproject

# Django stuff:
*.log
*.pot

.DS_Store

# Sphinx documentation
docs/_build/

# PyCharm
.idea/

# VSCode
.vscode/

# libraries
arx/
brx/
tx/
# Pyenv
.python-version
51 changes: 0 additions & 51 deletions .ruff.toml

This file was deleted.

20 changes: 0 additions & 20 deletions .vscode/c_cpp_properties.json

This file was deleted.

14 changes: 0 additions & 14 deletions .vscode/launch.json

This file was deleted.

85 changes: 19 additions & 66 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,81 +1,34 @@
{
// General Settings
"extensions.ignoreRecommendations": true,
"workbench.colorTheme": "Monokai Dimmed",
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "none",
"svg.preview.background": "dark-transparent",
"scm.experimental.showHistoryGraph": true,

// Explorer Settings
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,

// Editor Settings
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.fixAll": "explicit"
},
"editor.defaultFormatter": "charliermarsh.ruff"
},
"[toml]": { "editor.defaultFormatter": "tamasfe.even-better-toml" },
"[c]": { "editor.defaultFormatter": "ms-vscode.cpptools" },
"[cpp]": { "editor.defaultFormatter": "ms-vscode.cpptools" },

// Code Runner Settings
"code-runner.executorMap": { "python": "$pythonPath -u $fullFileName" },
"code-runner.runInTerminal": true,

// Ruff Settings
"ruff.nativeServer": true,

// File Associations
"files.associations": { "ostream": "cpp" },

// Git and GitHub Settings
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"extensions.ignoreRecommendations": true,
"git.autofetch": true,
"git.enableSmartCommit": true,
"github.copilot.enable": { "*": true },

// JSON Schema Settings
"github.copilot.enable": {
"*": true
},
"json.schemas": [
{
"fileMatch": ["*.json", "*.jsonc"],
"url": "https://json.schemastore.org/package"
}
],

// Material Icon Theme Settings
"material-icon-theme.files.color": "#ef5350",
"material-icon-theme.folders.color": "#ef5350",
"material-icon-theme.folders.associations": {
"xcad": "src",
"arx": "lib",
"brx": "lib",
"tx": "lib"
"xcad": "src"
},

// Python Settings
"python.analysis.autoImportCompletions": true,
"python.analysis.autoSearchPaths": true,
"python.analysis.completeFunctionParens": true,
"python.analysis.diagnosticMode": "workspace",
"python.analysis.diagnosticSeverityOverrides": {
"reportWildcardImportFromLibrary": "none"
},
"python.analysis.ignore": ["*"],
"python.analysis.importFormat": "absolute",
"python.analysis.inlayHints.pytestParameters": true,
"python.analysis.typeCheckingMode": "strict",
"python.createEnvironment.trigger": "off",
"python.languageServer": "Pylance",
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": true,
"python.testing.unittestArgs": ["-v", "-s", "./", "-p", "test_*.py"],

// Terminal Settings
"terminal.integrated.enableMultiLinePasteWarning": "never"
"material-icon-theme.folders.color": "#ef5350",
"rust-analyzer.linkedProjects": ["Cargo.toml"],
"terminal.integrated.enableMultiLinePasteWarning": "never",
"workbench.colorTheme": "Monokai Dimmed",
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "none"
}
40 changes: 10 additions & 30 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,19 @@
"version": "2.0.0",
"tasks": [
{
"label": "C: Create Build Folder",
"label": "rust: maturin build",
"type": "shell",
"command": "mkdir -p ${workspaceFolder}/dardania/build",
"group": {
"kind": "build",
"isDefault": true
"command": "maturin",
"args": ["build"],
"options": {
"cwd": "${workspaceFolder}/dalmatium"
},
"group": "build",
"problemMatcher": [],
"presentation": {
"reveal": "always"
},
"problemMatcher": "$gcc"
},
{
"label": "C: Compile to Shared Library",
"type": "shell",
"command": "g++",
"args": [
"-shared",
"-fPIC",
"-g",
"${workspaceFolder}/dardania/acrxEntryPoint.cpp",
"-o",
"${workspaceFolder}/dardania/build/acrxEntryPoint.so"
],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always"
},
"problemMatcher": "$gcc",
"dependsOn": ["C: Create Build Folder"]
"reveal": "always",
"panel": "shared"
}
}
]
}
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[workspace]
members = ["xcad"]
resolver = "2"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Feel free to dive into the documentation to kickstart your journey with xCAD.

</details><p align="right"><a href="#readme-top">▲</a></p>

[built_with_shield_url]: https://skillicons.dev/icons?i=docker,py,cpp,c
[built_with_shield_url]: https://skillicons.dev/icons?i=docker,rust
[built_with_url]: https://skillicons.dev
[code_of_conduct_url]: https://github.com/XodiumSoftware/xCAD?tab=coc-ov-file
[contributing_url]: https://github.com/XodiumSoftware/xCAD/blob/main/CONTRIBUTING.md
Expand Down
Loading

0 comments on commit 13efa09

Please sign in to comment.