Skip to content

feat: add no_std + alloc support behind std feature gate - #364

Merged
mwillsey merged 5 commits into
egraphs-good:mainfrom
MavenRain:feat/no-std-support
Apr 14, 2026
Merged

mwillsey merged 5 commits into
egraphs-good:mainfrom
MavenRain:feat/no-std-support

Conversation

@MavenRain

Copy link
Copy Markdown
Contributor

Port the entire crate to work without the standard library by gating std-only dependencies (env_logger, quanta, symbol_table, symbolic_expressions) behind a default "std" feature. When std is disabled, a minimal sexp parser, a spin-lock-based global symbol interner, and a no-op Instant shim fill in. Bumps thiserror to v2 for no_std error derive support.

Closes #361

  Port the entire crate to work without the standard library by gating
  std-only dependencies (env_logger, quanta, symbol_table,
  symbolic_expressions) behind a default "std" feature.  When std is
  disabled, a minimal sexp parser, a spin-lock-based global symbol
  interner, and a no-op Instant shim fill in.  Bumps thiserror to v2
  for no_std error derive support.

  Closes egraphs-good#361
@mwillsey

mwillsey commented Apr 8, 2026

Copy link
Copy Markdown
Member

Hi, this is an interesting contribution, but it's not ready. To merge this, I'd like to consolidate most import changes into a shim thing in lib.rs. #[allow(unused_imports)] should not be used. Also, this patch doesn't actually test any of the changes. Either manually run cargo test --no-default-features, or add it to the Makefile.

@mwillsey

mwillsey commented Apr 9, 2026

Copy link
Copy Markdown
Member

Looks good. I've added no_std support to the symbol_table library. Please depend on it's latest commit and then looks should be good to go. https://github.com/mwillsey/symbol_table

  Max added no_std support to symbol_table upstream, so egg no longer
  needs its hand-rolled Symbol shim. Pin symbol_table to the no_std
  commit on mwillsey/symbol_table and drop the no_std_symbol module.
@mwillsey
mwillsey merged commit f94c346 into egraphs-good:main Apr 14, 2026
3 checks passed
@mwillsey

Copy link
Copy Markdown
Member

Thanks!

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.

Suggestion: no_std support (with alloc)

2 participants