Skip to content

Revisiting no_std in ICU4X #812

@sffc

Description

@sffc

2021 follow-up to #77

The allocator remains one of the largest chunks of code size in WASM files, and it has been reported to us by some customers (such as .NET) that it can cause integration issues.

I would therefore like us to revisit no_std as a baseline in ICU4X, meaning no allocator (more specifically, types that require heap allocations, like Vec and String, would be off limits from core library code).

With #78 and #667, the data provider will support zero-alloc. We are fairly close in some other areas. FixedDecimal and LanguageIdentifier both have a Vec-like field; we would need to decide what to do with these: perhaps return an error code if overflow would occur?

Most importantly, I don't want to embark on no_std without the full support of the team. I truly think no_std is an achievable and noble goal for us, but it will require commitment and a team culture where no_std is the norm. More specifically, although I don't think it should be a requirement that everything in the ICU4X core library is no_std, I want that to be the exception, not the rule. New features should land with no_std support by default, unless team members provide a technical justification otherwise.

Metadata

Metadata

Labels

A-designArea: Architecture or designA-performanceArea: Performance (CPU, Memory)C-metaComponent: Relating to ICU4X as a wholeS-epicSize: Major project (create smaller child issues)questionUnresolved questions; type unclear

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions