Skip to content

Refactor WASMStandaloneDevice Build: Drop distutils, add native emcc prefs#20

Merged
mstimberg merged 8 commits into
brian-team:mainfrom
PalashChitnavis:build
Jul 18, 2025
Merged

Refactor WASMStandaloneDevice Build: Drop distutils, add native emcc prefs#20
mstimberg merged 8 commits into
brian-team:mainfrom
PalashChitnavis:build

Conversation

@PalashChitnavis

Copy link
Copy Markdown
Contributor

Fixes #19

This patch makes the WASM backend talk straight to emcc instead of first trying to use GCC or MSVC. It adds two new preference lists where you can set your own emcc compile- and link-flags. The build code now writes the right -I, -L, and -l flags itself, so no more post-hacking or flag cleanup is needed. Result: you only need Python and the Emscripten SDK—no Visual Studio or system compiler required.

@PalashChitnavis

Copy link
Copy Markdown
Contributor Author

Hi @mstimberg, is there anything else you’d like me to change in this PR?

@mstimberg

Copy link
Copy Markdown
Member

Hi @PalashChitnavis Sorry, I wasn't much available the last days. Your changes look good, but here are a few suggestions for things to change/add:

  • the README file should state the preferences that are used and what they are used for (things like header files and library dirs from the standard Brian2 preferences, and the emsdk-specific ones from Brian2Wasm)
  • the things about contributions and license are useful boilerplate but: 1) we don't use conventional commit messages, and 2) Brian2's license is not BSD-style but rather GPL-style (also, this repo does not actually have a LICENSE file 😬 )
  • the documentation for the CLI is currently a docstring, but it would be good to include it in the README file as well.

@mstimberg mstimberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, we can do the README changes later

@mstimberg mstimberg merged commit f2823b2 into brian-team:main Jul 18, 2025
3 checks passed
@PalashChitnavis PalashChitnavis deleted the build branch July 25, 2025 08:56
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.

Overwrite build infrastructure for compiler handling

2 participants