redstonex 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. redstonex-0.1.1/CMakeLists.txt +53 -0
  2. redstonex-0.1.1/LICENSE +674 -0
  3. redstonex-0.1.1/MANIFEST.in +4 -0
  4. redstonex-0.1.1/PKG-INFO +14 -0
  5. redstonex-0.1.1/README.md +1 -0
  6. redstonex-0.1.1/extern/RedStoneX/.git +1 -0
  7. redstonex-0.1.1/extern/RedStoneX/.gitignore +27 -0
  8. redstonex-0.1.1/extern/RedStoneX/LICENSE +676 -0
  9. redstonex-0.1.1/extern/RedStoneX/Makefile +76 -0
  10. redstonex-0.1.1/extern/RedStoneX/README.md +246 -0
  11. redstonex-0.1.1/extern/RedStoneX/docs/USAGE.md +135 -0
  12. redstonex-0.1.1/extern/RedStoneX/include/redstonex_components.h +114 -0
  13. redstonex-0.1.1/extern/RedStoneX/include/redstonex_obj.h +123 -0
  14. redstonex-0.1.1/extern/RedStoneX/include/redstonex_sim.h +99 -0
  15. redstonex-0.1.1/extern/RedStoneX/include/redstonex_types.h +37 -0
  16. redstonex-0.1.1/extern/RedStoneX/src/redstonex_common.h +21 -0
  17. redstonex-0.1.1/extern/RedStoneX/src/redstonex_components.c +432 -0
  18. redstonex-0.1.1/extern/RedStoneX/src/redstonex_obj.c +390 -0
  19. redstonex-0.1.1/extern/RedStoneX/src/redstonex_sim.c +454 -0
  20. redstonex-0.1.1/extern/RedStoneX/tests/comparator_test.c +229 -0
  21. redstonex-0.1.1/extern/RedStoneX/tests/high_churn_torch_oscillators_benchmark.c +114 -0
  22. redstonex-0.1.1/extern/RedStoneX/tests/high_fan_out_benchmark.c +100 -0
  23. redstonex-0.1.1/extern/RedStoneX/tests/long_chain_benchmark.c +128 -0
  24. redstonex-0.1.1/extern/RedStoneX/tests/torch_relay_test.c +137 -0
  25. redstonex-0.1.1/pyproject.toml +18 -0
  26. redstonex-0.1.1/setup.cfg +4 -0
  27. redstonex-0.1.1/setup.py +46 -0
  28. redstonex-0.1.1/src/redstonex/__init__.py +38 -0
  29. redstonex-0.1.1/src/redstonex/_core.pyi +260 -0
  30. redstonex-0.1.1/src/redstonex/csrc/core.cpp +471 -0
  31. redstonex-0.1.1/src/redstonex/include/plugin.h +63 -0
  32. redstonex-0.1.1/src/redstonex/include/redstonex_components.h +114 -0
  33. redstonex-0.1.1/src/redstonex/include/redstonex_obj.h +123 -0
  34. redstonex-0.1.1/src/redstonex/include/redstonex_sim.h +99 -0
  35. redstonex-0.1.1/src/redstonex/include/redstonex_types.h +37 -0
  36. redstonex-0.1.1/src/redstonex/objects.py +206 -0
  37. redstonex-0.1.1/src/redstonex/registry.py +59 -0
  38. redstonex-0.1.1/src/redstonex/simulator.py +61 -0
  39. redstonex-0.1.1/src/redstonex/types.py +24 -0
  40. redstonex-0.1.1/src/redstonex.egg-info/PKG-INFO +14 -0
  41. redstonex-0.1.1/src/redstonex.egg-info/SOURCES.txt +42 -0
  42. redstonex-0.1.1/src/redstonex.egg-info/dependency_links.txt +1 -0
  43. redstonex-0.1.1/src/redstonex.egg-info/top_level.txt +1 -0
  44. redstonex-0.1.1/tests/test.py +145 -0
@@ -0,0 +1,53 @@
1
+ # Copyright (C) 2026 Czy_4201b
2
+ #
3
+ # This program is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
15
+
16
+ cmake_minimum_required(VERSION 3.12)
17
+ project(PyRedStoneX)
18
+
19
+ set(PYBIND11_FINDPYTHON ON)
20
+ find_package(Python REQUIRED COMPONENTS Interpreter Development)
21
+ find_package(pybind11 REQUIRED)
22
+
23
+ if(NOT CMAKE_BUILD_TYPE)
24
+ set(CMAKE_BUILD_TYPE Release)
25
+ endif()
26
+
27
+ set(REDSTONEX_SRCS
28
+ extern/RedStoneX/src/redstonex_sim.c
29
+ extern/RedStoneX/src/redstonex_obj.c
30
+ extern/RedStoneX/src/redstonex_components.c
31
+ )
32
+
33
+ add_library(redstonex STATIC ${REDSTONEX_SRCS})
34
+ target_include_directories(redstonex PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/extern/RedStoneX/include)
35
+ set_target_properties(redstonex PROPERTIES POSITION_INDEPENDENT_CODE ON)
36
+
37
+ pybind11_add_module(_core src/redstonex/csrc/core.cpp)
38
+ pybind11_strip(_core)
39
+
40
+ target_include_directories(_core PRIVATE
41
+ ${CMAKE_CURRENT_SOURCE_DIR}/extern/RedStoneX/include
42
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/redstonex/include
43
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
44
+ )
45
+
46
+ target_link_libraries(_core PRIVATE redstonex)
47
+
48
+ if(NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
49
+ set_target_properties(_core PROPERTIES
50
+ LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/redstonex"
51
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/redstonex"
52
+ )
53
+ endif()