ipbus 0.5.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 (63) hide show
  1. ipbus-0.5.1/CMakeLists.txt +46 -0
  2. ipbus-0.5.1/CONTRIBUTING.md +81 -0
  3. ipbus-0.5.1/Cargo.lock +732 -0
  4. ipbus-0.5.1/Cargo.toml +109 -0
  5. ipbus-0.5.1/LICENSE.txt +675 -0
  6. ipbus-0.5.1/PKG-INFO +39 -0
  7. ipbus-0.5.1/README.md +56 -0
  8. ipbus-0.5.1/benches/apollo.rs +160 -0
  9. ipbus-0.5.1/benches/dummy.rs +162 -0
  10. ipbus-0.5.1/benches/turbo.rs +282 -0
  11. ipbus-0.5.1/codebook.toml +53 -0
  12. ipbus-0.5.1/ffi/python/Cargo.toml +18 -0
  13. ipbus-0.5.1/ffi/python/README.md +24 -0
  14. ipbus-0.5.1/ffi/python/dist/ipbus-0.5.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl +0 -0
  15. ipbus-0.5.1/ffi/python/ipbus.pyi +30 -0
  16. ipbus-0.5.1/ffi/python/src/connection.rs +149 -0
  17. ipbus-0.5.1/ffi/python/src/lib.rs +19 -0
  18. ipbus-0.5.1/ffi/python/src/stream.rs +108 -0
  19. ipbus-0.5.1/ffi/python/test.py +10 -0
  20. ipbus-0.5.1/ffi/python/tests/connection.py +61 -0
  21. ipbus-0.5.1/pyproject.toml +33 -0
  22. ipbus-0.5.1/src/error.rs +110 -0
  23. ipbus-0.5.1/src/io/dma/abi.rs +654 -0
  24. ipbus-0.5.1/src/io/dma/map.rs +465 -0
  25. ipbus-0.5.1/src/io/dma/mod.rs +236 -0
  26. ipbus-0.5.1/src/io/dummy.rs +465 -0
  27. ipbus-0.5.1/src/io/mmap.rs +455 -0
  28. ipbus-0.5.1/src/io/mod.rs +281 -0
  29. ipbus-0.5.1/src/io/pcie.rs +374 -0
  30. ipbus-0.5.1/src/lib.rs +226 -0
  31. ipbus-0.5.1/src/node/builder.rs +392 -0
  32. ipbus-0.5.1/src/node/connection.rs +487 -0
  33. ipbus-0.5.1/src/node/mod.rs +268 -0
  34. ipbus-0.5.1/src/node/registers.rs +1113 -0
  35. ipbus-0.5.1/src/node/stream.rs +431 -0
  36. ipbus-0.5.1/src/protocol/headers.rs +399 -0
  37. ipbus-0.5.1/src/protocol/mod.rs +350 -0
  38. ipbus-0.5.1/src/protocol/recv.rs +821 -0
  39. ipbus-0.5.1/src/protocol/requests.rs +420 -0
  40. ipbus-0.5.1/src/protocol/send.rs +427 -0
  41. ipbus-0.5.1/src/thread/handler.rs +403 -0
  42. ipbus-0.5.1/src/thread/manager.rs +305 -0
  43. ipbus-0.5.1/src/thread/mod.rs +1063 -0
  44. ipbus-0.5.1/src/thread/requests.rs +505 -0
  45. ipbus-0.5.1/src/thread/shared.rs +527 -0
  46. ipbus-0.5.1/src/thread/stats.rs +148 -0
  47. ipbus-0.5.1/src/thread/traits.rs +91 -0
  48. ipbus-0.5.1/src/uri.rs +531 -0
  49. ipbus-0.5.1/src/wait.rs +356 -0
  50. ipbus-0.5.1/src/xml/error.rs +603 -0
  51. ipbus-0.5.1/src/xml/mod.rs +840 -0
  52. ipbus-0.5.1/tests/datasets/connection.xml +3 -0
  53. ipbus-0.5.1/tests/datasets/example.xml +21 -0
  54. ipbus-0.5.1/tests/datasets/module.xml +6 -0
  55. ipbus-0.5.1/tests/error-datasets/invalid_file_too_long.xml +2 -0
  56. ipbus-0.5.1/tests/error-datasets/invalid_number_parsing.xml +3 -0
  57. ipbus-0.5.1/tests/error-datasets/invalid_parse_error.xml +3 -0
  58. ipbus-0.5.1/tests/error-datasets/invalid_path.xml +4 -0
  59. ipbus-0.5.1/tests/error-datasets/invalid_xml_prefix_uri.xml +3 -0
  60. ipbus-0.5.1/tests/error-datasets/shared-connection.xml +6 -0
  61. ipbus-0.5.1/tests/error_tests.rs +35 -0
  62. ipbus-0.5.1/tests/node_decoding.rs +190 -0
  63. ipbus-0.5.1/tests/protocol_handling.rs +523 -0
@@ -0,0 +1,46 @@
1
+ cmake_minimum_required(VERSION 3.23)
2
+ set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
3
+ set(PROJECT_VERSION 0.5.1)
4
+ add_compile_definitions(PROJECT_ROOT_PATH="${PROJECT_ROOT}/")
5
+
6
+ # Stop the warning for gtest and corrosion in newer cmake versions
7
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
8
+ cmake_policy(SET CMP0135 NEW)
9
+ endif()
10
+
11
+ project(
12
+ ipbus
13
+ VERSION ${PROJECT_VERSION}
14
+ )
15
+
16
+ # Corrosin
17
+ include(FetchContent)
18
+ FetchContent_Declare(
19
+ Corrosion
20
+ GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
21
+ GIT_TAG 1499b14e4906a2890f5cee1547c8848db261753d
22
+ )
23
+ FetchContent_MakeAvailable(Corrosion)
24
+
25
+ # Google Test
26
+ find_package(GTest)
27
+ if (GTest_FOUND)
28
+ message("Using system GTest")
29
+ else()
30
+ message("Fetching GTest")
31
+ include(FetchContent)
32
+ FetchContent_Declare(
33
+ googletest
34
+ URL https://github.com/google/googletest/archive/063de7e9578f82b369302001269680b4b1553359.zip
35
+ )
36
+ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
37
+ FetchContent_MakeAvailable(googletest)
38
+ endif (GTest_FOUND)
39
+
40
+ include(GNUInstallDirs)
41
+ include(GenerateExportHeader)
42
+ include(CMakePackageConfigHelpers)
43
+
44
+ # Add bindings folder
45
+ add_subdirectory(ffi/c)
46
+ add_subdirectory(ffi/cpp)
@@ -0,0 +1,81 @@
1
+ # Contributing
2
+ Hello! Thank you for showing interest in my Rust software! Right now, this
3
+ project is entirely maintained by me (`corigan01`), and it would be really
4
+ nice if others could help it improve too.
5
+
6
+ Please take a look at the open issues for potential things to work on, or send me
7
+ a message on Mattermost (handle is `gkellam`). I will try to answer any questions
8
+ you might have as quickly as possible!
9
+
10
+
11
+ ## Getting Started
12
+
13
+ If you have never used this library before, I would checkout the docs found in
14
+ the README before getting started. These docs should point to you 'IpbusStream'
15
+ which contains a _mini-tutorial_ on how one might use this library.
16
+
17
+ If you already know the main structure, let's go through some basics on how those
18
+ ideas could be turned into a merged PR:
19
+
20
+ 1. Use `cargo clippy` to fix any lints that it might appear. These are here to
21
+ help you and others have a more standard and coherent Rust program. Clippy also
22
+ detects many anti-patterns that could contribute to slow or otherwise unsafe
23
+ behavior. **CI will fail** without all clippy lints passing _before_ anything
24
+ else.
25
+
26
+ 2. Make sure you run `cargo fmt` before committing your code. This ensures
27
+ everything meets the default rust style guide, and looks consistent across all
28
+ components. This is a **requirement** for CI to pass.
29
+
30
+ 3. Run `cargo test --workspace` to verify all tests are passing before making
31
+ your PR 'ready'. Please use "WIP: [YOUR PR NAME HERE]" when making a new feature
32
+ that is still in-progress.
33
+
34
+ 4. Ensure all CI jobs successfully pass and correct any errors.
35
+
36
+ Congratulations! You have just fixed a bug or added a new feature that
37
+ is almost ready to merge. Please move on to the next section describing PR
38
+ structure.
39
+
40
+
41
+ ## Pull Requests
42
+
43
+ All features or pending work should be tracked in a PR. If the work is ongoing
44
+ (ie not ready to merge), please mark the pull request as "WIP: ". Forgejo will
45
+ automatically suggest you do this in case you happen to forget.
46
+
47
+ Please try to keep your commits small and _atomic_. This helps when we go
48
+ to merge that git is able to resolve most of the issues itself. If a commit
49
+ contains too many sweeping changes across all files, it is very likely to need
50
+ manual merging.
51
+
52
+ I prefer to use `pull.rebase false` (_merge commit_) style merges when
53
+ integrating PRs into main. Please try not to use _rebase_ within this project.
54
+
55
+ Ideally, the `main` branch should always _work_ (passes all tests and jobs).
56
+ This does not mean that the main branch is a release, but instead more of a
57
+ `beta`/`nightly` that _should_ work but might not yet be _stable_.
58
+
59
+
60
+ ## License
61
+
62
+ This crate is licensed under the **GNU General Public License v3**. This means
63
+ all dependencies must be compatible with that license. Please checkout the
64
+ free software foundation's website for more information on what it means to be
65
+ _compatible_ with GPL-v3.
66
+
67
+ This also means that any and all contributions made to this crate by you is
68
+ also subject to the same _GNU General Public License v3_. It is the author's
69
+ responsibility to uphold their code is their own original work.
70
+
71
+ _AI/LLM generated code cannot be licensed and therefore cannot be used to
72
+ contribute to this project in any way, please see the next section for more
73
+ details._
74
+
75
+
76
+ ## AI/LLM Policy
77
+
78
+ **Human Only**: Usage of AI/LLMs are not permitted to make contributions to this
79
+ crate, either by generating code/documentation/tests or otherwise. You are also
80
+ not permitted to ingest any part of this project into an AI/LLM. Please ask me
81
+ instead for your questions or ideas (I am always happy to help!).