Skip to content

Removing dependencies, simplify CMakeLists, and fix Rust build#16

Open
cernec1999 wants to merge 21 commits intomainfrom
feature/remove-deps
Open

Removing dependencies, simplify CMakeLists, and fix Rust build#16
cernec1999 wants to merge 21 commits intomainfrom
feature/remove-deps

Conversation

@cernec1999
Copy link
Copy Markdown
Collaborator

Summary of Changes

This PR makes several improvements and adjustments to streamline the build process, reduce dependencies, and resolve compatibility issues. Below are the details:

1. Replaced fmtlib Dependency with Custom printf_format_string

  • Switched from fmtlib to a custom printf_format_string implementation that uses traditional C-style format specifiers.
  • Rationale: While std::format would be the ideal solution, it is not yet supported by many compilers. This custom implementation simplifies the dependency chain while maintaining functionality.

2. Removed winflexbison Dependency

  • The dependency was causing issues with Rust and its build process.
  • Instead of relying on winflexbison, find_package is now used to locate flex and bison. Users are expected to install these packages as they already do on macOS or Linux.
  • Added the --wincompat flag for flex to ensure compatibility with Windows, allowing the build to succeed without relying on unistd.h.

3. Removed emscripten and Associated JS Interface Files

  • Since JS builds are not required at this time, the dependency on emscripten has been removed.
  • Additionally, the associated js_interface file used for JavaScript interactions has been deleted, as it is no longer relevant.

4. Refactored Output Directory Settings in CMakeLists.txt

  • Removed output directory variables (CMAKE_ARCHIVE_OUTPUT_DIRECTORY, CMAKE_LIBRARY_OUTPUT_DIRECTORY, etc.) from the CMakeLists.txt file.
  • These are now specified in the Jenkins pipeline cmake command.
  • Rationale: This change provides greater flexibility for toolchains to specify output directories, making the library more adaptable for inclusion in other projects.
  • Addressed a Rust-specific issue where files placed in the lib/ directory conflicted with Rust's expected build structure, causing cargo publish to fail. Rust enforces that files remain in the specified build directories unless manually overridden.

5. Removed GitHub Action for NPM Releases

  • Since JavaScript builds are no longer supported, the GitHub Action for publishing releases to NPM has been removed.

6. Resolved Node Architecture Issue in CI/CD

  • Explicitly specified node("amd64") in Jenkins to ensure builds are executed on an amd64 runner.
  • This resolves compatibility issues encountered during the build process.

@cernec1999
Copy link
Copy Markdown
Collaborator Author

Actually, I was misinformed about find_package. The building instructions above depend that the user has winflexbison installed in a package manager like Chocolatey. I'm happy to re-introduce the winflexbison dependency if needed, but perhaps it's better to put the onus to install the package on the developer? I can document it better in the README docs.

Install instructions:
choco install winflexbison3

Copy link
Copy Markdown
Collaborator

@xx-shitai-xx xx-shitai-xx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments for you to take a look at and resolve before it can be merged

Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread Jenkinsfile Outdated
Comment thread build.rs Outdated
Comment thread Jenkinsfile Outdated
Base automatically changed from dev to main February 22, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants